hex icon indicating copy to clipboard operation
hex copied to clipboard

Not able to update indirect dependencies

Open TBK145 opened this issue 8 months ago • 2 comments

Hi! I updated hex to 2.2.1 last week, and now I'm not able to update indirect dependencies. ~Also when I use mix hex.outdated I only see dependencies listed in my own mix.exs.~ (forgot I needed to use --all) For instance, one of my dependencies is wallaby, which depends on tesla. Now I want to use a newer version of tesla (that still satisfies the requirement on wallaby), but running mix deps.update tesla does nothing.

Some output:

$ mix hex.outdated --all
Dependency              Current  Latest   Status               
[...]      
tesla                   1.12.3   1.14.2   Update possible      
[...]  

Run `mix hex.outdated APP` to see requirements for a specific dependency.

To view the diffs in each available update, visit:
https://hex.pm/l/LNBfc
$ mix hex.outdated tesla
There is newer version of the dependency available 1.14.2 > 1.12.3!

Source             Requirement  Up-to-date  
web_driver_client  ~> 1.3       Yes         

Up-to-date indicates if the requirement matches the latest version.
$ mix deps.update tesla
Resolving Hex dependencies...
Resolution completed in 0.702s
Unchanged:
[...]
  tesla 1.12.3
[...]

Maybe it's important to mention that wallaby has only: :test specified.

TBK145 avatar May 19 '25 10:05 TBK145

Can you please provide a mix.exs and mix.lock that would allow us to reproduce this issue? Thanks!

josevalim avatar Jun 11 '25 10:06 josevalim

Well, it's an umbrella application with 11 sub-applications that have their own mix.exs, plus a root mix.exs file, so that would maybe be too much files to share?

I tried making a sample application, where I first fixed the version to an older version, and then tried to update it, that did work. Is there maybe some more output I can share?

TBK145 avatar Jun 11 '25 14:06 TBK145

mix hex.outdated will tell you that an update is possible based on your project's mix.exs file. It will not check if an update is possible by just running mix deps.update since it depends on transitive dependencies, what arguments you pass mix and what is currently unlocked.

If you want to check why a dependency won't update set the version requirement in mix.exs file to the minimum version you want and run mix deps.update. The version solver will tell then you an update is possible.

ericmj avatar Aug 04 '25 16:08 ericmj