Crowd source: Swift Language Modes in various environments

Ah, I see what's going on.

Basically, there's more than one way to opt-in to the Swift 6 language mode, and you've done so without knowing it, as detailed in "Enabling The Swift 6 Language Mode"

A Package.swift file that uses swift-tools-version of 6.0 will enable the Swift 6 language mode for all targets. You can still set the language mode for the package as a whole using the swiftLanguageModes property of Package.

This is why you have to opt your target back out of the Swift 6 language mode in your package manifest. You can instead downgrade the minimum tools version.

2 Likes