Skip to content

Commit 0810d2c

Browse files
authored
Update the language for 'Enabling the Swift language feature ...' warnings. (#405)
These warnings are nudging developers to adopt features before they become required. They're not just recommendations. Resolves rdar://149086651.
1 parent be3cd5a commit 0810d2c

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Sources/SWBCore/SpecImplementations/Tools/SwiftCompiler.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1490,7 +1490,7 @@ public final class SwiftCompilerSpec : CompilerSpec, SpecIdentifierType, SwiftDi
14901490

14911491
switch feature.level {
14921492
case .warn:
1493-
delegate.warning("Enabling the Swift language feature '\(identifier)' is recommended; \(supplementaryMessage)")
1493+
delegate.warning("Enabling the Swift language feature '\(identifier)' will become a requirement in the future; \(supplementaryMessage)")
14941494
case .error:
14951495
delegate.error("Enabling the Swift language feature '\(identifier)' is required; \(supplementaryMessage)")
14961496
case .ignore:

Sources/SWBTestSupport/DiagnosticsCheckingResult.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ package func _filterDiagnostic(message: String) -> String? {
202202
return nil
203203
}
204204

205-
if message.hasPrefix("Enabling the Swift language feature 'MemberImportVisibility' is recommended") {
205+
if message.hasPrefix("Enabling the Swift language feature 'MemberImportVisibility' will become a requirement in the future") {
206206
return nil
207207
}
208208

Tests/SWBBuildSystemTests/SwiftDriverTests.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -4879,7 +4879,7 @@ fileprivate struct SwiftDriverTests: CoreBasedTests {
48794879
do {
48804880
let params = BuildParameters(configuration: "Debug")
48814881
try await tester.checkBuild(runDestination: .macOS, buildRequest: parameterizedBuildRequest(params)) { results in
4882-
results.checkWarnings([.contains("Enabling the Swift language feature 'DeprecateApplicationMain' is recommended; set 'SWIFT_UPCOMING_FEATURE_DEPRECATE_APPLICATION_MAIN = YES'")], failIfNotFound: true)
4882+
results.checkWarnings([.contains("Enabling the Swift language feature 'DeprecateApplicationMain' will become a requirement in the future; set 'SWIFT_UPCOMING_FEATURE_DEPRECATE_APPLICATION_MAIN = YES'")], failIfNotFound: true)
48834883
results.checkNotes([.contains("Learn more about 'DeprecateApplicationMain' by visiting https://www.swift.org/swift-evolution/")])
48844884
results.checkNoErrors()
48854885
}

0 commit comments

Comments
 (0)