Skip to content

Commit 84076bb

Browse files
authored
Only apply standard swift settings on valid targets (#498)
Only apply standard swift settings on valid targets. The current check ignores plugins but that is not comprehensive enough.
1 parent dc299ea commit 84076bb

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
@@ -93,11 +93,16 @@ let package = Package(
9393

9494
// --- STANDARD CROSS-REPO SETTINGS DO NOT EDIT --- //
9595
for target in package.targets {
96-
if target.type != .plugin {
96+
switch target.type {
97+
case .regular, .test, .executable:
9798
var settings = target.swiftSettings ?? []
9899
// https://github.com/swiftlang/swift-evolution/blob/main/proposals/0444-member-import-visibility.md
99100
settings.append(.enableUpcomingFeature("MemberImportVisibility"))
100101
target.swiftSettings = settings
102+
case .macro, .plugin, .system, .binary:
103+
() // not applicable
104+
@unknown default:
105+
() // we don't know what to do here, do nothing
101106
}
102107
}
103108
// --- END: STANDARD CROSS-REPO SETTINGS DO NOT EDIT --- //

0 commit comments

Comments
 (0)