-
Notifications
You must be signed in to change notification settings - Fork 44
Description
Describe the bug
A SPM project with swift-subprocess (main branch or 0.1) failed to run "swift test".
https://github.com/ainame/swift-subprocess-fails-to-run-testing/
% swift test
[1/1] Planning build
Building for debugging...
[25/25] Compiling Subprocess Thread.swift
Build complete! (2.23s)
Test Suite 'All tests' started at 2025-09-20 01:16:02.008.
Test Suite 'All tests' passed at 2025-09-20 01:16:02.009.
Executed 0 tests, with 0 failures (0 unexpected) in 0.000 (0.001) seconds
swiftpm_testing_helper/Entrypoint.swift:34: Fatal error: Failed to open test bundle at path /Users/ainame/ghq/github.com/ainame/swift-6.2-test/.build/arm64-apple-macosx/debug/swift-6.2-testPackageTests.xctest/Contents/MacOS/swift-6.2-testPackageTests: dlopen(/Users/ainame/ghq/github.com/ainame/swift-6.2-test/.build/arm64-apple-macosx/debug/swift-6.2-testPackageTests.xctest/Contents/MacOS/swift-6.2-testPackageTests, 0x0101): Library not loaded: @rpath/libswiftCompatibilitySpan.dylib
Referenced from: <FACAF584-A249-3974-818B-3974660C3121> /Users/ainame/ghq/github.com/ainame/swift-6.2-test/.build/arm64-apple-macosx/debug/swift-6.2-testPackageTests.xctest/Contents/MacOS/swift-6.2-testPackageTests
Reason: tried: '/Users/ainame/Library/Developer/Toolchains/swift-6.2-RELEASE.xctoolchain/usr/lib/swift/macosx/testing/libswiftCompatibilitySpan.dylib' (no such file), '/Applications/Xcode-26.0.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib/libswiftCompatibilitySpan.dylib' (no such file), '/Users/ainame/ghq/github.com/ainame/swift-6.2-test/.build/arm64-apple-macosx/debug/swift-6.2-testPackageTests.xctest/Contents/MacOS/../../../libswiftCompatibilitySpan.dylib' (no such file), '/Users/ainame/ghq/github.com/ainame/swift-6.2-test/.build/arm64-apple-macosx/debug/swift-6.2-testPackageTests.xctest/Contents/MacOS/../../../libswiftCompatibilitySpan.dylib' (no such file), '/Users/ainame/Library/Developer/Toolchains/swift-6.2-RELEASE.xctoolchain/usr/libexec/swift/lib/libswiftCompatibilitySpan.dylib' (no such file), '/Users/ainame/Library/Developer/Toolchains/swift-6.2-RELEASE.xctoolchain/usr/libexec/swift/lib/libswiftCompatibilitySpan.dylib' (no such file)
error: Exited with unexpected signal code 5
It looks like it tried to dlopen
/Users/xxx/Library/Developer/Toolchains/swift-6.2-RELEASE.xctoolchain/usr/lib/swift/macosx/testing/libswiftCompatibilitySpan.dylib
but libswiftCompatibilitySpan.dylib
only exists at /Users/xxx/Library/Developer/Toolchains/swift-6.2-RELEASE.xctoolchain/usr/lib/swift/macosx/libswiftCompatibilitySpan.dylib
(/testing
directory was redundant)
I don't know if this is swift-subprocess's issue or toolchains issue.
To Reproduce
Steps to reproduce the behavior:
- Prepare macOS 26 and Swiftly
- Install 6.2 toolchain
- Check out this minimum reproducible project https://github.com/ainame/swift-subprocess-fails-to-run-testing/
- Run "swift test"
Expected behavior
"swift test" should succeed to run with Swiftly toolchain.
Environment (please complete the following information):
- macOS 26
- swiftly 1.0.1
- swift-6.2-RELEASE toolchains
% swift --version
Apple Swift version 6.2 (swift-6.2-RELEASE)
Target: arm64-apple-macosx26.0
Build config: +assertions
Additional context
Add any other context about the problem here.