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

gleam+rebar3+erlang_ls: depend on erlang@26 #191441

Merged

Conversation

paulo-ferraz-oliveira
Copy link
Contributor

@paulo-ferraz-oliveira paulo-ferraz-oliveira commented Sep 21, 2024

We're pining rebar3 to erlang@26 at this moment (because of gleam), since we're getting ready for erlang@27, not supported by the former.

Reasoning: gleam doesn't work with OTP 27 yet (?) - I'm not certain of this, at this moment, because the ecosystem moves fast, but I'll keep my eye out for updates.


Further considerations

It's not that rebar3 itself needs to depend on erlang@26 (it should build fine with erlang, or erlang@27). It's that gleam depends on rebar3 and thus we have a mismatch in dependencies which CI complains about. And then we need to update erlang_ls lest we get another mismatch.


  • Have you followed the guidelines for contributing?
  • Have you ensured that your commits follow the commit style guide?
  • Have you checked that there aren't other open pull requests for the same formula update/change?
  • gleam: Have you built your formula locally with HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>, where <formula> is the name of the formula you're submitting?
  • rebar3: Have you built your formula locally with HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>, where <formula> is the name of the formula you're submitting?
  • erlang_ls: Have you built your formula locally with HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>, where <formula> is the name of the formula you're submitting?
  • gleam: Is your test running fine brew test <formula>, where <formula> is the name of the formula you're submitting?
  • rebar3: Is your test running fine brew test <formula>, where <formula> is the name of the formula you're submitting?
  • erlang_ls: Is your test running fine brew test <formula>, where <formula> is the name of the formula you're submitting?
  • gleam: Does your build pass brew audit --strict <formula> (after doing HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>)? If this is a new formula, does it pass brew audit --new <formula>?
  • rebar3: Does your build pass brew audit --strict <formula> (after doing HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>)? If this is a new formula, does it pass brew audit --new <formula>?
  • erlang_ls: Does your build pass brew audit --strict <formula> (after doing HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>)? If this is a new formula, does it pass brew audit --new <formula>?

@github-actions github-actions bot added the automerge-skip `brew pr-automerge` will skip this pull request label Sep 21, 2024
@paulo-ferraz-oliveira paulo-ferraz-oliveira changed the title erlang_ls+gleam+rebar3: depend on erlang@26 erlang_ls+gleam+rebar3: depend on erlang@26 Sep 21, 2024
@paulo-ferraz-oliveira paulo-ferraz-oliveira mentioned this pull request Sep 21, 2024
6 tasks
@github-actions github-actions bot removed the automerge-skip `brew pr-automerge` will skip this pull request label Sep 21, 2024
@github-actions github-actions bot added the automerge-skip `brew pr-automerge` will skip this pull request label Sep 21, 2024
@github-actions github-actions bot removed the automerge-skip `brew pr-automerge` will skip this pull request label Sep 21, 2024
@paulo-ferraz-oliveira paulo-ferraz-oliveira changed the title erlang_ls+gleam+rebar3: depend on erlang@26 gleam+rebar3: depend on erlang@26 Sep 21, 2024
@paulo-ferraz-oliveira paulo-ferraz-oliveira changed the title gleam+rebar3: depend on erlang@26 gleam+rebar3+erlang_ls: depend on erlang@26 Sep 21, 2024
As a pre-condition/dependency for gleam

Co-authored-by: Carlo Cabrera <30379873+carlocab@users.noreply.github.com>
Co-authored-by: Carlo Cabrera <30379873+carlocab@users.noreply.github.com>
Because `gleam` does:
  - this forces `rebar3` to
      - this forces `erlang_ls` to

Co-authored-by: Carlo Cabrera <30379873+carlocab@users.noreply.github.com>
@carlocab carlocab marked this pull request as ready for review September 21, 2024 14:41
@carlocab carlocab added the ready to merge PR can be merged once CI is green label Sep 21, 2024
Copy link
Contributor

🤖 An automated task has requested bottles to be published to this PR.

@github-actions github-actions bot added the CI-published-bottle-commits The commits for the built bottles have been pushed to the PR branch. label Sep 21, 2024
@BrewTestBot BrewTestBot added this pull request to the merge queue Sep 21, 2024
Merged via the queue into Homebrew:master with commit f91e7c0 Sep 21, 2024
15 checks passed
@paulo-ferraz-oliveira paulo-ferraz-oliveira deleted the chore/rebar3-erlang@26 branch September 21, 2024 18:06
@@ -4,6 +4,7 @@ class Gleam < Formula
url "https://github.com/gleam-lang/gleam/archive/refs/tags/v1.5.0.tar.gz"
sha256 "0342babfbd6d8201ae00b6b0ef5e0b181bce5690c703ffae8dd02542e024c4c2"
license "Apache-2.0"
revision 1
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's this about? (for my education for potential future pull requests)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It means that pre-existing gleam installs should now be considered outdated, which avoids their getting broken when erlang gets upgraded to Erlang 27 (because pre-existing gleam installs are still configured to use the erlang formula and not erlang@26).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it.

@paulo-ferraz-oliveira
Copy link
Contributor Author

@carlocab, I wanna tackle an issue I think rebar3 (Erlang's official build tool) has, which is the following... Erlang/OTP guarantees bytecode compatibility for 3 major versions, which means that once 27 is out there's no guarantee that code from 24 will work. rebar3 maintains the same policy, which means that it is distributed as being compiled with <erlang_cur> - 2. In Homebrew it's actually compiled with the latest Erlang (not right now, but in normal circumstances it would be compiled with 27). I'm not sure of what the best strategy here is, but to increase compatibility it should be compiled with <erlang_cur> - 2.

In other words if you try to use rebar3 compiled with Erlang 27 with an Erlang 24 install (which is very possible given developers have multiple Erlang versions locally) it won't work.

Do you think this is resolvable by script? e.g. fetching as a dependency erlang@<cur-2> instead of a specific Erlang/OTP? Or should this be moved by hand?

(I can open an issue, otherwise, for follow-up)

@carlocab
Copy link
Member

Do you think this is resolvable by script? e.g. fetching as a dependency erlang@<cur-2> instead of a specific Erlang/OTP? Or should this be moved by hand?

A mix of both. See #191485.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI-published-bottle-commits The commits for the built bottles have been pushed to the PR branch. ready to merge PR can be merged once CI is green
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants