Skip to content

Commit 3a9d8c9

Browse files
authored
Only apply standard swift settings on valid targets (#353)
Only apply standard swift settings on valid targets. The current check ignores plugins but that is not comprehensive enough.
1 parent 2dd04b0 commit 3a9d8c9

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Diff for: Package.swift

+6-1
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,16 @@ for target in package.targets {
4040

4141
// --- STANDARD CROSS-REPO SETTINGS DO NOT EDIT --- //
4242
for target in package.targets {
43-
if target.type != .plugin {
43+
switch target.type {
44+
case .regular, .test, .executable:
4445
var settings = target.swiftSettings ?? []
4546
// https://github.com/swiftlang/swift-evolution/blob/main/proposals/0444-member-import-visibility.md
4647
settings.append(.enableUpcomingFeature("MemberImportVisibility"))
4748
target.swiftSettings = settings
49+
case .macro, .plugin, .system, .binary:
50+
() // not applicable
51+
@unknown default:
52+
() // we don't know what to do here, do nothing
4853
}
4954
}
5055
// --- END: STANDARD CROSS-REPO SETTINGS DO NOT EDIT --- //

0 commit comments

Comments
 (0)