-
Notifications
You must be signed in to change notification settings - Fork 53
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
Fix version ranges for non-semver #34
Fix version ranges for non-semver #34
Conversation
Hm...
Some might say Thoughts on how to solve this? Edit: I tried update |
Lets try with |
.github/workflows/test.yml
Outdated
@@ -98,6 +98,10 @@ jobs: | |||
otp-version: '23' | |||
rebar3-version: '3.14' | |||
os: 'ubuntu-20.04' | |||
- elixir-version: 'v1.12' | |||
otp-version: '24.0' |
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.
This appears to not be the best option. Waiting for input.
Moving from Draft, for visibility. Not merge-ready yet. |
OTP 24 is not available because Bob has not built it yet. There seems to be a regression in OTP 24 that causes the compilation to fail. |
It seems it only fails for Docker images, so the issue is unrelated. |
@ericmj, I've tracked it down to this being a
I'd prefer to not fiddle with our code, since its assumptions are correct, and either find an alternative to |
Bug opened: npm/node-semver#382. |
I don't believe it's a bug in the semver package but rather that OTP versions are not semver. We could try to convert Personally I don't think we should support version ranges because CI should be reproducible and automatically updating versions are not reproducible but I guess we need to maintain the backwards compatibility. Did this work before the |
Understandable, yes; that it won't/shouldn't accept it... I'm still waiting for a reply to the issue.
Agree almost completely; this is from the "
That's the main issue I have with the ranges (non-reproducibility). At the same time, some will use branches in their dependencies, which also break this promise, but on our end, not supporting ranges could be an extra safety net.
We don't need to. As per semver we just go 2.x (and add some kind of release note) and that's it 😄
Most surely not, as per https://github.com/actions/setup-elixir/blob/main/src/setup-elixir.js#L104, which was left untouched, algo-wise. |
I find that Mind you I changed the Edit: breaks for e.g. |
I've squash-rebased all of this. Waiting for approval and merging... |
@@ -184,7 +184,10 @@ async function getOTPVersions(osVersion) { | |||
.forEach((line) => { | |||
const otpMatch = line.match(/^(OTP-)?([^ ]+)/) | |||
|
|||
const otpVersion = otpMatch[2] | |||
let otpVersion = otpMatch[2] | |||
if (semver.validRange(otpVersion)) { |
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.
@starbelly, @ericmj, @wojtekmach, could I ask your 👀 on this so we can merge it and ship 1.7.1? I'd want to pull this to a couple of repo.s, already. Thanks much.
If you have a better, even less verbose for example, "fix", do tell. I'd like to potentially consider dropping the ver-ranges, but not in this pull request.
I pushed some more tests for the newly introduced code based on no-longer maintained versions (so it won't easily break in a near future). |
This is an attempt at trying to understand why OTP 24 is not available yet. Opening as a draft as most likely this investigation will result is a closed-unmerged branch.