It fixed Erlang / Elixir, but I couldnt install correctly Phoenix.
Did you succeed?
Some of my deps like apartmentex that depends on ecto can’t compile.
I did try normal url and local file to install Phoenix.
Erlang, Nodejs & Elixir last versions from ASDF. (including that PR)
$ mix help | egrep "phx|phoenix"
mix local.phoenix # Updates Phoenix locally
mix local.phx # Updates the Phoenix project generator locally
mix phoenix.new # Creates a new Phoenix v1.3.0 application
mix phx.new # Creates a new Phoenix v1.3.0 application
mix phx.new.ecto # Creates a new Ecto project within an umbrella project
mix phx.new.web # Creates a new Phoenix web project within an umbrella project
Of course you need to make sure that you are actually using the correct elixir version!
In your case I’d try this to be sure:
$ ASDF_ELIXIR_VERSION=1.5.1 mix help | egrep "phoenix|phx"
If that does really print nothing, please do show the full output of ASDF_ELIXIR_VERSION=1.5.1 mix help and which mix!
The error is occurring both on new phx apps and old ones.
mix compile
==> apartmentex
Compiling 5 files (.ex)
== Compilation error in file lib/apartmentex/migrations_path_builder.ex ==
** (CompileError) lib/apartmentex/migrations_path_builder.ex:2: cannot import Mix.Ecto.build_repo_priv/1 because it is undefined or private
(elixir) src/elixir_import.erl:77: :elixir_import.calculate/6
(elixir) src/elixir_import.erl:18: :elixir_import.import/4
could not compile dependency :apartmentex, "mix compile" failed. You can recompile this dependency with "mix deps.compile apartmentex", update it with "mix deps.update apartmentex" or clean it with "mix deps.clean apartmentex"
ASDF_ELIXIR_VERSION=1.5.1 mix help | egrep "phoenix|phx"
mix local.phoenix # Updates Phoenix locally
mix local.phx # Updates the Phoenix project generator locally
mix phoenix.gen.html # Generates controller, model and views for an HTML based resource
mix phoenix.new # Creates a new Phoenix v1.3.0 application
mix phoenix.server # Starts applications and their servers
mix phx.digest # Digests and compresses static files
mix phx.digest.clean # Removes old versions of static assets.
mix phx.gen.channel # Generates a Phoenix channel
mix phx.gen.context # Generates a context with functions around an Ecto schema
mix phx.gen.embedded # Generates an embedded Ecto schema file
mix phx.gen.html # Generates controller, views, and context for an HTML resource
mix phx.gen.json # Generates controller, views, and context for a JSON resource
mix phx.gen.presence # Generates a Presence tracker
mix phx.gen.schema # Generates an Ecto schema and migration file
mix phx.gen.secret # Generates a secret
mix phx.new # Creates a new Phoenix v1.3.0 application
mix phx.new.ecto # Creates a new Ecto project within an umbrella project
mix phx.new.web # Creates a new Phoenix web project within an umbrella project
mix phx.routes # Prints all routes
mix phx.server # Starts applications and their servers
Also let me please say, that asdf is not a packagemanager like apt or brew which installs elixir or something else in the required version, its a tool that manages environments and therefore need to be learned to be able to use it correctly. Its much more like rbenv, rvm, rustup, evm, etc…
But if one has mastered it, one can use it to run tests automatically against mutliple Erlang/Elixir-Version-Combinations without having to rely or configure external CI Services. Therefore you can get a level of confidence your code is correct for all targeted environments even before pushing it to the public.