Skip to content

[SwiftBuild] Classify swiftpm-test-runner as a tool product in SwiftBuild #779

Description

@kateinoigakukun

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

  1. 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
  2. Unzip it.
  3. Enter the extracted 779-swiftpm-test-runner-product-type package directory.
  4. Run:
./repro-linux-2026-06-12.sh

The 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions