You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: proposals/nnnn-formalize-language-mode-terminology.md
+8-4Lines changed: 8 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -99,7 +99,7 @@ The `-swift-version` option will continue to work as it currently does, preservi
99
99
100
100
The `-language-mode` option will be presented in the compiler help.
101
101
102
-
The `-swift-version` option will likely be suppressed from the top-level help of the compiler. More investigation is needed on the details of this.
102
+
The `-swift-version` option will be suppressed from the top-level help of the compiler.
103
103
104
104
### Swift Package Manager
105
105
Proposed Swift Package Manager API changes are limited to manifests \>=6.0:
@@ -174,7 +174,7 @@ For 6.0 and later, that access will be a warning with a fix-it to use the new pr
174
174
See the **Source compatibility** section for more details about this change.
175
175
176
176
### Rename `SwiftVersion` enum to `SwiftLanguageMode`
177
-
Rename the existing `SwiftVersion` enum to `SwiftLanguageMode` with `SwiftVersion` added back as a type alias for backwards compatibility.
177
+
Rename the existing `SwiftVersion` enum to `SwiftLanguageMode` with `SwiftVersion` added back as a type alias for backwards compatibility. The type alias will be deprecated in 6.0 with a `renamed` annotation to `SwiftLanguageMode`.
178
178
179
179
This change will not affect serialization of PackageDescription types. Serialization is handled by converting PackageDescription types into separate, corresponding Codable types. The existing serialization types will remain as-is.
180
180
@@ -193,7 +193,7 @@ public struct SwiftSetting {
193
193
)
194
194
```
195
195
196
-
The name of the function is `swiftLanguageMode()` instead of `languageMode()` to keep naming consistent with the `swiftLanguageModes` parameter of the Package init method. The parameter label `mode` is used to follow the precedent set by `interoperabilityMode()` in `SwiftSetting`.
196
+
The name of the function is `swiftLanguageMode()` instead of `languageMode()` to keep naming consistent with the `swiftLanguageModes` parameter of the Package init method. The parameter label `mode` is used to follow the precedent set by the existing `interoperabilityMode()` method in `SwiftSetting`.
197
197
198
198
Deprecate the `swiftLanguageVersion()` setting added by SE-0435 with a `renamed` annotation to provide a fix-it for developers who have adopted this API in pre-release versions of Swift 6.0.:
199
199
@@ -220,7 +220,11 @@ Because the obsoleted `init` method is annotated as `renamed` the compiler will
220
220
221
221
Renaming the public `swiftLanguageVersions` property of `Package` preserves backwards compatibility by introducing a computed property with that name. The computed property will be marked as `deprecated` in 6.0 and annotated as `renamed` to provide a fix-it.
222
222
223
-
Searching manifest files in public repositories suggests that accessing the `swiftLanguageVersions` property directly is not common. Making both breaking changes at once results in applying at most two fix-its to a manifest file instead of one.
223
+
Searching manifest files in public repositories suggests that accessing the `swiftLanguageVersions` property directly is not common.
224
+
225
+
The `SwiftVersion` type alias will be deprecated in favor of the `SwiftLanguageMode` enum. This also will provide a fix-it.
226
+
227
+
Finally the `swiftLanguageVersion()` method in `SwiftSetting` added as part of SE-0435 will be deprecated in favor of the `swiftLanguageMode()` method with a fix-it.
0 commit comments