> $ mix deps.get canary
> warning: variable "deps" does not exist and is being expanded to "deps()", please use parentheses to remove the ambiguity or change the variable name
> mix.exs:8
> * Updating relx (https://github.com/erlware/relx.git)
> * Updating canary (https://github.com/cpjk/canary.git)
> Running dependency resolution...
> Failed to use "getopt" (version 1.0.1) because
> deps/relx/rebar.config requires 1.0.1
> providers (version 1.6.0) requires 0.8.2
> ** (Mix) Hex dependency resolution failed, change the version requirements of your dependencies or unlock them (by using mix deps.update or mix deps.unlock). If you are unable to resolve the conflicts you can try overriding with {:dependency, "~> 1.0", override: true}
** (Mix) Hex dependency resolution failed, change the version requirements of your dependencies or unlock them (by using mix deps.update or mix deps.unlock). If you are unable to resolve the conflicts you can try overriding with {:dependency, “~> 1.0”, override: true}
Where does this {:dependency, “~> 1.0”, override: true} come in?
commenting out canary which had dependency
i still get:
Failed to use "getopt" (version 1.0.1) because
apps/auth/mix.exs requires ~> 1.0.1
deps/relx/rebar.config requires 1.0.1
providers (version 1.6.0) requires 0.8.2
In the mix.exs of your application you can change your currently used {:getopt, "~> whatever"} to {:getopt, "~> whatever", override: true}, this will override all downstream dependencies.
Since you are forcing your dependencies to use a version then, which might have a different interaface according to SemVer, it might break the overall application though.
After doing {:getopt, "~> 0.8.2", override: true},
Failed to use "getopt" (version 1.0.1) because
apps/auth/mix.exs requires ~> 0.8.2
deps/relx/rebar.config requires 1.0.1
** (Mix) Hex dependency resolution failed, change the version requirements of your dependencies or unlock them (by using mix deps.update or mix deps.unlock). If you are unable to resolve the conflicts you can try overriding with {:dependency, "~> 1.0", override: true}
Often its better to try the newest version in the conflicts. relx might rely on stuff that was only added in 1.0.1. Thats usually how the lower bound is determined.
Features that your other dependency need might still be able in 1.0.1.
Also where exactly did you do that? It seems as if you were in an umbrella application, :overrides do only work at the topmost mix.exs AFAIK.