-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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 musl platform not being added to the lockfile #7441
Conversation
end | ||
end | ||
|
||
it "does not add current platform if there's a more specific one already locked" do |
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 looks like a less specific platform is locked?
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.
Yeah, I did not explain this case correctly. In order to avoid too many platforms from being locked (case of x86_64-darwin-18
, x86_64-darwin-19
, x86_64-darwin-20
, etc), I made it so that if one of the resolved platforms (say, x86_64-darwin
) is compatible with the current platform but less specific, then we we'll keep that and don't add the current specific platform. I will reword it to make it clear!
1f1579c
to
0bfabf5
Compare
0bfabf5
to
235f7b4
Compare
@deivid-rodriguez Thanks so much for fixing this! ❤️ |
This comment was marked as spam.
This comment was marked as spam.
Fix musl platform not being added to the lockfile (cherry picked from commit 10ac625)
What was the end-user or developer problem that led to this PR?
Since Bundler 2.5.0, we automatically lock all possible "RUBY" platforms (not windows, not java) where the resolve we found for the current platform is also valid.
I added some code though to avoid locking too many platforms in darwin, where no platform specific gems for each darwin version are release, so it's enough to lock
x86_64-darwin
rather than the exact running platform (things likex86_64-darwin-19
).However, this code had a bug where the current platform would also be incorrectly removed when it's
x86_64-linux-musl
.What is your fix for the problem, implemented in this PR?
Musl support in RubyGems introduced an exception in
Gem::Platform#===
commutativity and turns out the order should be the opposite to the one I was using to not get this case wrong.Fixes #7432.
Make sure the following tasks are checked