simulate-macos: use newest supported version#22248
Merged
Merged
Conversation
- `HOMEBREW_SIMULATE_MACOS_ON_LINUX=1` resolved the OS to the generic `:macos`, so `SimulateSystem.current_tag` built `x86_64_macos` / `arm64_macos` tags. - The internal JSON API only publishes per-version files (e.g. `packages.tahoe.jws.json`), so fetching `packages.x86_64_macos.jws.json` returned `404` and broke any `brew test-bot --only-tap-syntax` run on Linux. - Resolve to `HOMEBREW_MACOS_NEWEST_SUPPORTED` instead, matching what `generate-internal-api` and friends already do.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes HOMEBREW_SIMULATE_MACOS_ON_LINUX=1 so simulated macOS on Linux resolves to the newest supported versioned macOS symbol (e.g. :tahoe) rather than the generic :macos, preventing internal API requests from using a non-published tag like x86_64_macos and returning 404s.
Changes:
- Update Linux
SimulateSystem.osto returnMacOSVersion.new(HOMEBREW_MACOS_NEWEST_SUPPORTED).to_symwhen simulating macOS. - Update the corresponding RSpec expectation to match the new behavior.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| Library/Homebrew/extend/os/linux/simulate_system.rb | Uses the newest supported macOS symbol for HOMEBREW_SIMULATE_MACOS_ON_LINUX, ensuring generated tags match published internal API files. |
| Library/Homebrew/test/simulate_system_spec.rb | Adjusts the Linux simulation test to assert the newest supported macOS symbol instead of :macos. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
p-linnane
approved these changes
May 12, 2026
krehel
approved these changes
May 12, 2026
ZhongRuoyu
approved these changes
May 12, 2026
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.
HOMEBREW_SIMULATE_MACOS_ON_LINUX=1resolved the OS to the generic:macos, soSimulateSystem.current_tagbuiltx86_64_macos/arm64_macostags.packages.tahoe.jws.json), so fetchingpackages.x86_64_macos.jws.jsonreturned404and broke anybrew test-bot --only-tap-syntaxrun on Linux.HOMEBREW_MACOS_NEWEST_SUPPORTEDinstead, matching whatgenerate-internal-apiand friends already do.Fixes #22247
brew lgtm(style, typechecking and tests) with your changes locally?Claude Code Opus 4.7 xhigh with local review and testing.