list-all does not show OTP versions
dbernheisel opened this issue · 6 comments
I probably worked for a year forgetting that the Elixir version I downloaded is precompiled with a version OTP independent of the erlang version I might have also supplied in my tool-versions file. If I knew that these other Elixir versions existed (via list-all
), I would have chosen the elixir version with the latest OTP version instead of the oldest compatible.
ie,
elixir 1.7.2
erlang 21.0.7
downloads Elixir/OTP 19, and Erlang/OTP 21.
Instead, I should do this:
elixir 1.7.2-otp-21
erlang 21.0.7
downloads Elixir/OTP 21, and Erlang/OTP 21.
But list-all
doesn't show these -otp-*
Elixir versions.
I know it's in the README, but I must've missed it when I first started using the plugin.
Looking at the source, I see that list-all
is fetching the git tags from the Elixir GitHub repo, but downloading the version fetches from hex.pm. Is there a way we can list-all and download from hex.pm?
I think it would be helpful to list these version combinations as well, but I'm not sure how this would work with the existing list-all
output. There may be too many combinations to show.
Maybe we should have different types of versions that can be listed - precompiled and source versions.
How many would be too many? Comparing rbenv for a moment, it lists tons of versions and even Ruby interpreters like jruby, rbx, and rubinius. Not sure how it determines the list.
If Elixir was built from source, then I assume it would be built with the current Erlang install? That might be a little complicated if the global version of Erlang is 20, but the tool-versions file specified 21, and Elixir was built first.
On the other hand, downloading precompiled binaries saves a lot of cycles for CI which is also valuable. Erlang takes like 10min to build from source as-is.
list-all
should probably list all versions, or at least those necessary to have a working environment.
Currently, without knowing to specifically install the elixir 1.7.2-otp-21
version, there is no discoverable way of getting to a correctly working environment with elixir 1.7 and otp 21
@nietaki installing Elixir 1.7 with OTP 21 will work fine using the 1.7.2
version. The only benefit to having 1.7.2-otp-21
is that you don't have to compile Elixir from source.
@dbernheisel yes, it will use whatever version of Erlang is available, so if Erlang 21 isn't already installed Elixir is going to be built for a different version of Erlang.
I just found https://repo.hex.pm/builds/elixir/builds.txt by way of https://bobs-list.kobrakai.de/ (thanks @LostKobrakai btw)
This could be used instead of the GitHub tags and also gives us a list of versions with OTP versions.
I'll open a PR.