Skip to content

Commit cd8cac4

Browse files
rnrosimonjbeaumont
andauthored
Only apply standard swift settings on valid targets (#1186)
Co-authored-by: Si Beaumont <simonjbeaumont@gmail.com>
1 parent 2d36ccb commit cd8cac4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Package.swift

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,11 +280,16 @@ var package = Package(
280280

281281
// --- STANDARD CROSS-REPO SETTINGS DO NOT EDIT --- //
282282
for target in package.targets {
283-
if target.type != .plugin {
283+
switch target.type {
284+
case .regular, .test, .executable:
284285
var settings = target.swiftSettings ?? []
285286
// https://github.com/swiftlang/swift-evolution/blob/main/proposals/0444-member-import-visibility.md
286287
settings.append(.enableUpcomingFeature("MemberImportVisibility"))
287288
target.swiftSettings = settings
289+
case .macro, .plugin, .system, .binary:
290+
() // not applicable
291+
@unknown default:
292+
() // we don't know what to do here, do nothing
288293
}
289294
}
290295
// --- END: STANDARD CROSS-REPO SETTINGS DO NOT EDIT --- //

0 commit comments

Comments
 (0)