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

Fix gem install with --platform flag not matching simulated platform correctly #5820

Merged
merged 1 commit into from Aug 8, 2022

Conversation

deivid-rodriguez
Copy link
Member

@deivid-rodriguez deivid-rodriguez commented Aug 6, 2022

What was the end-user or developer problem that led to this PR?

$ gem install sorbet-static -v 0.5.5460 --platform universal-darwin-19
ERROR:  Could not find a valid gem 'sorbet-static' (= 0.5.5460) in any repository
ERROR:  Possible alternatives: sorbet-static

What is your fix for the problem, implemented in this PR?

Make sure platform matching uses Gem.platforms correctly, which is what --platform modifies.

After this PR:

$ ruby -Ilib bin/gem install sorbet-static -v 0.5.5460 --platform universal-darwin-19 --backtrace
Successfully installed sorbet-static-0.5.5460-universal-darwin-19
1 gem installed

Closes #4510, the only real issue in RubyGems or Bundler reported there.

Make sure the following tasks are checked

@deivid-rodriguez deivid-rodriguez merged commit 9dcb17c into master Aug 8, 2022
@deivid-rodriguez deivid-rodriguez deleted the fix-gem-install-platform-flag branch August 8, 2022 11:24
deivid-rodriguez added a commit that referenced this pull request Aug 10, 2022
Fix `gem install` with `--platform` flag not matching simulated platform correctly

(cherry picked from commit 9dcb17c)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bundler/gem should fallback to compatible platforms (e.g. x86_64-darwin20 vs x86_64-darwin19)
1 participant