-
-
Notifications
You must be signed in to change notification settings - Fork 10.7k
Deprecate OS::Mac.sdk_root_needed?
#21028
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
Conversation
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.
Pull Request Overview
This pull request deprecates the OS::Mac.sdk_root_needed? method, which now always returns true. The deprecation is necessary because the method is still being used in Homebrew/core.
- Marks
OS::Mac.sdk_root_needed?as deprecated while maintaining its return value oftrue - Removes conditional checks for
sdk_root_needed?throughout the codebase since it's always true - Simplifies logic in ENV setup and formula configuration by removing now-unnecessary branching
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| Library/Homebrew/os/mac.rb | Adds deprecation warning to sdk_root_needed? method and updates documentation placement |
| Library/Homebrew/extend/os/mac/formula.rb | Removes conditional check for sdk_root_needed? when setting CMake OSX sysroot |
| Library/Homebrew/extend/os/mac/extend/ENV/super.rb | Simplifies build environment setup by removing sdk_root_needed? condition |
| Library/Homebrew/extend/os/mac/extend/ENV/std.rb | Removes sdk_root_needed? checks in SDK and libxml2 configuration |
| Library/Homebrew/extend/os/mac/diagnostic.rb | Removes sdk_root_needed? check from SDK availability diagnostic |
| Library/Homebrew/test/os/mac/diagnostic_spec.rb | Updates tests to remove mocking of sdk_root_needed? method |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
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.
Pull Request Overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
Library/Homebrew/extend/os/mac/extend/ENV/std.rb:1
- Corrected spelling of 'form' to 'from' in the comment.
# typed: true # rubocop:disable Sorbet/StrictSigil
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # Some configure scripts won't find libxml2 without help. | ||
| # This is a no-op with macOS SDK 10.15.4 and later. |
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.
Do we still need this?
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.
Good question. Worth a try but also not worth blocking PR.
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 left it as I wasn't sure about our policy on macOS patch releases. I hope no one is still on those versions (10.15.0 - 10.15.3) but decided to play it safe.
MikeMcQuaid
left a comment
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.
Thanks!
brew stylewith your changes locally?brew typecheckwith your changes locally?brew testswith your changes locally?OS::Mac.sdk_root_needed?is always true now.Need deprecation as we were using it in Homebrew/core.