version-fox / vfox-elixir

Elixir vfox plugin. Use the vfox to manage multiple Elixir versions in Linux/Darwin MacOS/Windows. all platform~
Apache License 2.0
7 stars 1 forks source link

cannot install main #7

Open simonmcconnell opened 3 months ago

simonmcconnell commented 3 months ago

main, main-otp-27 etc are not present in https://fastly.jsdelivr.net/gh/version-fox/vfox-elixir@main/assets/versions.txt

yeshan333 commented 3 months ago

Do you mean you want to compile and install it from the development branch of Elixir source code repository?

Now the version in the https://fastly.jsdelivr.net/gh/version-fox/vfox-elixir@main/assets/versions.txt is basically the same as the tag list displayed https://github.com/elixir-lang/elixir/tags.

simonmcconnell commented 3 months ago

We use https://builds.hex.pm/builds/elixir/builds.txt for scoop. Though, it has other issues preventing it from installing the main versions.

Is there a reason you are using github instead of hex.pm?

yeshan333 commented 3 months ago

Because Elixir is an open source project on GitHub, which means that I can flexibly obtain any information provided by Elixir's official code repository through GitHub OpenAPI. So I chose the GitHub.

And having a https://www.jsdelivr.com/?docs=gh like CDN allows me to get better access to GitHub resources around the world.

yeshan333 commented 3 months ago

The content in https://fastly.jsdelivr.net/gh/version-fox/vfox-elixir@main/assets/versions.txt is obtained by this script https://github.com/version-fox/vfox-elixir/blob/main/assets/get_all_elixir_versions.py using the GitHub OpenAPI and updated regularly through GitHub Action update_elixir_versions.yaml on a schedule.

simonmcconnell commented 3 months ago

But you lose out on having elixir versions compiled with specific OTP versions and main available. You prefer to give that up, i.e. reduce adoption, just for the pleasure of using the GitHub API?

Parsing builds.txt from hex.pm is trivial. It's what asdf and scoop use.

yeshan333 commented 3 months ago

You don't seem to understand what I mean. In fact, Elixir compiled through a specific OTP version can also be obtained through GitHub.

like this:

image

from the https://github.com/elixir-lang/elixir/releases.

Even more features can be supported without being limited to hex.pm. @simonmcconnell

Hex. pm is actually synchronized content from here.

simonmcconnell commented 3 months ago

I see. That's not in either your versions file or at the URL in the Python script you referenced.

How do you get main using the GitHub API?

yeshan333 commented 3 months ago

The meaning of main should be the version compile from the main branch.

image

This scenario does need to be handled in the implementation of the vfox-elixir plugin, and as you mentioned, using hex.pm's build.txt is a good way to do this.

yeshan333 commented 3 months ago

But it's the same as you can see some description from the hex.pm's README: https://github.com/hexpm/bob?tab=readme-ov-file#elixir-builds

Elixir builds are compiled on each git push to https://github.com/elixir-lang/elixir for any branch.

That mean's the version of main is not reliable.

Maybe after the next official version of Elixir is released, the corresponding git commit version will be different

simonmcconnell commented 3 months ago

The whole point of main is to be at the very latest version. It's not supposed to be a reproducible commit ref. One expects it to be the very latest.