Skip to content

Commit f9fb26f

Browse files
authored
Only apply standard swift settings on valid targets (#821)
Only apply standard swift settings on valid targets. The current check ignores plugins but that is not comprehensive enough.
1 parent 31122ea commit f9fb26f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Package.swift

+6-1
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,16 @@ let package = Package(
8686

8787
// --- STANDARD CROSS-REPO SETTINGS DO NOT EDIT --- //
8888
for target in package.targets {
89-
if target.type != .plugin {
89+
switch target.type {
90+
case .regular, .test, .executable:
9091
var settings = target.swiftSettings ?? []
9192
// https://github.com/swiftlang/swift-evolution/blob/main/proposals/0444-member-import-visibility.md
9293
settings.append(.enableUpcomingFeature("MemberImportVisibility"))
9394
target.swiftSettings = settings
95+
case .macro, .plugin, .system, .binary:
96+
() // not applicable
97+
@unknown default:
98+
() // we don't know what to do here, do nothing
9499
}
95100
}
96101
// --- END: STANDARD CROSS-REPO SETTINGS DO NOT EDIT --- //

0 commit comments

Comments
 (0)