Swift has added a lot of language features over the years, and some of these (all?) are enabled by default when using Swift 6 language mode.
However, I struggle to find a list of all these feature flags, and for which swift versions they are (a) available as an “upcoming” feature, and (b) which versions they are enabled by default.
I’ve found these:
.enableUpcomingFeature("BareSlashRegexLiterals"),
.enableUpcomingFeature("ConciseMagicFile"),
.enableUpcomingFeature("DeprecateApplicationMain"),
.enableUpcomingFeature("DisableOutwardActorInference"),
.enableUpcomingFeature("ExistentialAny"),
.enableUpcomingFeature("ForwardTrailingClosures")
.enableUpcomingFeature("GlobalConcurrency"),
.enableUpcomingFeature("ImportObjcForwardDeclarations"),
.enableUpcomingFeature("InferSendableFromCaptures"),
.enableUpcomingFeature("InternalImportsByDefault"),
.enableUpcomingFeature("IsolatedDefaultValues"),
.enableUpcomingFeature("StrictConcurrency"),
Can I remove all of these when switching to // swift-tools-version: 6.0?
As we at some point inevitably is moving towards the next language mode Swift 7, it will become harder and harder to search for these flags, and know which ones to apply and which ones to skip.
And it seems like maybe ExistentialAny is already being pushed for a later language mode?
Is there an authoritative list such as this somewhere?