Don't flag newer CLT releases as outdated #24314

Merged
p-linnane opened 10:27am on October 21, 2026 wanted to merge 27 Ξ” into homebrew/brew main from
clt-newer-release-guard
Diff Delta:
27
About 43 Diff Delta/hour
Classified as:  General

p-linnane's Description of Work

MacOS::CLT.outdated? only compared clang build numbers, but Apple's builds can go backwards between releases: the Command Line Tools 27.2 package (27.2.0.0.1792148227) ships clang 2100.3.34.1, below the 2100.3.34.2 in 27.0, so brew doctor on macOS 27 said a newer release was available and recommended downloading 27.0. A package receipt whose release is newer than MacOS::CLT.latest_version is now treated as current; otherwise the clang check still runs, so a receipt for the recommended release with an older compiler and installations without a receipt are still reported.



  • [x] Have you followed our Contributing guidelines?

  • [x] Have you checked for other open Pull Requests for the same change?

  • [x] Have you explained what your changes do? Performance claims (e.g. "this is faster") must include brew benchmark results.

  • [x] Have you explained why you'd like these changes included, not just what they do?

  • [ ] For bug fixes, have you given step-by-step brew commands to reproduce the bug?

  • [x] Have you written new tests (excluding integration tests)? Here's an example.

  • [x] Have you successfully run brew lgtm (style, typechecking and tests) locally?



  • [x] I did not use AI/LLM to create this PR, or I disclosed the tool/model below and reviewed its output; I did not attribute commits to AI and will answer maintainer questions and review comments myself without AI/LLM.

Codex (GPT-6 Astra) wrote the change and tests, checked that the new examples fail without the change, compared brew doctor output before and after on an affected macOS 27 machine and ran brew lgtm. Claude Code (Opus 5.5) reviewed it, suggested the older-release example after finding that replacing > with != still passed every example, checked the final examples against that and other mutations of the guard and confirmed that the patched MacOS::CLT.outdated? returns false on the same machine.


2 total changed files
Loading changes...
PR terminus reached:
All files reviewed β€” nice work, champ! πŸ’ͺ