fix macOS CI Swiftly XCTest handling #923
All Vouch review confidence checks passed
Residual risk 0.16 = Change Risk (0.40) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.40 · 310 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.343
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #923"
general
weight: 0.35
ktoso
Summary
Make the macOS Swift CI job reliable: keep Swiftly for the Swift 6.3 production build and use the Xcode toolchain for both test modes.
Problem
The original job failed during Swift Build:
SwiftSyntaxMacrosTestSupport/Assertions.swift:19:16: error: no such module 'XCTest'Failed job: https://github.com/swiftlang/swift-java/actions/runs/35585778520/job/107554476812?pr=922
| | PR #921 | PR #922 |
|---|---|---|
| Result | Passed | Failed |
| macOS | 26.5.2 | 26.6.2 |
| Runner | 2.336.0 | 2.337.0 |
| Swiftly | Swift 6.3.3 | Swift 6.3.3 |
| Swift Build |
swift build --build-tests|swift build --build-tests|Both runs used the same Swiftly version and build command, but XCTest discovery behaved differently. This shows that relying on XCTest discovery from the Swiftly standalone toolchain is environment-dependent.
Changes
Install Swiftlystep.swift build --disable-sandboxPATHbefore tests so SwiftPM build plugins use the same toolchain.xcrun swift test --disable-xctestxcrun swift test --disable-experimental-swift-testingThe
Swift Buildstep no longer uses--build-tests. SwiftPM still compiles XCTest test targets when--disable-xctestis set, so both test modes use Xcode Swift to make XCTest available. The build plugin also invokesswiftthroughPATH; putting Xcode Swift first prevents it from writing a Swiftly configuration error instead ofstatic-build-config.json.Validation
no such module 'XCTest'with Swiftly 6.3.3 andswift test --disable-xctestin a small package containing XCTest and Swift Testing targets. Both Xcode test modes passed on that package.xcrun swift testinherited a Swiftly-firstPATH; verified that an Xcode-firstPATHproduces valid JSON.PATH:xcrun swift test --disable-xctestpassed 691 Swift Testing tests;xcrun swift test --disable-experimental-swift-testingpassed 117 XCTest tests (1 skipped). Gradle 9.4.0 bootstrapped successfully for the Java integration tests.