Skip to content

Commit a6e1540

Browse files
authored
Update werror for groups (Adopt SE443) (#281)
1 parent b64842c commit a6e1540

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

Package.swift

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version: 6.0
1+
// swift-tools-version: 6.1
22
// The swift-tools-version declares the minimum version of Swift required to build this package.
33

44
import Foundation
@@ -117,10 +117,17 @@ if swiftUIRenderCondition {
117117
let warningsAsErrorsCondition = envEnable("OPENSWIFTUI_WERROR", default: isXcodeEnv && development)
118118
if warningsAsErrorsCondition {
119119
// Hold off the werror feature as we can't avoid the concurrency warning.
120-
// Reenable the folllowing after swift-evolution#443 is release.
121-
120+
// Since there is no such group for diagnostic we want to ignore, we enable werror for all known groups instead.
121+
// See detail on [#443](https://github.com/swiftlang/swift-evolution/blob/main/proposals/0443-warning-control-flags.md)
122+
// items we want it to be error:
123+
// [remove_package_import]
124+
// items we want to ignore:
125+
// [error_from_clang] [error_in_future_swift_version]
122126
// sharedSwiftSettings.append(.unsafeFlags(["-warnings-as-errors"]))
123-
// sharedSwiftSettings.append(.unsafeFlags(["-Wwarning", "concurrency"]))
127+
sharedSwiftSettings.append(.unsafeFlags(["-Werror", "DeprecatedDeclaration"]))
128+
sharedSwiftSettings.append(.unsafeFlags(["-Werror", "Unsafe"]))
129+
sharedSwiftSettings.append(.unsafeFlags(["-Werror", "UnknownWarningGroup"]))
130+
sharedSwiftSettings.append(.unsafeFlags(["-Werror", "ExistentialAny"]))
124131
}
125132

126133
// MARK: - [env] OPENSWIFTUI_LIBRARY_EVOLUTION

0 commit comments

Comments
 (0)