From 2083f5d7e8f9035be6c4aebfd53d07ece9bb1991 Mon Sep 17 00:00:00 2001 From: Rick Newton-Rogers Date: Wed, 11 Dec 2024 15:38:17 +0000 Subject: [PATCH] Enable MemberImportVisibility check on all targets (#486) 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. --- Package.swift | 11 +++++++++++ .../ConnectionStateMachine/HasLocalSettings.swift | 2 ++ .../ConnectionStateMachine/HasRemoteSettings.swift | 2 ++ Tests/NIOHTTP2Tests/HTTP2ErrorTests.swift | 1 + 4 files changed, 16 insertions(+) diff --git a/Package.swift b/Package.swift index 36c6dec..da823fd 100644 --- a/Package.swift +++ b/Package.swift @@ -90,3 +90,14 @@ let package = Package( ), ] ) + +// --- STANDARD CROSS-REPO SETTINGS DO NOT EDIT --- // +for target in package.targets { + if target.type != .plugin { + 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 + } +} +// --- END: STANDARD CROSS-REPO SETTINGS DO NOT EDIT --- // diff --git a/Sources/NIOHTTP2/ConnectionStateMachine/HasLocalSettings.swift b/Sources/NIOHTTP2/ConnectionStateMachine/HasLocalSettings.swift index e5fd855..71754b4 100644 --- a/Sources/NIOHTTP2/ConnectionStateMachine/HasLocalSettings.swift +++ b/Sources/NIOHTTP2/ConnectionStateMachine/HasLocalSettings.swift @@ -12,6 +12,8 @@ // //===----------------------------------------------------------------------===// +import NIOHPACK + /// A protocol implemented by HTTP/2 connection state machine states with local settings. /// /// This protocol provides implementations that can apply changes to the local settings. diff --git a/Sources/NIOHTTP2/ConnectionStateMachine/HasRemoteSettings.swift b/Sources/NIOHTTP2/ConnectionStateMachine/HasRemoteSettings.swift index 511e8bd..f356538 100644 --- a/Sources/NIOHTTP2/ConnectionStateMachine/HasRemoteSettings.swift +++ b/Sources/NIOHTTP2/ConnectionStateMachine/HasRemoteSettings.swift @@ -12,6 +12,8 @@ // //===----------------------------------------------------------------------===// +import NIOHPACK + /// A protocol implemented by HTTP/2 connection state machine states with remote settings. /// /// This protocol provides implementations that can apply changes to the remote settings. diff --git a/Tests/NIOHTTP2Tests/HTTP2ErrorTests.swift b/Tests/NIOHTTP2Tests/HTTP2ErrorTests.swift index f65260a..9768fbc 100644 --- a/Tests/NIOHTTP2Tests/HTTP2ErrorTests.swift +++ b/Tests/NIOHTTP2Tests/HTTP2ErrorTests.swift @@ -12,6 +12,7 @@ // //===----------------------------------------------------------------------===// +import NIOHPACK import NIOHTTP2 import XCTest