Skip to content

Commit badb3dd

Browse files
committed
Update the language for 'Enabling the Swift language feature ...' warnings.
These warnings are nudging developers to adopt features before they become required. They're not just recommendations. Resolves rdar://149086651.
1 parent 41553c1 commit badb3dd

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Diff for: 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:

Diff for: 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

Diff for: Tests/SWBBuildSystemTests/SwiftDriverTests.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -4895,7 +4895,7 @@ fileprivate struct SwiftDriverTests: CoreBasedTests {
48954895
do {
48964896
let params = BuildParameters(configuration: "Debug")
48974897
try await tester.checkBuild(runDestination: .macOS, buildRequest: parameterizedBuildRequest(params)) { results in
4898-
results.checkWarnings([.contains("Enabling the Swift language feature 'DeprecateApplicationMain' is recommended; set 'SWIFT_UPCOMING_FEATURE_DEPRECATE_APPLICATION_MAIN = YES'")], failIfNotFound: true)
4898+
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)
48994899
results.checkNotes([.contains("Learn more about 'DeprecateApplicationMain' by visiting https://www.swift.org/swift-evolution/")])
49004900
results.checkNoErrors()
49014901
}

0 commit comments

Comments
 (0)