I am using swift-subprocess, and need to disable the SubprocessSpan trait because Xcode 26.2 does not ship with a bundled version libswiftCompatibilitySpan.dylib, causing everything to crash built with Xcode that happens to use Span. However, I cannot disable that trait by doing any of the following things:
.package(
url: "https://github.com/swiftlang/swift-subprocess.git",
branch: "main",
traits: []
),
.package(
url: "https://github.com/swiftlang/swift-subprocess.git",
branch: "main",
traits: [.trait(name: "SubprocessFoundation")]
),
Note that SubprocessSpan is default trait in subprocess:
// Enable SubprocessFoundation by default
var defaultTraits: Set<String> = ["SubprocessFoundation"]
#if compiler(>=6.2)
// Enable SubprocessSpan when Span is available [except it is not]
defaultTraits.insert("SubprocessSpan")
#endif
The package still builds with the SubprocessSpan enabled. This is not an issue with the subprocess package. According to this, I should use swift build on the command line, yet this isn't -- as is upgrading to Tahoe -- an option because I need Xcode previews for SwiftUI.
Help, what do I do now (other than downloading a toolchain) from swift.org)?