For tools like asdf, setup-beam, and similar it is very useful to get a 
list of all Elixir releases (included per-OTP builds). Doing this through 
GitHub REST API can be slightly complicated due to dealing with JSON, 
pagination, and rate-limiting.

Hex/Bob keeps a https://builds.hex.pm/builds/elixir/builds.txt which has 
none of these problems.

Since a few release ago, Elixir build are available on Elixir GitHub 
release. And so to keep similar things together, I'd like to propose adding 
something like (or exactly) such builds.txt file in the GitHub repository. 
This way we could, although there are no such plans at the moment, 
deprecate Hex/Bob-maintainted Elixir builds.

With this proposal, the way to get all Elixir builds could be simply:

    $ curl -fL https://github.com/hexpm/bob/raw/main/builds.txt

Since Elixir 1.14, the builds in GitHub releases follow the pattern 
elixir-otp-VSN.zip. Prior to that it was Precompiled.zip, compiled against 
the oldest supported OTP version for that Elixir release 
(https://hexdocs.pm/elixir/compatibility-and-deprecations.html#between-elixir-and-erlang-otp).
 
I'd still add them to the builds file for informational purposes but I'm OK 
with not doing that either.

We could just adopt the Hex builds.txt format, here's an example:

v1.17.2 47abe2d107e654ccede845356773bcf6e11ef7cb 2024-07-06T21:18:45Z 
c1a0860b805ef4925ca9e97ecf9f84b3d3fc62e6a48a91c1cbe6344c3b02400b
v1.17.2-otp-25 47abe2d107e654ccede845356773bcf6e11ef7cb 
2024-07-06T21:18:45Z 
c1a0860b805ef4925ca9e97ecf9f84b3d3fc62e6a48a91c1cbe6344c3b02400b
v1.17.2-otp-26 47abe2d107e654ccede845356773bcf6e11ef7cb 
2024-07-06T21:20:26Z 
a2e32bf61a8dd1354ce41bed891cee72e02cbf5b4532fa190416547f422a97b4
v1.17.2-otp-27 47abe2d107e654ccede845356773bcf6e11ef7cb 
2024-07-06T21:23:11Z 
4e32e8761bd73916feaa24eaa98d86b1d929039e38e778b37553b0330f75b9f6

This way existing tools can easily switch to it. Since it'd be a new URL 
though, we have a chance to potentially improve it. Here's one idea which I 
believe will make it super clear what's what:

<ref_name>[-otp-VSN] <date> git:<ref> sha256:<sha>

e.g.:

v1.17.2-otp-27 2024-07-06T21:23:11Z 
git:47abe2d107e654ccede845356773bcf6e11ef7cb 
 sha256:4e32e8761bd73916feaa24eaa98d86b1d929039e38e778b37553b0330f75b9f6

(See https://github.com/hexpm/bob/pull/188#discussion_r1701912589)

My proposal is to automate this on GitHub Actions, similar to 
https://github.com/livebook-dev/livebook/blob/v0.14.0/.github/workflows/assets.yml#L52:L57.
 
(It is a bit annoying though because we can't easily make sure only one 
GitHub job of this type runs at a time AND there could be other commits 
happening on main in the meantime. The best I could come up with 
is: 
https://github.com/wojtekmach/otp_builds/blob/2209f680a2f8d8e50c73509790bac565ef65b1d3/.github/workflows/update_builds.yml#L30:L67.)

-- 
You received this message because you are subscribed to the Google Groups 
"elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elixir-lang-core+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/d764ea34-5ba3-4a97-b6ec-c3baab5e847bn%40googlegroups.com.

Reply via email to