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 usesswift-tools-version
of6.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 theswiftLanguageModes
property ofPackage
.
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.