Skip to content

Commit c37bf5e

Browse files
authored
Allow staging in new BuildSettings.Declaration cases without introducing failures (#8724)
Until we get https://github.com/swiftlang/swift-evolution/blob/main/proposals/0487-extensible-enums.md or a similar mechanism, add some redundant default clauses so that changes like swiftlang/swift-build#526 can be staged in without revlock.
1 parent 1d9f2b9 commit c37bf5e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Sources/SwiftBuildSupport/PackagePIFBuilder+Helpers.swift

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -902,6 +902,9 @@ extension ProjectModel.BuildSettings {
902902

903903
case .ARCHS, .IPHONEOS_DEPLOYMENT_TARGET, .SPECIALIZATION_SDK_OPTIONS:
904904
fatalError("Unexpected BuildSettings.Declaration: \(setting)")
905+
// Allow staging in new cases
906+
default:
907+
fatalError("Unhandled enum case in BuildSettings.Declaration. Will generate a warning until we have SE-0487")
905908
}
906909
} else {
907910
switch setting {
@@ -921,6 +924,9 @@ extension ProjectModel.BuildSettings {
921924

922925
case .ARCHS, .IPHONEOS_DEPLOYMENT_TARGET, .SPECIALIZATION_SDK_OPTIONS:
923926
fatalError("Unexpected BuildSettings.Declaration: \(setting)")
927+
// Allow staging in new cases
928+
default:
929+
fatalError("Unhandled enum case in BuildSettings.Declaration. Will generate a warning until we have SE-0487")
924930
}
925931
}
926932
}
@@ -949,6 +955,9 @@ extension ProjectModel.BuildSettings.MultipleValueSetting {
949955
self = .SWIFT_ACTIVE_COMPILATION_CONDITIONS
950956
case .ARCHS, .IPHONEOS_DEPLOYMENT_TARGET, .SWIFT_VERSION:
951957
return nil
958+
// Allow staging in new cases
959+
default:
960+
fatalError("Unhandled enum case in BuildSettings.Declaration. Will generate a warning until we have SE-0487")
952961
}
953962
}
954963
}

0 commit comments

Comments
 (0)