Skip to content

Conversation

@cho-m
Copy link
Member

@cho-m cho-m commented Nov 11, 2025

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew typecheck with your changes locally?
  • Have you successfully run brew tests with your changes locally?

OS::Mac.sdk_root_needed? is always true now.

Need deprecation as we were using it in Homebrew/core.

Copilot AI review requested due to automatic review settings November 11, 2025 19:35
Copilot finished reviewing on behalf of cho-m November 11, 2025 19:36
Copy link
Contributor

Copilot AI left a 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 of true
  • 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.

Copilot AI review requested due to automatic review settings November 11, 2025 19:40
Copilot finished reviewing on behalf of cho-m November 11, 2025 19:41
Copy link
Contributor

Copilot AI left a 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.

Comment on lines 107 to 108
# Some configure scripts won't find libxml2 without help.
# This is a no-op with macOS SDK 10.15.4 and later.
Copy link
Member

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?

Copy link
Member

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.

Copy link
Member Author

@cho-m cho-m Nov 12, 2025

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.

Copy link
Member

@MikeMcQuaid MikeMcQuaid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@MikeMcQuaid MikeMcQuaid added this pull request to the merge queue Nov 12, 2025
Merged via the queue into main with commit c9ab462 Nov 12, 2025
44 checks passed
@MikeMcQuaid MikeMcQuaid deleted the sdk_root_needed-deprecate branch November 12, 2025 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants