[Bug] “DependenciesTestObserver” fails to build with the Swift 6.0 musl-based static SDK #341
Replies: 4 comments
-
@Andrewangeta Can you attach a project that reproduces the issue for easier debugging? |
Beta Was this translation helpful? Give feedback.
-
@stephencelis For some reason GitHub won't let me upload the zip file no matter what I do. |
Beta Was this translation helpful? Give feedback.
-
@stephencelis |
Beta Was this translation helpful? Give feedback.
-
@Andrewangeta Thanks for the repro! I've troubleshot a bit with a I get past the import errors, but get more general linker errors:
I'm going to convert this to a discussion for now, and we're open to solutions to these issues if it's possible to solve in our repo, but it's unclear if this is a bug with Dependencies or something else. |
Beta Was this translation helpful? Give feedback.
-
Description
Overview
When building swift-dependencies on a musl-based Linux environment (i.e., using the Swift Static Linux SDK for full static linking), we encounter build failures around
DependenciesTestObserver
andXCTest
. The new static SDK includes a musl variant(--swift-sdk x86_64-swift-linux-musl)
, but references to XCTest (and dynamic linking logic) in DependenciesTestObserver cause compile errors:no such module 'XCTest'
andGenerally the guides suggest adding the import conditional vs os check
But I'm unclear of all the context of the runtime checks in those utilities and the package manifest conditionals as well.
Checklist
main
branch of this package.Expected behavior
Successful compilation
Actual behavior
Failed compilation
Steps to reproduce
docker build -t dependencies-musl-test .
Dependencies version information
1.6.3
Destination operating system
linux
Xcode version information
16.2
Swift Compiler version information
Beta Was this translation helpful? Give feedback.
All reactions