Skip to content

Fix building with Xcode 26 by leaving out the macOS 27 menu item update - #8

Merged
armartinez merged 1 commit into
try-containers:mainfrom
armartinez:fix-xcode-26-build
Nov 30, 2026
Merged

armartinez merged 1 commit into
try-containers:mainfrom
armartinez:fix-xcode-26-build

Conversation

@armartinez

Copy link
Copy Markdown
Contributor

Important

For all but trivial fixes, make sure to first create a GitHub issue that concisely describes the bug or desired enhancement as justification for the change. Large PRs with no justifying issue will be closed.

Related Issue

Closes #

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Motivation and Context

The Build job failed after #7 was merged: xcodebuild exited with code 65 while compiling the app target. The Test job passed, since it only builds ContainersCore.

The status menu's items set NSMenuItem.preferredImageVisibility, which AppKit adds in the macOS 27 SDK. #available(macOS 27, *) only decides at run time whether the line runs; the compiler still needs the property in the SDK. CI builds with Xcode 26.6, whose macOS 26 SDK doesn't have it. GitHub's macOS runners don't offer Xcode 27 yet, so CI can't move to it.

Description

  • Status menu items: setting preferredImageVisibility is now compiled only with Swift 6.4 or later (#if compiler(>=6.4)), the compiler that comes with the macOS 27 SDK in Xcode 27. Builds made with Xcode 27 still show the menu items' images on macOS 27. Builds made with Xcode 26 don't set the property, so on macOS 27 their menu items show no images.

Testing

  • Tested locally
  • Added/updated tests
  • Added/updated docs

@armartinez armartinez self-assigned this Nov 30, 2026
@armartinez
armartinez merged commit 626e3d0 into try-containers:main Nov 30, 2026
2 checks passed
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.

1 participant