Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Faster installs for erlang #2721

Closed
paradox460 opened this issue Oct 10, 2024 · 3 comments · Fixed by #3353
Closed

Faster installs for erlang #2721

paradox460 opened this issue Oct 10, 2024 · 3 comments · Fixed by #3353

Comments

@paradox460
Copy link

Currently, both the old ASDF erlang plugin and the built-in erlang plugin depend on kerl to build the erlang binary every single time.

This is acceptable on a dev machine, but when trying to use in CI, particularly on a slower project, where builds are infrequent, it can stretch a build to many times its length, as erlang has to be rebuilt every time.

https://github.com/erlef/setup-beam uses pre-built binaries that target various operating systems common in CI providers. It does this by sourcing them from various files on builds.hex.pm or on a mirror, as they are originally built by bob.

The logic for choosing which file to download is fairly simple, albeit long, due to the amount of things supported. But at its heart its just attempting to download https://builds.hex.pm/builds/otp/<architecture>/<versionSpec>.tar.gz for erlang versions.

There's been a discussion about this for a long time on the old asdf-erlang plugin, but it hasn't seen much traction since 2022

@cw789
Copy link

cw789 commented Nov 13, 2024

Also for MacOS there are now builds available: https://elixirforum.com/t/new-community-maintained-otp-builds-for-macos/67338

@jdx
Copy link
Owner

jdx commented Nov 13, 2024

I'd accept a pr but we'd probably need to retain the old behavior and have a setting like MISE_ERLANG_COMPILE similar to MISE_PYTHON_COMPILE and MISE_NODE_COMPILE

@jdx
Copy link
Owner

jdx commented Nov 30, 2024

I'd really love to see this as I can tell erlang+elixir are quite popular both with asdf and mise. I would greatly welcome a contribution if someone is willing to help. I may get around to it soon otherwise. swift would be a good reference on how to do this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants