SwiftPackageIndex-Server: Failure to build a package if its `swift-tools-version` is 6.0
Please describe the bug
My UIElements package (at https://github.com/noeticgarden/uielements) failed to build in SPI despite building correctly at-desk and in internal CI. It appears that some build flags are trying to force on Swift 6 features, which are already on for Swift 6.
The tag that triggered the problem is 0.1.0, at: https://github.com/noeticgarden/uielements/tree/0.1.0. The builds of that tag (like e.g. https://swiftpackageindex.com/builds/2CEA997C-68C3-4696-8E81-118838919CC1) all have the following errors:
<unknown>:0: error: upcoming feature 'StrictConcurrency' is already enabled as of Swift version 6
<unknown>:0: error: upcoming feature 'DisableOutwardActorInference' is already enabled as of Swift version 6
<unknown>:0: error: upcoming feature 'GlobalActorIsolatedTypesUsability' is already enabled as of Swift version 6
<unknown>:0: error: upcoming feature 'InferSendableFromCaptures' is already enabled as of Swift version 6
Explain the steps needed to reproduce the bug
- Attempt to build or update https://github.com/noeticgarden/uielements/tree/0.1.0 on SPI.
What was the expected behaviour?
The project should build correctly and without forcing the indicated flags, since they are already on for that package.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 1
- Comments: 15 (13 by maintainers)
I have a fix for this but I still need to clean some things up. Should go live tomorrow and then I’ll see how I can identify affected builds and retrigger them.
Fixed and deployed as builder 4.58.3, affected builds re-triggered.
Ugh yes. You cannot unconditionally apply these to packages which use 6.0 tools…
Not that this helps right now, but: https://forums.swift.org/t/downgrade-upcoming-feature-is-already-enabled-error-to-a-warning/75762