-
-
Notifications
You must be signed in to change notification settings - Fork 10.7k
Remove more code for Mojave and older #21016
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 PR removes legacy code related to older macOS versions that are no longer supported. The changes clean up conditional logic that was specific to macOS versions prior to Catalina (10.15), which is now the oldest allowed version according to HOMEBREW_MACOS_OLDEST_ALLOWED.
Key changes:
- Removed Xcode 2.x version detection code
- Simplified version checks by removing conditions for pre-Catalina macOS versions
- Standardized behavior across all supported macOS versions
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| Library/Homebrew/os/mac/xcode.rb | Removed Xcode 2.x version detection logic and simplified separate_header_package? to remove macOS version check |
| Library/Homebrew/extend/os/mac/hardware.rb | Simplified oldest_cpu method to return :nehalem for all non-Ventura+ versions |
| Library/Homebrew/extend/os/mac/dev-cmd/bottle.rb | Removed macOS version check in tar_args to always use modern tar flags |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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! A few questions but can self-merge if I'm wrong.
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, looks good once feedback addressed!
a7b153f to
cc1e162
Compare
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 5 out of 5 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Mike McQuaid <[email protected]>
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 5 out of 5 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
Library/Homebrew/os/mac.rb:171
- The comment describing expected results for
sdk_path_if_neededis now outdated. Sincesdk_root_needed?always returnstrueand the logic no longer checks forseparate_header_package?, cases 2-5 no longer apply. The method now always returns the SDK path (either Xcode or CLT) when either is installed. The comment should be updated to reflect the simplified behavior.
def self.sdk_path_if_needed(version = nil)
# Prefer CLT SDK when both Xcode and the CLT are installed.
# Expected results:
# 1. On Xcode-only systems, return the Xcode SDK.
# 2. On Xcode-and-CLT systems where headers are provided by the system, return nil.
# 3. On CLT-only systems with no CLT SDK, return nil.
# 4. On CLT-only systems with a CLT SDK, where headers are provided by the system, return nil.
# 5. On CLT-only systems with a CLT SDK, where headers are not provided by the system, return the CLT SDK.
return unless sdk_root_needed?
sdk_path(version)
end
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
I'll look into It is used in Homebrew/core so will need to clean up formulae first (LLVM and PostgreSQL) |
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.
Looks good, thanks!
brew stylewith your changes locally?brew typecheckwith your changes locally?brew testswith your changes locally?Remove some more code that is no longer used. This includes older macOS conditional cases and some Xcode 2 handling.
There is some other code for
separate_header_package?andprovides_sdk?which I need to check if it is safe to make alwaystrue.