Repository navigation
Infer Xcode 26.x versions from clang builds - #24178
Merged
Merged
Conversation
Signed-off-by: Patrick Linnane <patrick@linnane.io>
Contributor
There was a problem hiding this comment.
Copilot review overview
馃煝 Approval recommended
No unresolved review issues were identified.
Review effort: Lite
Findings: None
What changed in this PR
Updates Xcode version inference to use full Apple Clang build identifiers, distinguishing Xcode 26.4, 26.6, and 27.
Changes:
- Passes full Clang build information through detection.
- Maps builds to the corresponding Xcode versions.
- Adds coverage for relevant CLT builds.
| File | Description |
|---|---|
Library/鈥婬omebrew/鈥媡est/鈥媜s/鈥媘ac/鈥媥code_spec.rb |
Tests compiler-build mappings. |
Library/鈥婬omebrew/鈥媜s/鈥媘ac/鈥媥code.rb |
Infers Xcode versions from full Clang builds. |
馃挕 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
carlocab
approved these changes
Oct 6, 2026
Member
|
@p-linnane Thanks! We should probably think about this "Xcode detected from Clang version" logic; maybe we can remove it entirely in favour of just using Xcode and CLT versions now? |
7 of 8 tasks
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
With only the Command Line Tools installed,
MacOS::Xcode.versionis inferred from clang. Xcode 26.4 to 26.6 and 27 all report clang 21.0.0, so CLT 26.4 to 26.6 installs were reported as Xcode 27.0, including on Intel where Xcode 27 isn't available. That value ends up asbuilt_on.xcodein install receipts and SBOMs.The full clang build does differ:
2100.0.xfor 26.4,2100.1.xfor 26.5 and 26.6 and2100.3.xfor 27. Pass it through and map it to the newest matching Xcode, as the existing table does, so 26.5 and 26.6 both map to 26.6.DevelopmentTools.clang_build_versionis unchanged.I checked the CLT 26.5 and 26.6 packages from Apple's Software Update catalog (both
clang-2100.1.1.101) and an installed CLT 27.0 (clang-2100.3.34.2). CLT 26.4.1 is no longer in the catalog, so2100.0.xrelies on Xcode 26.4.1'sclang-2100.0.123.102.brew benchmarkresults.brewcommands to reproduce the bug?brew lgtm(style, typechecking and tests) locally?Claude Code (Opus 5.5) drafted the implementation and tests and GPT-6 Astra reviewed them; I reviewed the diff, verified the new tests fail without the change and pass with it, and ran
brew lgtm --onlineplus targeted specs.