Skip to content

Commit 70e1adf

Browse files
authored
Only apply standard swift settings on valid targets (#189)
Only apply standard swift settings on valid targets. The current check ignores plugins but that is not comprehensive enough.
1 parent d9288b7 commit 70e1adf

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
@@ -135,11 +135,16 @@ for target in package.targets {
135135

136136
// --- STANDARD CROSS-REPO SETTINGS DO NOT EDIT --- //
137137
for target in package.targets {
138-
if target.type != .plugin && target.type != .system {
138+
switch target.type {
139+
case .regular, .test, .executable:
139140
var settings = target.swiftSettings ?? []
140141
// https://github.com/swiftlang/swift-evolution/blob/main/proposals/0444-member-import-visibility.md
141142
settings.append(.enableUpcomingFeature("MemberImportVisibility"))
142143
target.swiftSettings = settings
144+
case .macro, .plugin, .system, .binary:
145+
() // not applicable
146+
@unknown default:
147+
() // we don't know what to do here, do nothing
143148
}
144149
}
145150
// --- END: STANDARD CROSS-REPO SETTINGS DO NOT EDIT --- //

0 commit comments

Comments
 (0)