Skip to content

simulate-macos: use newest supported version#22248

Merged
MikeMcQuaid merged 1 commit into
mainfrom
simulate-macos-on-linux-newest
May 12, 2026
Merged

simulate-macos: use newest supported version#22248
MikeMcQuaid merged 1 commit into
mainfrom
simulate-macos-on-linux-newest

Conversation

@MikeMcQuaid
Copy link
Copy Markdown
Member

  • 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.

Fixes #22247


  • 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? Performance claims (e.g. "this is faster") must include Hyperfine benchmarks.
  • Have you written new tests (excluding integration tests) for your changes? Here's an example.
  • Have you successfully run brew lgtm (style, typechecking and tests) with your changes locally?

  • AI was used to generate or assist with generating this PR. Please specify below how you used AI to help you, and what steps you have taken to manually verify the changes. Non-maintainers may only have one AI-assisted/generated PR open at a time.

Claude Code Opus 4.7 xhigh with local review and testing.


- `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.
Copilot AI review requested due to automatic review settings May 12, 2026 13:50
Copy link
Copy Markdown
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 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.os to return MacOSVersion.new(HOMEBREW_MACOS_NEWEST_SUPPORTED).to_sym when 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.

@MikeMcQuaid MikeMcQuaid enabled auto-merge May 12, 2026 14:11
@MikeMcQuaid MikeMcQuaid added this pull request to the merge queue May 12, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks May 12, 2026
@MikeMcQuaid MikeMcQuaid added this pull request to the merge queue May 12, 2026
Merged via the queue into main with commit 58936aa May 12, 2026
41 checks passed
@MikeMcQuaid MikeMcQuaid deleted the simulate-macos-on-linux-newest branch May 12, 2026 14:50
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.

brew commands fail with 404 on internal API

5 participants