Code Monkey home page Code Monkey logo

Comments (8)

josevalim avatar josevalim commented on May 18, 2024

Hey @dbenamy, we are sorry about that. We released postgrex depending on elixir-dev by accident and that is what is causing pain.

Please try using this commit: ec804cb

from postgrex.

dbenamy avatar dbenamy commented on May 18, 2024

Thanks for the quick reply!

I changed my mix.exs to have

  defp deps do
    [
      {:phoenix, github: "phoenixframework/phoenix"},
      {:postgrex, "0.4.2", github: "ericmj/postgrex", tag: "ec804cb"}, # this revision works with elixir 0.13.0
      {:ecto, github: "elixir-lang/ecto"}
    ]
  end

ran

mix deps.clean --all
mix deps.get
mix deps.update postgrex

which gave normal looking output, and then

mix compile
Unchecked dependencies for environment dev:
* postgrex (git://github.com/ericmj/postgrex.git)
  the dependency postgrex in mix.exs is overriding a child dependency:

  > In mix.exs:
    {:postgrex, "0.4.2", [git: "git://github.com/ericmj/postgrex.git", tag: "ec804cb"]}

  > In deps/ecto/mix.exs:
    {:postgrex, "~> 0.4.0", [git: "git://github.com/ericmj/postgrex.git", optional: true]}

  Ensure they match or specify one of the above in your Statman.Mixfile deps and set `override: true`
** (Mix) Can't continue due to errors on dependencies

Am I missing something?

from postgrex.

ericmj avatar ericmj commented on May 18, 2024

You need to add override: true, like this: {:postgrex, "0.4.2", github: "ericmj/postgrex", tag: "ec804cb", override: true}.

from postgrex.

dbenamy avatar dbenamy commented on May 18, 2024

That did it, thanks!!

Why does the override setting exist? If the version and/or tag are given, I would think that it's clear what the dev wants. But I'm really new at all this so I'm probably missing some important piece :-)

from postgrex.

josevalim avatar josevalim commented on May 18, 2024

@dbenamy the override exists because you may accidentally replace a dependency specified below. The override is to make sure you are defining it exactly because you want to override something.

from postgrex.

dbenamy avatar dbenamy commented on May 18, 2024

Got it. Thanks for the explanation.

Want me to take a stab at a patch which updates the error message to
explain this and how to solve it?

On Thu, Apr 24, 2014 at 12:21 PM, José Valim [email protected]:

@dbenamy https://github.com/dbenamy the override exists because you may
accidentally replace a dependency specified below. The override is to make
sure you are defining it exactly because you want to override something.


Reply to this email directly or view it on GitHubhttps://github.com//issues/12#issuecomment-41300389
.

from postgrex.

ericmj avatar ericmj commented on May 18, 2024

@dbenamy The error message already includes the solution. From what you pasted: "Ensure they match or specify one of the above in your Statman.Mixfile deps and set override: true".

Do you think it should be more clear?

from postgrex.

dbenamy avatar dbenamy commented on May 18, 2024

Oh :-) Now that I read it more carefully, I totally understand what it's saying. Maybe I was too new to elixir or too tired to process it at the time.

If I was going to rewrite the message though, I might have it say something like this

$ mix compile
** (Mix) Can't continue due to errors on dependencies
"projdir/mix.exs" has this dependency:
    {:postgrex, "0.4.2", [git: "git://github.com/ericmj/postgrex.git", tag: "ec804cb"]}
which conflicts with another dependency in "projdir/deps/ecto/mix.exs":
    {:postgrex, "~> 0.4.0", [git: "git://github.com/ericmj/postgrex.git", optional: true]}

Normally, you should change "projdir/mix.exs" to specify the same version as ecto, for example:
    {:postgrex, "~> 0.4.0", [git: "git://github.com/ericmj/postgrex.git"]}
If you really want to use the version in "projdir/mix.exs", add the override setting like this:
    {:postgrex, "0.4.2", [git: "git://github.com/ericmj/postgrex.git", tag: "ec804cb", override: true]}

But it's probably not too important.

from postgrex.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.