Skip to content

test:helper: pass swift-testing's macro plugin path on Command Line Tools - #30

Merged
SSFSKIM merged 1 commit into
mainfrom
fix/clt-swift-testing-plugin
Oct 5, 2026
Merged

SSFSKIM merged 1 commit into
mainfrom
fix/clt-swift-testing-plugin

Conversation

@SSFSKIM

@SSFSKIM SSFSKIM commented Oct 5, 2026

Copy link
Copy Markdown
Owner

Found by the clean-machine gate (#9) in a macOS 27.0 (26A428) VM with only the Command Line Tools 27 (Swift 6.4): npm run build:helper builds, but npm run test:helper's swift test fails to compile every test with external macro implementation type 'TestingMacros.…' could not be found … plugin for module 'TestingMacros' not found. The plugin is present at /Library/Developer/CommandLineTools/usr/lib/swift/host/plugins/testing/libTestingMacros.dylib; the default (swiftbuild) build system does not hand that directory to the compiler.

Change: when the developer directory (DEVELOPER_DIR or xcode-select -p) is the Command Line Tools and that directory exists, swift test gets -Xswiftc -plugin-path -Xswiftc <dir>. Xcode toolchains get no extra arguments (unchanged path, verified on Xcode/Swift 6.3.3 machines before).

Verified in the guest: unpatched, swift tests FAILED (node-driven 7/7 pass); patched, test:helper swift 55 tests in 5 suites passed, node 7/7. accept-native items 1 and 10 run test:helper, so the gate's acceptance run needs this on the checked-out HEAD.

On a clean macOS 27 machine with only the Command Line Tools (Swift 6.4,
swiftbuild default), swift test fails with "plugin for module
'TestingMacros' not found": the plugin ships under
usr/lib/swift/host/plugins/testing but the build does not pass it. Pass
that directory when the developer dir is the Command Line Tools; Xcode is
unchanged. Found by the clean-machine gate (#9).
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