-
-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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
RbConfig: fix broken MacOS SDK paths #9452
Merged
mistydemeo
merged 1 commit into
Homebrew:master
from
mistydemeo:ruby_fix_up_broken_system_headers
Dec 8, 2020
Merged
RbConfig: fix broken MacOS SDK paths #9452
mistydemeo
merged 1 commit into
Homebrew:master
from
mistydemeo:ruby_fix_up_broken_system_headers
Dec 8, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Review period will end on 2020-12-08 at 18:13:04 UTC. |
d543c1f
to
6370029
Compare
6370029
to
11445e0
Compare
Review period ended. |
BrewTestBot
approved these changes
Dec 7, 2020
sjackman
added a commit
to sjackman/homebrew-bio
that referenced
this pull request
Dec 7, 2020
4 tasks
sjackman
added a commit
to brewsci/homebrew-bio
that referenced
this pull request
Dec 7, 2020
Merging. There are less-invasive fixes we can look into, but I'd rather ship this now to unblock people and deal with alternatives later, if we decide we want them. |
Opened a simpler fix in #9465 |
Thanks for the quick turnaround on this too, @mistydemeo! |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
brew style
with your changes locally?brew tests
with your changes locally?brew man
locally and committed any changes?This is ugly, but it works. 😅
This is an alternate fix for #9410. #9442 attempted to fix this by changing the macOS versions whose Rubies we consider too old, but that didn't work:
ruby.sh
has a check for the Ruby version of the firstruby
in thePATH
in the case thatHOMEBREW_MACOS_SYSTEM_RUBY_NEW_ENOUGH
is unset, and that accepted the system Ruby.That leaves us more or less two choices: updating the
brew.sh
/ruby.sh
logic to reject the system Ruby regardless of Ruby version, or ensure that the system Ruby can install gems. This PR does the latter.This inserts a shim to monkey-patch values in
RbConfig
before we run Bundler. The SDK paths that this alters are the same ones that I identified in #9410 as being faulty because they point to header paths that don't exist. Since this is only called on macOS, and it verifies that the new target paths exist before making the alterations, it should be basically pretty safe. I've tested this and it allows gems to be installed on macOS 10.15's system Ruby.I'll also look at creating a smaller PR that introduces a harder force for the vendored Ruby on 10.15.