docs/Xcode.md
This page is a maintainer runbook for updating Homebrew when Apple releases Xcode or the Command Line Tools. Users looking for installation requirements should read Installation.
Homebrew supports the current Xcode and Command Line Tools versions appropriate for each supported macOS release.
The authoritative version mappings and diagnostic messages are implemented in Library/Homebrew/os/mac/xcode.rb.
Do not copy a current Xcode version into other documentation. Link to the implementation or supported-platform documentation so the value has one maintained source.
When Apple publishes a new Xcode or Command Line Tools release:
OS::Mac::Xcode.latest_version when the latest Xcode mapping changes.OS::Mac::CLT.latest_clang_version when the Command Line Tools compiler mapping changes.OS::Mac::Xcode.detect_version_from_clang_version when Homebrew must infer a new Xcode version from Apple Clang.brew config and the relevant brew doctor output on an affected macOS runner when one is available.Run the repository checks from the Homebrew/brew checkout:
./bin/brew typecheck
./bin/brew style --fix Library/Homebrew/os/mac/xcode.rb
./bin/brew tests --changed
Use ./bin/brew lgtm --online before committing the complete change.