Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion Scripts/lib/xcode.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Set KEYPATH_DEV_XCODE_DEVELOPER_DIR only when intentionally validating another toolchain.

KEYPATH_STABLE_XCODE_VERSION="${KEYPATH_STABLE_XCODE_VERSION:-26.6}"
KEYPATH_STABLE_XCODE_DEVELOPER_DIR="${KEYPATH_STABLE_XCODE_DEVELOPER_DIR:-/Applications/Xcode-26.6.0.app/Contents/Developer}"
KEYPATH_STABLE_XCODE_DEVELOPER_DIR="${KEYPATH_STABLE_XCODE_DEVELOPER_DIR:-/Applications/Xcode-26.6.app/Contents/Developer}"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Update the documented stable Xcode path

Changing the default to Xcode-26.6.app leaves the canonical workflow documentation telling developers that scripts select /Applications/Xcode-26.6.0.app, even though the same instructions require the stable directory and matching literals to move together. Update that path so setup and future pin changes do not follow a stale installation contract.

AGENTS.md reference: AGENTS.md:L56-L65

Useful? React with πŸ‘Β / πŸ‘Ž.


keypath_xcode_version() {
local developer_dir="$1"
Expand Down Expand Up @@ -45,4 +45,9 @@ keypath_use_stable_xcode() {
echo "❌ Invalid Xcode developer directory: $DEVELOPER_DIR" >&2
return 1
fi

# Rust invokes the system compiler through `cc`; without an explicit SDK it
# can resolve Command Line Tools even when DEVELOPER_DIR points at Xcode.
# Keep every compiler on the same selected Xcode SDK.
export SDKROOT="$DEVELOPER_DIR/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Invalidate cached Rust artifacts when selecting the SDK

When a checkout already contains the Rust build caches, this export does not make the packaged artifacts use the selected SDK: build-kanata.sh and build-kanata-simulator.sh hash only sources, while the host-bridge fingerprint records DEVELOPER_DIR, which was already set before this change. Consequently, build-and-sign.sh can report cache hits and ship binaries previously linked through Command Line Tools; include the SDK/compiler identity or a cache-schema version in each fingerprint so this new build input forces one rebuild.

AGENTS.md reference: AGENTS.md:L56-L65

Useful? React with πŸ‘Β / πŸ‘Ž.

}
3 changes: 2 additions & 1 deletion Tests/KeyPathTests/Lint/DeploymentScriptContractTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,13 @@ final class DeploymentScriptContractTests: XCTestCase {
"Scripts/release-doctor.sh",
]

XCTAssertTrue(xcodeContract.contains("Xcode-26.6.0.app/Contents/Developer"))
XCTAssertTrue(xcodeContract.contains("Xcode-26.6.app/Contents/Developer"))
XCTAssertTrue(xcodeContract.contains(#"KEYPATH_STABLE_XCODE_VERSION="${KEYPATH_STABLE_XCODE_VERSION:-26.6}""#))
XCTAssertTrue(xcodeContract.contains("/Applications/Xcode.app/Contents/Developer"))
XCTAssertTrue(xcodeContract.contains("keypath_xcode_version"))
XCTAssertTrue(xcodeContract.contains("KEYPATH_DEV_XCODE_DEVELOPER_DIR"))
XCTAssertTrue(xcodeContract.contains("keypath_use_stable_xcode"))
XCTAssertTrue(xcodeContract.contains("export SDKROOT="))

for relativePath in consumers {
let script = try contents(of: root.appendingPathComponent(relativePath))
Expand Down
Loading