I want to update my APP for the course PhoenixLiveView with Pragmatic Studio and when I try to do a mix hex.outdated it complains Update not possible for some libraries as you can see:
$ mix hex.outdated
Dependency Current Latest Status
ecto_sql 3.4.3 3.5.4 Update possible
faker 0.14.0 0.16.0 Update not possible
floki 0.26.0 0.29.0 Update possible
gettext 0.17.4 0.18.2 Update possible
inflex 2.0.0 2.1.0 Update not possible
jason 1.2.2 1.2.2 Up-to-date
number 1.0.1 1.0.3 Update possible
phoenix 1.5.6 1.5.7 Update possible
phoenix_ecto 4.1.0 4.2.1 Update possible
phoenix_html 2.14.2 2.14.3 Update possible
phoenix_live_dashboard 0.2.10 0.4.0 Update not possible
phoenix_live_reload 1.2.1 1.3.0 Update possible
phoenix_live_view 0.14.7 0.15.4 Update not possible
plug_cowboy 2.4.0 2.4.1 Update possible
postgrex 0.15.3 0.15.8 Update possible
telemetry_metrics 0.6.0 0.6.0 Up-to-date
telemetry_poller 0.5.0 0.5.1 Update possible
timex 3.6.2 3.6.3 Update possible
Run `mix hex.outdated APP` to see requirements for a specific dependency.
To view the diffs in each available update, visit:
I want to try the command mix deps.update.
But first I want to ask here how to properly update these libraries.
Someone can help me with this please?
“Update not possible” mean that constraints in direct or indirect dependencies are preventing upgrade. For example if some library requires inflex =2.0.0 then there is nothing you can do unless that dependency updates their constraint. Of course you can override deps, but that can cause breakages in that dependencies due to incompatibility.
So If I update it’s possible to take errors.
So you recommend do nothing?
Or I need to read the evolution of the version library and make some changes?
The command will consider the restrictions in your mix.exs file.
When you run mix dips.update --all, it will upgrade all versions labeled as “Update possible”.
For instance, say you have {:phx_gen_auth, "~> 0.5.0"} in your mix file.
After you run mix hex.outdated you’ll see:
Dependency Current Latest Status
phx_gen_auth 0.5.0 0.6.0 Update not possible
In this case, the update is not possible because in the mix file you specifically restricted the upgrade to 0.5 versions, it would update to 0.5.x as 0.5.2 or 0.5.9 but it won’t upgrade to 0.6.x.
So you might want to relax your dependencies a little bit.
When I changed these versions for {:phoenix_live_view, "~> 0.15.4"}, {:phoenix_live_dashboard, “~> 0.4.0”}`` ElixirLS tells this error on Visual Studio Code:
an exception was raised:
** (Mix.Error) Can't continue due to errors on dependencies
(mix 1.11.2) lib/mix.ex:436: Mix.raise/1
(mix 1.11.2) lib/mix/tasks/deps.loadpaths.ex:28: Mix.Tasks.Deps.Loadpaths.run/1
(mix 1.11.2) lib/mix/task.ex:394: Mix.Task.run_task/3
(mix 1.11.2) lib/mix/tasks/loadpaths.ex:37: Mix.Tasks.Loadpaths.run/1
(mix 1.11.2) lib/mix/task.ex:394: Mix.Task.run_task/3
(mix 1.11.2) lib/mix/tasks/compile.ex:113: Mix.Tasks.Compile.run/1
(mix 1.11.2) lib/mix/task.ex:394: Mix.Task.run_task/3
(language_server 0.6.4) lib/language_server/build.ex:199: ElixirLS.LanguageServer.Build.compile/0ElixirLS
Peek Problem (⌥F8)
No quick fixes available
So I tried to update even with those errors doing mix deps.get and mix compile…
It was needed to restart the ecto and the app phoenix liveview are working right and passing the tests.
But The ElixirLS continues raising this error…