Skip to content

Commit 02a6f6e

Browse files
authored
Enable MemberImportVisibility check on all targets (#107)
Enable MemberImportVisibility check on all targets. Use a standard string header and footer to bracket the new block for ease of updating in the future with scripts.
1 parent 4534a63 commit 02a6f6e

File tree

5 files changed

+21
-0
lines changed

5 files changed

+21
-0
lines changed

Package.swift

+11
Original file line numberDiff line numberDiff line change
@@ -154,3 +154,14 @@ var package = Package(
154154

155155
cxxLanguageStandard: .cxx11
156156
)
157+
158+
// --- STANDARD CROSS-REPO SETTINGS DO NOT EDIT --- //
159+
for target in package.targets {
160+
if target.type != .plugin {
161+
var settings = target.swiftSettings ?? []
162+
// https://github.com/swiftlang/swift-evolution/blob/main/proposals/0444-member-import-visibility.md
163+
settings.append(.enableUpcomingFeature("MemberImportVisibility"))
164+
target.swiftSettings = settings
165+
}
166+
}
167+
// --- END: STANDARD CROSS-REPO SETTINGS DO NOT EDIT --- //

Sources/SWIM/SWIMInstance.swift

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
//===----------------------------------------------------------------------===//
1414

1515
import ClusterMembership
16+
import CoreMetrics
1617
import Logging
1718

1819
import struct Dispatch.DispatchTime

Sources/SWIMNIOExample/SWIMNIOHandler.swift

+7
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,20 @@
1313
//===----------------------------------------------------------------------===//
1414

1515
import ClusterMembership
16+
import CoreMetrics
1617
import Logging
1718
import NIO
1819
import NIOFoundationCompat
1920
import SWIM
2021

2122
import struct Dispatch.DispatchTime
2223

24+
#if canImport(FoundationEssentials)
25+
import FoundationEssentials
26+
#else
27+
import Foundation
28+
#endif
29+
2330
/// `ChannelDuplexHandler` responsible for encoding/decoding SWIM messages to/from the `SWIMNIOShell`.
2431
///
2532
/// It is designed to work with `DatagramBootstrap`s, and the contained shell can send messages by writing `SWIMNIOSWIMNIOWriteCommand`

Sources/SWIMNIOExample/SWIMNIOShell.swift

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
import ClusterMembership
1616
import Logging
17+
import Metrics
1718
import NIO
1819
import SWIM
1920

Tests/SWIMNIOExampleTests/SWIMNIOClusteredTests.swift

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import ClusterMembership
1616
import Logging
1717
import NIO
1818
import SWIM
19+
import SWIMTestKit
1920
import XCTest
2021

2122
@testable import SWIMNIOExample

0 commit comments

Comments
 (0)