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

rebar3: enable compatibility with multiple Erlang versions #191485

Merged
merged 2 commits into from
Sep 22, 2024

Conversation

carlocab
Copy link
Member

  • 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?
  • 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?
  • Is your test running fine brew test <formula>, where <formula> is the name of the formula you're submitting?
  • 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 is designed to work with multiple versions of Erlang. However,
it can only be used with versions of Erlang that are at least as new as
the one it was built with.

To maximise compatibility with supported versions of Erlang, let's build
with erlang@25. We also adjust the install method to ensure that
we're always building with the oldest supported version of Erlang.

`rebar3` is designed to work with multiple versions of Erlang. However,
it can only be used with versions of Erlang that are at least as new as
the one it was built with.

To maximise compatibility with supported versions of Erlang, let's build
with `erlang@25`. We also adjust the `install` method to ensure that
we're always building with the oldest supported version of Erlang.
@carlocab carlocab added the ready to merge PR can be merged once CI is green label Sep 22, 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 22, 2024
@BrewTestBot BrewTestBot added this pull request to the merge queue Sep 22, 2024
Merged via the queue into master with commit 262d490 Sep 22, 2024
15 checks passed
@BrewTestBot BrewTestBot deleted the rebar3-build-erlang25 branch September 22, 2024 03:11
@paulo-ferraz-oliveira
Copy link
Contributor

@carlocab, after this I thought of a different solution. rebar3 already packages pre-compiled Erlang binaries and releases those, per version. You won't have the ./bootstrap phase, but that should be Ok, because tests will prove it's compatible with multiple arch.s

Ex.: rebar3 3.24.0 (this is the download link)

@paulo-ferraz-oliveira
Copy link
Contributor

Yeah, on the other hand you still need Erlang as a runtime dep., so maybe what we have should be enough. I'll look at it closer...

end

depends_on "erlang@25" => [:build, :test]
Copy link
Contributor

Choose a reason for hiding this comment

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

When Erlang/OTP 28 gets out will this be auto-bumped to 26?

Copy link
Contributor

Choose a reason for hiding this comment

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

Or maybe the test below is enough to know something need to be updated. Yeah, once a year is not that bad (that the Erlang major cycle)

Copy link
Member Author

Choose a reason for hiding this comment

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

When Erlang/OTP 28 gets out will this be auto-bumped to 26?

Sadly no. We could make it something like

depends_on "erlang@#{wanted_erlang_version}" => [:build, :test]

but then that doesn't work very well when we generate the package metadata that most brew users consume when they brew install things. (Most users won't have a copy of this repository checked out anymore.)

Or maybe the test below is enough to know something need to be updated. Yeah, once a year is not that bad (that the Erlang major cycle)

Yes, that's the idea.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'll try to cook something up, if time allows, where I set erlang as a runtime dependency, which it is, but download the resources from GitHub directly (pre-compiled).

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll try to cook something up, if time allows, where I set erlang as a runtime dependency, which it is, but download the resources from GitHub directly (pre-compiled).

Thanks for the offer, but we don't want to install pre-compiled stuff: https://docs.brew.sh/Acceptable-Formulae#we-dont-like-binary-formulae

Copy link
Contributor

Choose a reason for hiding this comment

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

Got it!

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