From dbd5c864ad1e9966e5b7078c42d9fd519169d0a5 Mon Sep 17 00:00:00 2001 From: Rick Newton-Rogers Date: Fri, 13 Dec 2024 14:07:57 +0000 Subject: [PATCH] Enable MemberImportVisibility check on all targets (#794) 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 +++++++++++ .../AsyncHTTPClient/Configuration+BrowserLike.swift | 3 +++ Sources/AsyncHTTPClient/ConnectionPool.swift | 2 ++ .../AsyncAwaitEndToEndTests.swift | 2 ++ Tests/AsyncHTTPClientTests/HTTP2ClientTests.swift | 1 + Tests/AsyncHTTPClientTests/HTTP2ConnectionTests.swift | 1 + .../AsyncHTTPClientTests/HTTPClient+SOCKSTests.swift | 1 + .../HTTPClientInternalTests.swift | 1 + .../AsyncHTTPClientTests/HTTPClientRequestTests.swift | 1 + .../HTTPClientResponseTests.swift | 1 + Tests/AsyncHTTPClientTests/HTTPClientTestUtils.swift | 1 + Tests/AsyncHTTPClientTests/HTTPClientTests.swift | 1 + .../HTTPConnectionPool+ManagerTests.swift | 1 + Tests/AsyncHTTPClientTests/TransactionTests.swift | 1 + 14 files changed, 28 insertions(+) diff --git a/Package.swift b/Package.swift index bec6c9114..e4cccb6de 100644 --- a/Package.swift +++ b/Package.swift @@ -83,3 +83,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/AsyncHTTPClient/Configuration+BrowserLike.swift b/Sources/AsyncHTTPClient/Configuration+BrowserLike.swift index 39aefe975..5a0abdfad 100644 --- a/Sources/AsyncHTTPClient/Configuration+BrowserLike.swift +++ b/Sources/AsyncHTTPClient/Configuration+BrowserLike.swift @@ -11,6 +11,9 @@ // SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// +import NIOCore +import NIOHTTPCompression +import NIOSSL // swift-format-ignore: DontRepeatTypeInStaticProperties extension HTTPClient.Configuration { diff --git a/Sources/AsyncHTTPClient/ConnectionPool.swift b/Sources/AsyncHTTPClient/ConnectionPool.swift index 776d1f6df..35f7a21c4 100644 --- a/Sources/AsyncHTTPClient/ConnectionPool.swift +++ b/Sources/AsyncHTTPClient/ConnectionPool.swift @@ -12,6 +12,8 @@ // //===----------------------------------------------------------------------===// +import CNIOLinux +import NIOCore import NIOSSL #if canImport(Darwin) diff --git a/Tests/AsyncHTTPClientTests/AsyncAwaitEndToEndTests.swift b/Tests/AsyncHTTPClientTests/AsyncAwaitEndToEndTests.swift index f58e07730..4bfa86d14 100644 --- a/Tests/AsyncHTTPClientTests/AsyncAwaitEndToEndTests.swift +++ b/Tests/AsyncHTTPClientTests/AsyncAwaitEndToEndTests.swift @@ -14,6 +14,8 @@ import Logging import NIOCore +import NIOFoundationCompat +import NIOHTTP1 import NIOPosix import NIOSSL import XCTest diff --git a/Tests/AsyncHTTPClientTests/HTTP2ClientTests.swift b/Tests/AsyncHTTPClientTests/HTTP2ClientTests.swift index 0580dccad..d6bc2de14 100644 --- a/Tests/AsyncHTTPClientTests/HTTP2ClientTests.swift +++ b/Tests/AsyncHTTPClientTests/HTTP2ClientTests.swift @@ -15,6 +15,7 @@ import AsyncHTTPClient // NOT @testable - tests that really need @testable go into HTTP2ClientInternalTests.swift import Logging import NIOCore +import NIOFoundationCompat import NIOHTTP1 import NIOHTTP2 import NIOPosix diff --git a/Tests/AsyncHTTPClientTests/HTTP2ConnectionTests.swift b/Tests/AsyncHTTPClientTests/HTTP2ConnectionTests.swift index acf81beac..a50f1ab54 100644 --- a/Tests/AsyncHTTPClientTests/HTTP2ConnectionTests.swift +++ b/Tests/AsyncHTTPClientTests/HTTP2ConnectionTests.swift @@ -16,6 +16,7 @@ import Logging import NIOConcurrencyHelpers import NIOCore import NIOEmbedded +import NIOHPACK import NIOHTTP1 import NIOHTTP2 import NIOPosix diff --git a/Tests/AsyncHTTPClientTests/HTTPClient+SOCKSTests.swift b/Tests/AsyncHTTPClientTests/HTTPClient+SOCKSTests.swift index 08dd58319..af32284b0 100644 --- a/Tests/AsyncHTTPClientTests/HTTPClient+SOCKSTests.swift +++ b/Tests/AsyncHTTPClientTests/HTTPClient+SOCKSTests.swift @@ -15,6 +15,7 @@ import AsyncHTTPClient // NOT @testable - tests that need @testable go into HTTPClientInternalTests.swift import Logging import NIOCore +import NIOHTTP1 import NIOPosix import NIOSOCKS import XCTest diff --git a/Tests/AsyncHTTPClientTests/HTTPClientInternalTests.swift b/Tests/AsyncHTTPClientTests/HTTPClientInternalTests.swift index 2c54d3289..5b70699a0 100644 --- a/Tests/AsyncHTTPClientTests/HTTPClientInternalTests.swift +++ b/Tests/AsyncHTTPClientTests/HTTPClientInternalTests.swift @@ -15,6 +15,7 @@ import NIOConcurrencyHelpers import NIOCore import NIOEmbedded +import NIOFoundationCompat import NIOHTTP1 import NIOPosix import NIOTestUtils diff --git a/Tests/AsyncHTTPClientTests/HTTPClientRequestTests.swift b/Tests/AsyncHTTPClientTests/HTTPClientRequestTests.swift index 08e41d464..a2cc3b108 100644 --- a/Tests/AsyncHTTPClientTests/HTTPClientRequestTests.swift +++ b/Tests/AsyncHTTPClientTests/HTTPClientRequestTests.swift @@ -14,6 +14,7 @@ import Algorithms import NIOCore +import NIOHTTP1 import XCTest @testable import AsyncHTTPClient diff --git a/Tests/AsyncHTTPClientTests/HTTPClientResponseTests.swift b/Tests/AsyncHTTPClientTests/HTTPClientResponseTests.swift index fd2b7ee4e..7dcc4efe6 100644 --- a/Tests/AsyncHTTPClientTests/HTTPClientResponseTests.swift +++ b/Tests/AsyncHTTPClientTests/HTTPClientResponseTests.swift @@ -14,6 +14,7 @@ import Logging import NIOCore +import NIOHTTP1 import XCTest @testable import AsyncHTTPClient diff --git a/Tests/AsyncHTTPClientTests/HTTPClientTestUtils.swift b/Tests/AsyncHTTPClientTests/HTTPClientTestUtils.swift index d9ca45d7b..da2046b81 100644 --- a/Tests/AsyncHTTPClientTests/HTTPClientTestUtils.swift +++ b/Tests/AsyncHTTPClientTests/HTTPClientTestUtils.swift @@ -18,6 +18,7 @@ import Logging import NIOConcurrencyHelpers import NIOCore import NIOEmbedded +import NIOFoundationCompat import NIOHPACK import NIOHTTP1 import NIOHTTP2 diff --git a/Tests/AsyncHTTPClientTests/HTTPClientTests.swift b/Tests/AsyncHTTPClientTests/HTTPClientTests.swift index 8f76b693b..fbd40ce3a 100644 --- a/Tests/AsyncHTTPClientTests/HTTPClientTests.swift +++ b/Tests/AsyncHTTPClientTests/HTTPClientTests.swift @@ -20,6 +20,7 @@ import NIOCore import NIOEmbedded import NIOFoundationCompat import NIOHTTP1 +import NIOHTTP2 import NIOHTTPCompression import NIOPosix import NIOSSL diff --git a/Tests/AsyncHTTPClientTests/HTTPConnectionPool+ManagerTests.swift b/Tests/AsyncHTTPClientTests/HTTPConnectionPool+ManagerTests.swift index ef59c9463..724c00b1f 100644 --- a/Tests/AsyncHTTPClientTests/HTTPConnectionPool+ManagerTests.swift +++ b/Tests/AsyncHTTPClientTests/HTTPConnectionPool+ManagerTests.swift @@ -12,6 +12,7 @@ // //===----------------------------------------------------------------------===// +import Logging import NIOCore import NIOHTTP1 import NIOPosix diff --git a/Tests/AsyncHTTPClientTests/TransactionTests.swift b/Tests/AsyncHTTPClientTests/TransactionTests.swift index ff3a51d27..34349496d 100644 --- a/Tests/AsyncHTTPClientTests/TransactionTests.swift +++ b/Tests/AsyncHTTPClientTests/TransactionTests.swift @@ -16,6 +16,7 @@ import Logging import NIOConcurrencyHelpers import NIOCore import NIOEmbedded +import NIOFoundationCompat import NIOHTTP1 import NIOPosix import XCTest