ElixirLS: the dependency does not match the requirement
ElixirLS me tiraba este error en Visual Studio Code (View -> Output -> Combobox -> ElixirLS):
Started ElixirLS v0.8.2
Elixir version: "1.12.2 (compiled with Erlang/OTP 23)"
Erlang version: "23"
ElixirLS compiled with Elixir 1.10.4 and erlang 22
MIX_ENV: test
MIX_TARGET:
[Warn - 10:50:43 AM] Unchecked dependencies for environment test:
[Warn - 10:50:43 AM] * nimble_csv (Hex package)
[Warn - 10:50:43 AM] the dependency does not match the requirement "~> 1.2", got "1.1.0"
[Warn - 10:50:43 AM] * ecto (Hex package)
[Warn - 10:50:43 AM] the dependency ecto 3.6.2
> In deps/td_df_lib/mix.exs:
{:ecto, "~> 3.0", [env: :prod, repo: "hexpm", hex: "ecto"]}
does not match the requirement specified
> In deps/ecto_sql/mix.exs:
{:ecto, "~> 3.7.0", [env: :prod, hex: "ecto", repo: "hexpm", optional: false]}
Ensure they match or specify one of the above in your deps and set "override: true"
10:50:43.328 [error] Process #PID<0.124.0> raised an exception
** (Mix.Error) Can't continue due to errors on dependencies
(mix 1.12.2) lib/mix.ex:454: Mix.raise/2
(mix 1.12.2) lib/mix/tasks/deps.loadpaths.ex:28: Mix.Tasks.Deps.Loadpaths.run/1
(mix 1.12.2) lib/mix/task.ex:394: anonymous fn/3 in Mix.Task.run_task/3
(mix 1.12.2) lib/mix/tasks/loadpaths.ex:37: Mix.Tasks.Loadpaths.run/1
(mix 1.12.2) lib/mix/task.ex:394: anonymous fn/3 in Mix.Task.run_task/3
(mix 1.12.2) lib/mix/tasks/compile.ex:122: Mix.Tasks.Compile.run/1
(mix 1.12.2) lib/mix/task.ex:394: anonymous fn/3 in Mix.Task.run_task/3
(language_server 0.8.2) lib/language_server/build.ex:200: ElixirLS.LanguageServer.Build.compile/0
MIX_ENV: test
MIX_TARGET:
[Warn - 10:54:37 AM] Unchecked dependencies for environment test:
[Warn - 10:54:37 AM] * nimble_csv (Hex package)
[Warn - 10:54:37 AM] the dependency does not match the requirement "~> 1.2", got "1.1.0"
[Warn - 10:54:37 AM] * ecto (Hex package)
[Warn - 10:54:37 AM] the dependency ecto 3.6.2
> In deps/td_df_lib/mix.exs:
{:ecto, "~> 3.0", [env: :prod, repo: "hexpm", hex: "ecto"]}
does not match the requirement specified
> In deps/ecto_sql/mix.exs:
{:ecto, "~> 3.7.0", [env: :prod, hex: "ecto", repo: "hexpm", optional: false]}
Ensure they match or specify one of the above in your deps and set "override: true"
10:54:37.027 [error] Process #PID<0.280.0> raised an exception
** (Mix.Error) Can't continue due to errors on dependencies
(mix 1.12.2) lib/mix.ex:454: Mix.raise/2
(mix 1.12.2) lib/mix/tasks/deps.loadpaths.ex:28: Mix.Tasks.Deps.Loadpaths.run/1
(mix 1.12.2) lib/mix/task.ex:394: anonymous fn/3 in Mix.Task.run_task/3
(mix 1.12.2) lib/mix/tasks/loadpaths.ex:37: Mix.Tasks.Loadpaths.run/1
(mix 1.12.2) lib/mix/task.ex:394: anonymous fn/3 in Mix.Task.run_task/3
(mix 1.12.2) lib/mix/tasks/compile.ex:122: Mix.Tasks.Compile.run/1
(mix 1.12.2) lib/mix/task.ex:394: anonymous fn/3 in Mix.Task.run_task/3
(language_server 0.8.2) lib/language_server/build.ex:200:
Después de hacer :
j@bt ~/Documents/trabajo/bt/proyecto (master) % MIX_ENV=test mix deps.clean nimble_csv ecto
* Cleaning nimble_csv
* Cleaning ecto
j@bt ~/Documents/trabajo/bt/proyecto (master) % MIX_ENV=test mix deps.get
Resolving Hex dependencies...
Dependency resolution completed:
Unchanged:
[...]
* Getting nimble_csv (Hex package)
* Getting ecto (Hex package)
ya funcionaba…
ElixirLS.LanguageServer.Build.compile/0
MIX_ENV: test
MIX_TARGET:
==> inflex
Compiling 6 files (.ex)
Generated inflex app
==> nimble_csv
Compiling 1 file (.ex)
Generated nimble_csv app
==> ecto
Compiling 56 files (.ex)
Generated ecto app
[...]
[Info - 10:56:42 AM] Compile took 87085 milliseconds
[Info - 10:56:42 AM] [ElixirLS Dialyzer] Checking for stale beam files
[Info - 10:56:42 AM] [ElixirLS WorkspaceSymbols] Indexing...
[Info - 10:56:42 AM] [ElixirLS WorkspaceSymbols] Module discovery complete
[Info - 10:56:43 AM] [ElixirLS WorkspaceSymbols] 429 callbacks added to index
[Info - 10:56:43 AM] [ElixirLS Dialyzer] Found 1558 changed files in 983 milliseconds
[Warn - 10:56:45 AM] warning: ^^^ is deprecated. It is typically used as xor but it has the wrong precedence, use Bitwise.bxor/2 instead
nofile:1
[...]
[Info - 10:56:47 AM] [ElixirLS WorkspaceSymbols] 1856 modules added to index
[Info - 10:56:47 AM] [ElixirLS WorkspaceSymbols] 1069 types added to index
[Info - 10:56:49 AM] [ElixirLS Dialyzer] Analyzing 98 modules:
[...]
[Info - 10:56:52 AM] [ElixirLS Dialyzer] Analysis finished in 8459 milliseconds
[Info - 10:56:52 AM] Dialyzer analysis is up to date
[Info - 10:56:53 AM] [ElixirLS Dialyzer] Writing manifest...
[Info - 10:56:54 AM] [ElixirLS Dialyzer] Done writing manifest in 2089 milliseconds.
[Info - 10:57:07 AM] [ElixirLS WorkspaceSymbols] 20983 functions added to index
Si ya taníamos algo en ejecución, deberemos pararlo y rearrancarlo, o de lo contrario:
iex(18)> Grant.changeset(params)
%Inspect.Error{
message: "got UndefinedFunctionError with message \"function Inspect.Ecto.Changeset.inspect/2 is undefined (module Inspect.Ecto.Ch
angeset is not available)\" while inspecting %{__struct__: Ecto.Changeset,...