-
-
Notifications
You must be signed in to change notification settings - Fork 12.4k
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
Conversation
`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.
🤖 An automated task has requested bottles to be published to this PR. |
@carlocab, after this I thought of a different solution. |
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] |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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).
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it!
HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>
, where<formula>
is the name of the formula you're submitting?brew test <formula>
, where<formula>
is the name of the formula you're submitting?brew audit --strict <formula>
(after doingHOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>
)? If this is a new formula, does it passbrew 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 theinstall
method to ensure thatwe're always building with the oldest supported version of Erlang.