phoenixframework / phoenix_live_reload

Provides live-reload functionality for Phoenix
MIT License
315 stars 90 forks source link

Dependency mismatch with Phoenix #26

Closed davidbegin closed 8 years ago

davidbegin commented 8 years ago

With this commit in Phoenix: https://github.com/phoenixframework/phoenix/commit/3f6df5df741e58b098b92a631b050bac069b2af8

Generating a new application from master, causes the following error:

Unchecked dependencies for environment dev:
* phoenix (https://github.com/phoenixframework/phoenix.git)
  the dependency phoenix in mix.exs is overriding a child dependency:

  > In mix.exs:
    {:phoenix, nil, [git: "https://github.com/phoenixframework/phoenix.git"]}

  > In deps/phoenix_live_reload/mix.exs:
    {:phoenix, "~> 0.16 or ~> 1.0", [only: :dev, optional: false, hex: :phoenix]}

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

My best guess of what is happening:

Generating a new Phoenix application points to Phoenix master, and Phoenix Live Reload depends on a Phoenix version between "~> 0.16 or ~> 1.0"

I made a PR https://github.com/phoenixframework/phoenix_live_reload/pull/25 pointing to Phoenix master and that seems to solve the issue.

It seems like this could also could be solved by a patch level Phoenix release.

ericmj commented 8 years ago

I think you should expect some dependency inconsistencies if you use a pre-release version. It's not viable to update all dependencies between phoenix releases.

@chrismccord I don't know the reason for https://github.com/phoenixframework/phoenix/commit/3f6df5df741e58b098b92a631b050bac069b2af8 but it seems like it would better to just leave the version as-is between stable releases?

josevalim commented 8 years ago

@ericmj If you are building from master, we need to use the git dependency as the generated files may rely on features that exist on master only.

@chrismccord the fix is to add override: true to the git dependency. I will do that right now.