Skip to content

Commit

Permalink
Only apply standard swift settings on valid targets (#31)
Browse files Browse the repository at this point in the history
Only apply standard swift settings on valid targets. The current check
ignores plugins but that is not comprehensive enough.
  • Loading branch information
rnro authored Mar 7, 2025
1 parent 0eae63b commit c52f9e7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,16 @@ let package = Package(

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

0 comments on commit c52f9e7

Please sign in to comment.