Repository navigation
Description
Description
Follow-up from #773.
SwiftPM currently surfaces implicit executable products that exist only to satisfy build-tool plugin dependencies as if they were ordinary package products. That pollutes package product reporting and can cause aggregate destination builds to try to build host-only plugin helper executables as wasm artifacts.
The minimum reproducer targets the related command-plugin built-artifact selection path. It has a small Runner library with a test target and a DumpTests command plugin that asks SwiftPM to build the umbrella test product RunnerReproPackageTests. With SwiftBuild, that request fails while the native/control build succeeds.
Expected behavior
Internal helper executables used by plugins should remain implementation details and should not be serialized or reported as user-facing package products.
In this reproducer:
--build-system native dump-testsshould build the umbrella test product and report the built test runner artifact.--build-system swiftbuild dump-testsshould do the same, without looking for a non-existent SDK namedwebassembly.- Command plugin flows should still find the artifacts they need.
Actual behavior
Using the requested 2026-06-12 Linux snapshot and swift-DEVELOPMENT-SNAPSHOT-2026-06-12-a_wasm SDK:
--build-system nativeexits 0 and reportssucceeded: trueandBuild of product 'RunnerReproPackageTests' complete!.--build-system swiftbuildexits 1 and reports:
error: unable to find sdk 'webassembly'
error: Build failed
succeeded: false
Steps to reproduce
Download the existing minimum reproducer zip from the issue comment:
https://gist.githubusercontent.com/kateinoigakukun/ba21c654a675032aa77906877c906e53/raw/49009ab10eede7013f079a9efc54114912dd589b/775-plugin-product-reporting.zip
Then run:
unzip 775-plugin-product-reporting.zip
cd 775-plugin-product-reporting
env \
TOOLCHAIN=/home/ubuntu/.local/share/swiftly/toolchains/main-snapshot-2026-06-12 \
TOOLCHAINS=/home/ubuntu/.local/share/swiftly/toolchains/main-snapshot-2026-06-12 \
SWIFT_SDK_ID=swift-DEVELOPMENT-SNAPSHOT-2026-06-12-a_wasm \
bash ./repro.shThe script itself was not edited for the Linux verification. The environment overrides select the requested Linux Swift toolchain and SDK instead of the script's macOS/2026-05-27 defaults.
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[-]Exclude implicit executable plugin tools from package product reporting in SwiftPM[/-][+][SwiftBuild] Exclude implicit executable plugin tools from package product reporting in SwiftPM[/+]kateinoigakukun commentedon Jun 23, 2026
Minimum reproducer zip is here:
775-plugin-product-reporting.zipHow to reproduce:
curl -L -O https://gist.githubusercontent.com/kateinoigakukun/ba21c654a675032aa77906877c906e53/raw/49009ab10eede7013f079a9efc54114912dd589b/775-plugin-product-reporting.zip unzip 775-plugin-product-reporting.zip cd 775-plugin-product-reporting ./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 on the same request witherror: unable to find sdk 'webassembly'kateinoigakukun commentedon Jun 23, 2026
Verification with the minimum reproducer from the gist zip:
/workspace/swiftpm-swiftbuild-issues/swb-jskit-775/775-plugin-product-reporting/home/ubuntu/.local/share/swiftly/toolchains/main-snapshot-2026-06-12/usr/bin/swiftSwift version 6.5-dev (LLVM 18d2bfb70c14d89, Swift c13d82e5987aecb), targetx86_64-unknown-linux-gnuswift-DEVELOPMENT-SNAPSHOT-2026-06-12-a_wasmrepro.sh; no script editsTOOLCHAIN=/home/ubuntu/.local/share/swiftly/toolchains/main-snapshot-2026-06-12,TOOLCHAINS=/home/ubuntu/.local/share/swiftly/toolchains/main-snapshot-2026-06-12, andSWIFT_SDK_ID=swift-DEVELOPMENT-SNAPSHOT-2026-06-12-a_wasmso the macOS hardcoded default toolchain/SDK in the script would use the requested Linux snapshot and SDK.Command run:
Result:
succeeded: true;Build of product 'RunnerReproPackageTests' complete!succeeded: falseConclusion: still reproducible with the requested 2026-06-12 Linux snapshot and
swift-DEVELOPMENT-SNAPSHOT-2026-06-12-a_wasm. Leaving this issue open.Logs:
repro.lognative.logswiftbuild.logadaptation-notes.mdkateinoigakukun commentedon Jun 23, 2026
swiftlang/swift-package-manager#10223