Repository navigation
[SwiftBuild] Classify swiftpm-test-runner as a tool product in SwiftBuild #779
Description
Description
Follow-up from #773.
The SwiftPM synthetic test runner is an executable, but SwiftBuild's product classification for the wasm Swift SDK flow does not currently line up with SwiftPM's expectations for com.apple.product-type.tool.swiftpm-test-runner. The minimum reproducer builds the package's umbrella test product through a command plugin and compares --build-system native with --build-system swiftbuild.
Updated minimum reproducer zip: https://gist.githubusercontent.com/kateinoigakukun/ba21c654a675032aa77906877c906e53/raw/5e90e1ee0202c4969d383ca624eb55725d9942ab/779-swiftpm-test-runner-product-type-linux-2026-06-12.zip
The updated zip preserves the original repro.sh and adds repro-linux-2026-06-12.sh, which is the same reproducer logic adapted for the Linux June 12 snapshot environment.
Expected behavior
com.apple.product-type.tool.swiftpm-test-runner should be treated as a tool/executable product for WebAssembly Swift SDK builds.
For the reproducer, SwiftBuild should surface a usable executable artifact for the synthetic RunnerReproPackageTests test runner, matching the native build-system behavior.
Actual behavior
With the June 12 snapshot and swift-DEVELOPMENT-SNAPSHOT-2026-06-12-a_wasm, the native build succeeds and completes the umbrella test product:
succeeded: true
Build of product 'RunnerReproPackageTests' complete!
The SwiftBuild path fails in the synthetic test-runner build with the original failure mode:
error: unable to find sdk 'webassembly'
error: Build failed
succeeded: false
Steps to reproduce
- Download the updated minimum reproducer zip:
https://gist.githubusercontent.com/kateinoigakukun/ba21c654a675032aa77906877c906e53/raw/5e90e1ee0202c4969d383ca624eb55725d9942ab/779-swiftpm-test-runner-product-type-linux-2026-06-12.zip - Unzip it.
- Enter the extracted
779-swiftpm-test-runner-product-typepackage directory. - Run:
./repro-linux-2026-06-12.shThe Linux runner writes native.log and swiftbuild.log. It exits 0 when the original issue reproduces and exits 1 if the issue is no longer reproducible.
The only local runner adaptations are the default toolchain path, the default Swift SDK name, and removal of the macOS-only /usr/libexec/PlistBuddy TOOLCHAINS derivation. The original repro.sh is still included unchanged.
Swift Package Manager version/commit hash
Swift Package Manager - Swift 6.5.0-dev
Swift & OS version (output of swift --version ; uname -a)
Swift version 6.5-dev (LLVM 18d2bfb70c14d89, Swift c13d82e5987aecb)
Target: x86_64-unknown-linux-gnu
Build config: +assertions
Linux swift-dev.fugu.katei.dev 6.8.0-94-generic #96-Ubuntu SMP PREEMPT_DYNAMIC Fri Jan 9 20:36:55 UTC 2026 x86_64 x86_64 x86_64 GNU/Linux
Activity
--build-system swiftbuildcompatibility issues #773[-]Classify `swiftpm-test-runner` as a tool product in SwiftBuild[/-][+][SwiftBuild] Classify `swiftpm-test-runner` as a tool product in SwiftBuild[/+]kateinoigakukun commentedon Jun 23, 2026
Minimum reproducer zip is here:
779-swiftpm-test-runner-product-type.zipHow to reproduce:
curl -L -O https://gist.githubusercontent.com/kateinoigakukun/ba21c654a675032aa77906877c906e53/raw/dd205f748b0108f4a8edc47a84d22af09a5b4f1d/779-swiftpm-test-runner-product-type.zip unzip 779-swiftpm-test-runner-product-type.zip cd 779-swiftpm-test-runner-product-type ./repro.shEnvironment used to validate these repros:
~/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2026-05-27-a.xctoolchainTOOLCHAINS=org.swift.64202605271aswift --version:Apple Swift version 6.5-dev (LLVM 8f81a64f6a8bcf6, Swift 4d0c97fa5b05711)DEVELOPMENT-SNAPSHOT-2026-05-27-a-wasm32-unknown-wasip1repro.shuses the explicit snapshot toolchain above, not the globalswiftonPATH.Observed on this environment:
--build-system native: plugin reportedsucceeded: trueandBuild of product 'RunnerReproPackageTests' complete!--build-system swiftbuild: failed in the synthetic test-runner path witherror: unable to find sdk 'webassembly'kateinoigakukun commentedon Jun 23, 2026
Verified with the attached minimum reproducer zip from the issue, using the requested June 12 snapshot.
Toolchain:
Swift SDK:
swift-DEVELOPMENT-SNAPSHOT-2026-06-12-a_wasmIssue workdir:
/workspace/swiftpm-swiftbuild-issues/swb-jskit-779/Extracted package/log dir:
/workspace/swiftpm-swiftbuild-issues/swb-jskit-779/779-swiftpm-test-runner-product-type/Local adaptation:
repro.shintact.repro-linux-2026-06-12.sh.TOOLCHAIN=/home/ubuntu/.local/share/swiftly/toolchains/main-snapshot-2026-06-12,SDK=swift-DEVELOPMENT-SNAPSHOT-2026-06-12-a_wasm, and removed the macOS-only/usr/libexec/PlistBuddyTOOLCHAINSderivation by leavingTOOLCHAINSunset. The repro logic was otherwise unchanged.Command:
Logs:
/workspace/swiftpm-swiftbuild-issues/swb-jskit-779/779-swiftpm-test-runner-product-type/repro-linux-2026-06-12.log/workspace/swiftpm-swiftbuild-issues/swb-jskit-779/779-swiftpm-test-runner-product-type/native.log/workspace/swiftpm-swiftbuild-issues/swb-jskit-779/779-swiftpm-test-runner-product-type/swiftbuild.logResult:
native:succeeded: trueandBuild of product 'RunnerReproPackageTests' complete!swiftbuild: failed with the original failure mode:Conclusion: still reproducible with the requested toolchain/SDK. Leaving this issue open.
kateinoigakukun commentedon Jun 23, 2026
swiftlang/swift-package-manager#10227