diff --git a/FuzzTesting/Package.swift b/FuzzTesting/Package.swift index 2702a1c3..c612408a 100644 --- a/FuzzTesting/Package.swift +++ b/FuzzTesting/Package.swift @@ -27,7 +27,8 @@ let package = Package( dependencies: [ .product(name: "NIOHTTP2", package: "swift-nio-http2"), .product(name: "NIOHTTP1", package: "swift-nio"), - .product(name: "NIO", package: "swift-nio"), + .product(name: "NIOCore", package: "swift-nio"), + .product(name: "NIOEmbedded", package: "swift-nio"), ] ), ] diff --git a/FuzzTesting/Sources/FuzzHTTP2/main.swift b/FuzzTesting/Sources/FuzzHTTP2/main.swift index e7e0ded2..02d8ed20 100644 --- a/FuzzTesting/Sources/FuzzHTTP2/main.swift +++ b/FuzzTesting/Sources/FuzzHTTP2/main.swift @@ -22,7 +22,8 @@ import Foundation -import NIO +import NIOCore +import NIOEmbedded import NIOHTTP1 import NIOHTTP2 diff --git a/IntegrationTests/tests_01_allocation_counters/test_01_resources/run-nio-http2-alloc-counter-tests.sh b/IntegrationTests/tests_01_allocation_counters/test_01_resources/run-nio-http2-alloc-counter-tests.sh index 83c73040..9beb39d4 100755 --- a/IntegrationTests/tests_01_allocation_counters/test_01_resources/run-nio-http2-alloc-counter-tests.sh +++ b/IntegrationTests/tests_01_allocation_counters/test_01_resources/run-nio-http2-alloc-counter-tests.sh @@ -3,7 +3,7 @@ ## ## This source file is part of the SwiftNIO open source project ## -## Copyright (c) 2019 Apple Inc. and the SwiftNIO project authors +## Copyright (c) 2019-2021 Apple Inc. and the SwiftNIO project authors ## Licensed under Apache License v2.0 ## ## See LICENSE.txt for license information @@ -45,9 +45,11 @@ fi "$nio_checkout/swift-nio/IntegrationTests/allocation-counter-tests-framework/run-allocation-counter.sh" \ -p "$here/../../.." \ - -m NIO \ + -m NIOCore \ + -m NIOEmbedded \ + -m NIOPosix \ -m NIOHTTP1 \ -m NIOHTTP2 \ -t "$tmp_dir" \ - -d <( echo '.package(url: "https://github.com/apple/swift-nio.git", from: "2.0.0"),' ) \ + -d <( echo '.package(url: "https://github.com/apple/swift-nio.git", from: "2.32.0"),' ) \ "${tests_to_run[@]}" diff --git a/IntegrationTests/tests_01_allocation_counters/test_01_resources/test_1k_requests.swift b/IntegrationTests/tests_01_allocation_counters/test_01_resources/test_1k_requests.swift index 4d176a62..e5333167 100644 --- a/IntegrationTests/tests_01_allocation_counters/test_01_resources/test_1k_requests.swift +++ b/IntegrationTests/tests_01_allocation_counters/test_01_resources/test_1k_requests.swift @@ -2,7 +2,7 @@ // // This source file is part of the SwiftNIO open source project // -// Copyright (c) 2020 Apple Inc. and the SwiftNIO project authors +// Copyright (c) 2020-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information @@ -12,7 +12,8 @@ // //===----------------------------------------------------------------------===// -import NIO +import NIOCore +import NIOEmbedded import NIOHPACK import NIOHTTP2 diff --git a/IntegrationTests/tests_01_allocation_counters/test_01_resources/test_client_server_h1_request_response.swift b/IntegrationTests/tests_01_allocation_counters/test_01_resources/test_client_server_h1_request_response.swift index b0d93599..bb5844f1 100644 --- a/IntegrationTests/tests_01_allocation_counters/test_01_resources/test_client_server_h1_request_response.swift +++ b/IntegrationTests/tests_01_allocation_counters/test_01_resources/test_client_server_h1_request_response.swift @@ -2,7 +2,7 @@ // // This source file is part of the SwiftNIO open source project // -// Copyright (c) 2020 Apple Inc. and the SwiftNIO project authors +// Copyright (c) 2020-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information @@ -12,7 +12,8 @@ // //===----------------------------------------------------------------------===// -import NIO +import NIOCore +import NIOEmbedded import NIOHPACK import NIOHTTP1 import NIOHTTP2 diff --git a/IntegrationTests/tests_01_allocation_counters/test_01_resources/test_client_server_request_response.swift b/IntegrationTests/tests_01_allocation_counters/test_01_resources/test_client_server_request_response.swift index 8442d875..0e677764 100644 --- a/IntegrationTests/tests_01_allocation_counters/test_01_resources/test_client_server_request_response.swift +++ b/IntegrationTests/tests_01_allocation_counters/test_01_resources/test_client_server_request_response.swift @@ -2,7 +2,7 @@ // // This source file is part of the SwiftNIO open source project // -// Copyright (c) 2019 Apple Inc. and the SwiftNIO project authors +// Copyright (c) 2019-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information @@ -12,7 +12,8 @@ // //===----------------------------------------------------------------------===// -import NIO +import NIOCore +import NIOEmbedded import NIOHPACK import NIOHTTP1 import NIOHTTP2 diff --git a/IntegrationTests/tests_01_allocation_counters/test_01_resources/test_create_client_stream_channel.swift b/IntegrationTests/tests_01_allocation_counters/test_01_resources/test_create_client_stream_channel.swift index a4817932..d79c8af7 100644 --- a/IntegrationTests/tests_01_allocation_counters/test_01_resources/test_create_client_stream_channel.swift +++ b/IntegrationTests/tests_01_allocation_counters/test_01_resources/test_create_client_stream_channel.swift @@ -2,7 +2,7 @@ // // This source file is part of the SwiftNIO open source project // -// Copyright (c) 2019 Apple Inc. and the SwiftNIO project authors +// Copyright (c) 2019-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information @@ -12,7 +12,8 @@ // //===----------------------------------------------------------------------===// -import NIO +import NIOCore +import NIOEmbedded import NIOHPACK import NIOHTTP1 import NIOHTTP2 diff --git a/IntegrationTests/tests_01_allocation_counters/test_01_resources/test_hpack_decoding.swift b/IntegrationTests/tests_01_allocation_counters/test_01_resources/test_hpack_decoding.swift index 55949438..6bfe98b6 100644 --- a/IntegrationTests/tests_01_allocation_counters/test_01_resources/test_hpack_decoding.swift +++ b/IntegrationTests/tests_01_allocation_counters/test_01_resources/test_hpack_decoding.swift @@ -2,7 +2,7 @@ // // This source file is part of the SwiftNIO open source project // -// Copyright (c) 2019 Apple Inc. and the SwiftNIO project authors +// Copyright (c) 2019-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information @@ -12,7 +12,7 @@ // //===----------------------------------------------------------------------===// -import NIO +import NIOCore import NIOHTTP2 import NIOHPACK diff --git a/IntegrationTests/tests_01_allocation_counters/test_01_resources/test_stream_teardown_100_concurrent.swift b/IntegrationTests/tests_01_allocation_counters/test_01_resources/test_stream_teardown_100_concurrent.swift index f3c21ab8..d7bf1652 100644 --- a/IntegrationTests/tests_01_allocation_counters/test_01_resources/test_stream_teardown_100_concurrent.swift +++ b/IntegrationTests/tests_01_allocation_counters/test_01_resources/test_stream_teardown_100_concurrent.swift @@ -2,7 +2,7 @@ // // This source file is part of the SwiftNIO open source project // -// Copyright (c) 2020 Apple Inc. and the SwiftNIO project authors +// Copyright (c) 2020-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information @@ -12,7 +12,8 @@ // //===----------------------------------------------------------------------===// -import NIO +import NIOCore +import NIOEmbedded import NIOHPACK import NIOHTTP2 diff --git a/Package.swift b/Package.swift index e3bce8e4..274c71a5 100644 --- a/Package.swift +++ b/Package.swift @@ -3,7 +3,7 @@ // // This source file is part of the SwiftNIO open source project // -// Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors +// Copyright (c) 2017-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information @@ -27,18 +27,25 @@ let package = Package( .target( name: "NIOHTTP2Server", dependencies: [ - "NIOHTTP2" + "NIOHTTP2", + .product(name: "NIOCore", package: "swift-nio"), + .product(name: "NIOPosix", package: "swift-nio"), + .product(name: "NIOHTTP1", package: "swift-nio"), ]), .target( name: "NIOHTTP2PerformanceTester", dependencies: [ - "NIOHTTP2" + "NIOHTTP2", + .product(name: "NIOCore", package: "swift-nio"), + .product(name: "NIOPosix", package: "swift-nio"), + .product(name: "NIOEmbedded", package: "swift-nio"), ]), .target( name: "NIOHTTP2", dependencies: [ "NIOHPACK", .product(name: "NIO", package: "swift-nio"), + .product(name: "NIOCore", package: "swift-nio"), .product(name: "NIOHTTP1", package: "swift-nio"), .product(name: "NIOTLS", package: "swift-nio"), .product(name: "NIOConcurrencyHelpers", package: "swift-nio"), @@ -47,6 +54,7 @@ let package = Package( name: "NIOHPACK", dependencies: [ .product(name: "NIO", package: "swift-nio"), + .product(name: "NIOCore", package: "swift-nio"), .product(name: "NIOConcurrencyHelpers", package: "swift-nio"), .product(name: "NIOHTTP1", package: "swift-nio"), ]), @@ -54,7 +62,8 @@ let package = Package( name: "NIOHTTP2Tests", dependencies: [ "NIOHTTP2", - .product(name: "NIO", package: "swift-nio"), + .product(name: "NIOCore", package: "swift-nio"), + .product(name: "NIOEmbedded", package: "swift-nio"), .product(name: "NIOHTTP1", package: "swift-nio"), .product(name: "NIOFoundationCompat", package: "swift-nio"), ]), @@ -62,7 +71,7 @@ let package = Package( name: "NIOHPACKTests", dependencies: [ "NIOHPACK", - .product(name: "NIO", package: "swift-nio"), + .product(name: "NIOCore", package: "swift-nio"), .product(name: "NIOFoundationCompat", package: "swift-nio"), ]) ] diff --git a/Sources/NIOHPACK/DynamicHeaderTable.swift b/Sources/NIOHPACK/DynamicHeaderTable.swift index e5917eb1..acfae4bd 100644 --- a/Sources/NIOHPACK/DynamicHeaderTable.swift +++ b/Sources/NIOHPACK/DynamicHeaderTable.swift @@ -2,7 +2,7 @@ // // This source file is part of the SwiftNIO open source project // -// Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors +// Copyright (c) 2017-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information @@ -12,8 +12,6 @@ // //===----------------------------------------------------------------------===// -import NIO - /// Implements the dynamic part of the HPACK header table, as defined in /// [RFC 7541 ยง 2.3](https://httpwg.org/specs/rfc7541.html#dynamic.table). @usableFromInline diff --git a/Sources/NIOHPACK/HPACKDecoder.swift b/Sources/NIOHPACK/HPACKDecoder.swift index 80459ad5..d48605d0 100644 --- a/Sources/NIOHPACK/HPACKDecoder.swift +++ b/Sources/NIOHPACK/HPACKDecoder.swift @@ -2,7 +2,7 @@ // // This source file is part of the SwiftNIO open source project // -// Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors +// Copyright (c) 2017-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information @@ -12,7 +12,7 @@ // //===----------------------------------------------------------------------===// -import NIO +import NIOCore /// An `HPACKDecoder` maintains its own dynamic header table and uses that to /// decode indexed HTTP headers, along with Huffman-encoded strings and diff --git a/Sources/NIOHPACK/HPACKEncoder.swift b/Sources/NIOHPACK/HPACKEncoder.swift index 4734343d..2c3a9ad7 100644 --- a/Sources/NIOHPACK/HPACKEncoder.swift +++ b/Sources/NIOHPACK/HPACKEncoder.swift @@ -2,7 +2,7 @@ // // This source file is part of the SwiftNIO open source project // -// Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors +// Copyright (c) 2017-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information @@ -12,7 +12,7 @@ // //===----------------------------------------------------------------------===// -import NIO +import NIOCore /// An `HPACKEncoder` maintains its own dynamic header table and uses that to /// encode HTTP headers to an internal byte buffer. diff --git a/Sources/NIOHPACK/HPACKErrors.swift b/Sources/NIOHPACK/HPACKErrors.swift index c2dad77d..dca8249f 100644 --- a/Sources/NIOHPACK/HPACKErrors.swift +++ b/Sources/NIOHPACK/HPACKErrors.swift @@ -2,7 +2,7 @@ // // This source file is part of the SwiftNIO open source project // -// Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors +// Copyright (c) 2017-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information @@ -12,7 +12,7 @@ // //===----------------------------------------------------------------------===// -import NIO +import NIOCore public protocol NIOHPACKError : Error, Equatable { } diff --git a/Sources/NIOHPACK/HPACKHeader.swift b/Sources/NIOHPACK/HPACKHeader.swift index 9459730e..24b8a526 100644 --- a/Sources/NIOHPACK/HPACKHeader.swift +++ b/Sources/NIOHPACK/HPACKHeader.swift @@ -2,7 +2,7 @@ // // This source file is part of the SwiftNIO open source project // -// Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors +// Copyright (c) 2017-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information @@ -12,7 +12,7 @@ // //===----------------------------------------------------------------------===// -import NIO +import NIOCore import NIOHTTP1 /// Very similar to `NIOHTTP1.HTTPHeaders`, but with extra data for storing indexing diff --git a/Sources/NIOHPACK/HeaderTables.swift b/Sources/NIOHPACK/HeaderTables.swift index a31cf02d..56099f70 100644 --- a/Sources/NIOHPACK/HeaderTables.swift +++ b/Sources/NIOHPACK/HeaderTables.swift @@ -2,7 +2,7 @@ // // This source file is part of the SwiftNIO open source project // -// Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors +// Copyright (c) 2017-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information @@ -12,7 +12,7 @@ // //===----------------------------------------------------------------------===// -import NIO +import NIOCore internal struct HeaderTableEntry { var name: String diff --git a/Sources/NIOHPACK/HuffmanCoding.swift b/Sources/NIOHPACK/HuffmanCoding.swift index 86ea751c..82c779db 100644 --- a/Sources/NIOHPACK/HuffmanCoding.swift +++ b/Sources/NIOHPACK/HuffmanCoding.swift @@ -2,7 +2,7 @@ // // This source file is part of the SwiftNIO open source project // -// Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors +// Copyright (c) 2017-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information @@ -12,7 +12,7 @@ // //===----------------------------------------------------------------------===// -import NIO +import NIOCore /// Adds HPACK-conformant Huffman encoding to `ByteBuffer`. Note that the implementation is *not* /// thread safe. The intended use is to be within a single HTTP2StreamChannel or similar, on a diff --git a/Sources/NIOHPACK/IndexedHeaderTable.swift b/Sources/NIOHPACK/IndexedHeaderTable.swift index 1df53614..b4ae2cf8 100644 --- a/Sources/NIOHPACK/IndexedHeaderTable.swift +++ b/Sources/NIOHPACK/IndexedHeaderTable.swift @@ -2,7 +2,7 @@ // // This source file is part of the SwiftNIO open source project // -// Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors +// Copyright (c) 2017-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information @@ -12,7 +12,7 @@ // //===----------------------------------------------------------------------===// -import NIO +import NIOCore /// The unified header table used by HTTP/2, encompassing both static and dynamic tables. public struct IndexedHeaderTable { diff --git a/Sources/NIOHPACK/IntegerCoding.swift b/Sources/NIOHPACK/IntegerCoding.swift index 986f1b6a..6f754135 100644 --- a/Sources/NIOHPACK/IntegerCoding.swift +++ b/Sources/NIOHPACK/IntegerCoding.swift @@ -2,7 +2,7 @@ // // This source file is part of the SwiftNIO open source project // -// Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors +// Copyright (c) 2017-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information @@ -12,7 +12,7 @@ // //===----------------------------------------------------------------------===// -import NIO +import NIOCore /* private but tests */ /// Encodes an integer value into a provided memory location. diff --git a/Sources/NIOHTTP2/ConnectionStateMachine/ConnectionStateMachine.swift b/Sources/NIOHTTP2/ConnectionStateMachine/ConnectionStateMachine.swift index e616d352..ae097e07 100644 --- a/Sources/NIOHTTP2/ConnectionStateMachine/ConnectionStateMachine.swift +++ b/Sources/NIOHTTP2/ConnectionStateMachine/ConnectionStateMachine.swift @@ -2,7 +2,7 @@ // // This source file is part of the SwiftNIO open source project // -// Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors +// Copyright (c) 2017-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information @@ -11,7 +11,7 @@ // SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// -import NIO +import NIOCore import NIOHPACK /// A state machine that governs the connection-level state of a HTTP/2 connection. diff --git a/Sources/NIOHTTP2/ConnectionStateMachine/ConnectionStreamsState.swift b/Sources/NIOHTTP2/ConnectionStateMachine/ConnectionStreamsState.swift index 8ddd4f3d..22dc2095 100644 --- a/Sources/NIOHTTP2/ConnectionStateMachine/ConnectionStreamsState.swift +++ b/Sources/NIOHTTP2/ConnectionStateMachine/ConnectionStreamsState.swift @@ -2,7 +2,7 @@ // // This source file is part of the SwiftNIO open source project // -// Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors +// Copyright (c) 2017-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information @@ -11,7 +11,7 @@ // SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// -import NIO +import NIOCore /// A representation of the state of the HTTP/2 streams in a single HTTP/2 connection. diff --git a/Sources/NIOHTTP2/Frame Buffers/ConcurrentStreamBuffer.swift b/Sources/NIOHTTP2/Frame Buffers/ConcurrentStreamBuffer.swift index b8612394..92047f14 100644 --- a/Sources/NIOHTTP2/Frame Buffers/ConcurrentStreamBuffer.swift +++ b/Sources/NIOHTTP2/Frame Buffers/ConcurrentStreamBuffer.swift @@ -2,7 +2,7 @@ // // This source file is part of the SwiftNIO open source project // -// Copyright (c) 2019 Apple Inc. and the SwiftNIO project authors +// Copyright (c) 2019-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information @@ -11,7 +11,7 @@ // SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// -import NIO +import NIOCore /// An object that buffers new stream creation attempts to avoid violating diff --git a/Sources/NIOHTTP2/Frame Buffers/ControlFrameBuffer.swift b/Sources/NIOHTTP2/Frame Buffers/ControlFrameBuffer.swift index 3308e684..2d74ea09 100644 --- a/Sources/NIOHTTP2/Frame Buffers/ControlFrameBuffer.swift +++ b/Sources/NIOHTTP2/Frame Buffers/ControlFrameBuffer.swift @@ -2,7 +2,7 @@ // // This source file is part of the SwiftNIO open source project // -// Copyright (c) 2019 Apple Inc. and the SwiftNIO project authors +// Copyright (c) 2019-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information @@ -11,7 +11,7 @@ // SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// -import NIO +import NIOCore /// A buffer that stores outbound control frames. diff --git a/Sources/NIOHTTP2/Frame Buffers/OutboundFlowControlBuffer.swift b/Sources/NIOHTTP2/Frame Buffers/OutboundFlowControlBuffer.swift index 17e1dc03..5a5cc5a0 100644 --- a/Sources/NIOHTTP2/Frame Buffers/OutboundFlowControlBuffer.swift +++ b/Sources/NIOHTTP2/Frame Buffers/OutboundFlowControlBuffer.swift @@ -2,7 +2,7 @@ // // This source file is part of the SwiftNIO open source project // -// Copyright (c) 2017-2019 Apple Inc. and the SwiftNIO project authors +// Copyright (c) 2017-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information @@ -11,7 +11,7 @@ // SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// -import NIO +import NIOCore /// A structure that manages buffering outbound frames for active streams to ensure that those streams do not violate flow control rules. /// diff --git a/Sources/NIOHTTP2/Frame Buffers/OutboundFrameBuffer.swift b/Sources/NIOHTTP2/Frame Buffers/OutboundFrameBuffer.swift index eefaa8e3..7a4190bb 100644 --- a/Sources/NIOHTTP2/Frame Buffers/OutboundFrameBuffer.swift +++ b/Sources/NIOHTTP2/Frame Buffers/OutboundFrameBuffer.swift @@ -2,7 +2,7 @@ // // This source file is part of the SwiftNIO open source project // -// Copyright (c) 2019 Apple Inc. and the SwiftNIO project authors +// Copyright (c) 2019-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information @@ -11,7 +11,7 @@ // SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// -import NIO +import NIOCore /// The result of receiving a frame that is about to be sent. internal enum OutboundFrameAction { diff --git a/Sources/NIOHTTP2/HTTP2ChannelHandler.swift b/Sources/NIOHTTP2/HTTP2ChannelHandler.swift index e9a80017..90f56769 100644 --- a/Sources/NIOHTTP2/HTTP2ChannelHandler.swift +++ b/Sources/NIOHTTP2/HTTP2ChannelHandler.swift @@ -2,7 +2,7 @@ // // This source file is part of the SwiftNIO open source project // -// Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors +// Copyright (c) 2017-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information @@ -11,7 +11,7 @@ // SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// -import NIO +import NIOCore import NIOHPACK diff --git a/Sources/NIOHTTP2/HTTP2ErrorCode.swift b/Sources/NIOHTTP2/HTTP2ErrorCode.swift index f0e4f3e4..3bdc94f5 100644 --- a/Sources/NIOHTTP2/HTTP2ErrorCode.swift +++ b/Sources/NIOHTTP2/HTTP2ErrorCode.swift @@ -2,7 +2,7 @@ // // This source file is part of the SwiftNIO open source project // -// Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors +// Copyright (c) 2017-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information @@ -12,7 +12,7 @@ // //===----------------------------------------------------------------------===// -import NIO +import NIOCore /// An HTTP/2 error code. public struct HTTP2ErrorCode { diff --git a/Sources/NIOHTTP2/HTTP2Frame.swift b/Sources/NIOHTTP2/HTTP2Frame.swift index 080df80d..11113acb 100644 --- a/Sources/NIOHTTP2/HTTP2Frame.swift +++ b/Sources/NIOHTTP2/HTTP2Frame.swift @@ -2,7 +2,7 @@ // // This source file is part of the SwiftNIO open source project // -// Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors +// Copyright (c) 2017-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information @@ -12,7 +12,7 @@ // //===----------------------------------------------------------------------===// -import NIO +import NIOCore import NIOHTTP1 import NIOHPACK diff --git a/Sources/NIOHTTP2/HTTP2FrameParser.swift b/Sources/NIOHTTP2/HTTP2FrameParser.swift index b0c56979..2b00aa39 100644 --- a/Sources/NIOHTTP2/HTTP2FrameParser.swift +++ b/Sources/NIOHTTP2/HTTP2FrameParser.swift @@ -2,7 +2,7 @@ // // This source file is part of the SwiftNIO open source project // -// Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors +// Copyright (c) 2017-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information @@ -12,7 +12,7 @@ // //===----------------------------------------------------------------------===// -import NIO +import NIOCore import NIOHPACK // FIXME(jim): Need to improve the buffering behavior so we're not manually copying every byte we see. diff --git a/Sources/NIOHTTP2/HTTP2PipelineHelpers.swift b/Sources/NIOHTTP2/HTTP2PipelineHelpers.swift index 4ddbbc5f..efe80cae 100644 --- a/Sources/NIOHTTP2/HTTP2PipelineHelpers.swift +++ b/Sources/NIOHTTP2/HTTP2PipelineHelpers.swift @@ -2,7 +2,7 @@ // // This source file is part of the SwiftNIO open source project // -// Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors +// Copyright (c) 2017-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information @@ -12,7 +12,7 @@ // //===----------------------------------------------------------------------===// -import NIO +import NIOCore import NIOTLS /// The supported ALPN protocol tokens for NIO's HTTP/2 abstraction layer. diff --git a/Sources/NIOHTTP2/HTTP2StreamChannel.swift b/Sources/NIOHTTP2/HTTP2StreamChannel.swift index f37a1e7a..8df59e2d 100644 --- a/Sources/NIOHTTP2/HTTP2StreamChannel.swift +++ b/Sources/NIOHTTP2/HTTP2StreamChannel.swift @@ -2,7 +2,7 @@ // // This source file is part of the SwiftNIO open source project // -// Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors +// Copyright (c) 2017-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information @@ -12,7 +12,7 @@ // //===----------------------------------------------------------------------===// -import NIO +import NIOCore import NIOConcurrencyHelpers diff --git a/Sources/NIOHTTP2/HTTP2StreamMultiplexer.swift b/Sources/NIOHTTP2/HTTP2StreamMultiplexer.swift index 16270807..ea0d4c74 100644 --- a/Sources/NIOHTTP2/HTTP2StreamMultiplexer.swift +++ b/Sources/NIOHTTP2/HTTP2StreamMultiplexer.swift @@ -2,7 +2,7 @@ // // This source file is part of the SwiftNIO open source project // -// Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors +// Copyright (c) 2017-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information @@ -12,7 +12,7 @@ // //===----------------------------------------------------------------------===// -import NIO +import NIOCore /// A channel handler that creates a child channel for each HTTP/2 stream. /// diff --git a/Sources/NIOHTTP2/HTTP2ToHTTP1Codec.swift b/Sources/NIOHTTP2/HTTP2ToHTTP1Codec.swift index af8effee..f08ad457 100644 --- a/Sources/NIOHTTP2/HTTP2ToHTTP1Codec.swift +++ b/Sources/NIOHTTP2/HTTP2ToHTTP1Codec.swift @@ -2,7 +2,7 @@ // // This source file is part of the SwiftNIO open source project // -// Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors +// Copyright (c) 2017-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information @@ -12,7 +12,7 @@ // //===----------------------------------------------------------------------===// -import NIO +import NIOCore import NIOHTTP1 import NIOHPACK diff --git a/Sources/NIOHTTP2/InboundEventBuffer.swift b/Sources/NIOHTTP2/InboundEventBuffer.swift index b8079ffa..8bfe89d3 100644 --- a/Sources/NIOHTTP2/InboundEventBuffer.swift +++ b/Sources/NIOHTTP2/InboundEventBuffer.swift @@ -2,7 +2,7 @@ // // This source file is part of the SwiftNIO open source project // -// Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors +// Copyright (c) 2017-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information @@ -11,7 +11,7 @@ // SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// -import NIO +import NIOCore /// A buffer of pending user events. /// diff --git a/Sources/NIOHTTP2/MultiplexerAbstractChannel.swift b/Sources/NIOHTTP2/MultiplexerAbstractChannel.swift index 8f922706..06865ebe 100644 --- a/Sources/NIOHTTP2/MultiplexerAbstractChannel.swift +++ b/Sources/NIOHTTP2/MultiplexerAbstractChannel.swift @@ -2,7 +2,7 @@ // // This source file is part of the SwiftNIO open source project // -// Copyright (c) 2020 Apple Inc. and the SwiftNIO project authors +// Copyright (c) 2020-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information @@ -11,7 +11,7 @@ // SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// -import NIO +import NIOCore /// This structure defines an abstraction over `HTTP2StreamChannel` that is used /// by the `HTTP2StreamMultiplexer`. diff --git a/Sources/NIOHTTP2/StreamMap.swift b/Sources/NIOHTTP2/StreamMap.swift index 02ad1c1c..ac0075ea 100644 --- a/Sources/NIOHTTP2/StreamMap.swift +++ b/Sources/NIOHTTP2/StreamMap.swift @@ -2,7 +2,7 @@ // // This source file is part of the SwiftNIO open source project // -// Copyright (c) 2020 Apple Inc. and the SwiftNIO project authors +// Copyright (c) 2020-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information @@ -12,7 +12,7 @@ // //===----------------------------------------------------------------------===// -import NIO +import NIOCore fileprivate let binarySearchThreshold = 200 diff --git a/Sources/NIOHTTP2PerformanceTester/Bench1Conn10kRequests.swift b/Sources/NIOHTTP2PerformanceTester/Bench1Conn10kRequests.swift index 7eb880db..d26e9f5b 100644 --- a/Sources/NIOHTTP2PerformanceTester/Bench1Conn10kRequests.swift +++ b/Sources/NIOHTTP2PerformanceTester/Bench1Conn10kRequests.swift @@ -2,7 +2,7 @@ // // This source file is part of the SwiftNIO open source project // -// Copyright (c) 2019 Apple Inc. and the SwiftNIO project authors +// Copyright (c) 2019-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information @@ -12,7 +12,8 @@ // //===----------------------------------------------------------------------===// -import NIO +import NIOCore +import NIOPosix import NIOHTTP1 import NIOHTTP2 diff --git a/Sources/NIOHTTP2PerformanceTester/HPACKHeaderDecodingBenchmark.swift b/Sources/NIOHTTP2PerformanceTester/HPACKHeaderDecodingBenchmark.swift index 37577c94..422a3629 100644 --- a/Sources/NIOHTTP2PerformanceTester/HPACKHeaderDecodingBenchmark.swift +++ b/Sources/NIOHTTP2PerformanceTester/HPACKHeaderDecodingBenchmark.swift @@ -2,7 +2,7 @@ // // This source file is part of the SwiftNIO open source project // -// Copyright (c) 2019 Apple Inc. and the SwiftNIO project authors +// Copyright (c) 2019-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information @@ -12,7 +12,7 @@ // //===----------------------------------------------------------------------===// -import NIO +import NIOCore import NIOHPACK diff --git a/Sources/NIOHTTP2PerformanceTester/HPACKHeaderEncodingBenchmark.swift b/Sources/NIOHTTP2PerformanceTester/HPACKHeaderEncodingBenchmark.swift index 62179553..58534714 100644 --- a/Sources/NIOHTTP2PerformanceTester/HPACKHeaderEncodingBenchmark.swift +++ b/Sources/NIOHTTP2PerformanceTester/HPACKHeaderEncodingBenchmark.swift @@ -2,7 +2,7 @@ // // This source file is part of the SwiftNIO open source project // -// Copyright (c) 2019 Apple Inc. and the SwiftNIO project authors +// Copyright (c) 2019-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information @@ -12,7 +12,7 @@ // //===----------------------------------------------------------------------===// -import NIO +import NIOCore import NIOHPACK diff --git a/Sources/NIOHTTP2PerformanceTester/HuffmanDecodingBenchmark.swift b/Sources/NIOHTTP2PerformanceTester/HuffmanDecodingBenchmark.swift index e3aef3c6..0edf0a45 100644 --- a/Sources/NIOHTTP2PerformanceTester/HuffmanDecodingBenchmark.swift +++ b/Sources/NIOHTTP2PerformanceTester/HuffmanDecodingBenchmark.swift @@ -2,7 +2,7 @@ // // This source file is part of the SwiftNIO open source project // -// Copyright (c) 2019 Apple Inc. and the SwiftNIO project authors +// Copyright (c) 2019-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information @@ -13,7 +13,7 @@ //===----------------------------------------------------------------------===// import Foundation -import NIO +import NIOCore import NIOHPACK diff --git a/Sources/NIOHTTP2PerformanceTester/HuffmanEncodingBenchmark.swift b/Sources/NIOHTTP2PerformanceTester/HuffmanEncodingBenchmark.swift index 486d1f08..0fbd9124 100644 --- a/Sources/NIOHTTP2PerformanceTester/HuffmanEncodingBenchmark.swift +++ b/Sources/NIOHTTP2PerformanceTester/HuffmanEncodingBenchmark.swift @@ -2,7 +2,7 @@ // // This source file is part of the SwiftNIO open source project // -// Copyright (c) 2019 Apple Inc. and the SwiftNIO project authors +// Copyright (c) 2019-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information @@ -12,7 +12,7 @@ // //===----------------------------------------------------------------------===// -import NIO +import NIOCore import NIOHPACK diff --git a/Sources/NIOHTTP2PerformanceTester/ServerOnly10KRequestsBenchmark.swift b/Sources/NIOHTTP2PerformanceTester/ServerOnly10KRequestsBenchmark.swift index 95c33103..aac061cb 100644 --- a/Sources/NIOHTTP2PerformanceTester/ServerOnly10KRequestsBenchmark.swift +++ b/Sources/NIOHTTP2PerformanceTester/ServerOnly10KRequestsBenchmark.swift @@ -2,7 +2,7 @@ // // This source file is part of the SwiftNIO open source project // -// Copyright (c) 2020 Apple Inc. and the SwiftNIO project authors +// Copyright (c) 2020-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information @@ -12,7 +12,8 @@ // //===----------------------------------------------------------------------===// -import NIO +import NIOCore +import NIOEmbedded import NIOHPACK import NIOHTTP2 diff --git a/Sources/NIOHTTP2PerformanceTester/StreamTeardownBenchmark.swift b/Sources/NIOHTTP2PerformanceTester/StreamTeardownBenchmark.swift index ac241a47..d653b14f 100644 --- a/Sources/NIOHTTP2PerformanceTester/StreamTeardownBenchmark.swift +++ b/Sources/NIOHTTP2PerformanceTester/StreamTeardownBenchmark.swift @@ -2,7 +2,7 @@ // // This source file is part of the SwiftNIO open source project // -// Copyright (c) 2020 Apple Inc. and the SwiftNIO project authors +// Copyright (c) 2020-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information @@ -12,7 +12,8 @@ // //===----------------------------------------------------------------------===// -import NIO +import NIOCore +import NIOEmbedded import NIOHPACK import NIOHTTP2 diff --git a/Sources/NIOHTTP2PerformanceTester/main.swift b/Sources/NIOHTTP2PerformanceTester/main.swift index 5ce6b232..5581c892 100644 --- a/Sources/NIOHTTP2PerformanceTester/main.swift +++ b/Sources/NIOHTTP2PerformanceTester/main.swift @@ -2,7 +2,7 @@ // // This source file is part of the SwiftNIO open source project // -// Copyright (c) 2019 Apple Inc. and the SwiftNIO project authors +// Copyright (c) 2019-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information @@ -12,8 +12,6 @@ // //===----------------------------------------------------------------------===// -import NIO -import NIOHTTP2 import Foundation import Dispatch diff --git a/Sources/NIOHTTP2Server/main.swift b/Sources/NIOHTTP2Server/main.swift index efbd0c24..f86db3be 100644 --- a/Sources/NIOHTTP2Server/main.swift +++ b/Sources/NIOHTTP2Server/main.swift @@ -2,7 +2,7 @@ // // This source file is part of the SwiftNIO open source project // -// Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors +// Copyright (c) 2017-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information @@ -16,7 +16,8 @@ // hit it with curl like so: curl --http2-prior-knowledge http://localhost:8888/ -import NIO +import NIOCore +import NIOPosix import NIOHTTP1 import NIOHTTP2 diff --git a/Tests/NIOHPACKTests/HPACKCodingTests.swift b/Tests/NIOHPACKTests/HPACKCodingTests.swift index 15656e64..aafdf15c 100644 --- a/Tests/NIOHPACKTests/HPACKCodingTests.swift +++ b/Tests/NIOHPACKTests/HPACKCodingTests.swift @@ -2,7 +2,7 @@ // // This source file is part of the SwiftNIO open source project // -// Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors +// Copyright (c) 2017-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information @@ -13,7 +13,7 @@ //===----------------------------------------------------------------------===// import XCTest -import NIO +import NIOCore @testable import NIOHPACK class HPACKCodingTests: XCTestCase { diff --git a/Tests/NIOHPACKTests/HPACKIntegrationTests.swift b/Tests/NIOHPACKTests/HPACKIntegrationTests.swift index a9dd318b..08bb2b08 100644 --- a/Tests/NIOHPACKTests/HPACKIntegrationTests.swift +++ b/Tests/NIOHPACKTests/HPACKIntegrationTests.swift @@ -2,7 +2,7 @@ // // This source file is part of the SwiftNIO open source project // -// Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors +// Copyright (c) 2017-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information @@ -13,7 +13,7 @@ //===----------------------------------------------------------------------===// import XCTest -import NIO +import NIOCore @testable import NIOHPACK class HPACKIntegrationTests : XCTestCase { diff --git a/Tests/NIOHPACKTests/HPACKRegressionTests.swift b/Tests/NIOHPACKTests/HPACKRegressionTests.swift index 29387b2a..097feb83 100644 --- a/Tests/NIOHPACKTests/HPACKRegressionTests.swift +++ b/Tests/NIOHPACKTests/HPACKRegressionTests.swift @@ -2,7 +2,7 @@ // // This source file is part of the SwiftNIO open source project // -// Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors +// Copyright (c) 2017-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information @@ -13,7 +13,7 @@ //===----------------------------------------------------------------------===// import XCTest -import NIO +import NIOCore import NIOHPACK class HPACKRegressionTests: XCTestCase { diff --git a/Tests/NIOHPACKTests/HeaderTableTests.swift b/Tests/NIOHPACKTests/HeaderTableTests.swift index a4fefab3..bc5aa8f1 100644 --- a/Tests/NIOHPACKTests/HeaderTableTests.swift +++ b/Tests/NIOHPACKTests/HeaderTableTests.swift @@ -2,7 +2,7 @@ // // This source file is part of the SwiftNIO open source project // -// Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors +// Copyright (c) 2017-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information @@ -13,7 +13,7 @@ //===----------------------------------------------------------------------===// import XCTest -import NIO +import NIOCore @testable import NIOHPACK func XCTAssertEqualTuple(_ expression1: @autoclosure () throws -> (T1, T2)?, diff --git a/Tests/NIOHPACKTests/HuffmanCodingTests.swift b/Tests/NIOHPACKTests/HuffmanCodingTests.swift index 8b80bc66..584fb61b 100644 --- a/Tests/NIOHPACKTests/HuffmanCodingTests.swift +++ b/Tests/NIOHPACKTests/HuffmanCodingTests.swift @@ -2,7 +2,7 @@ // // This source file is part of the SwiftNIO open source project // -// Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors +// Copyright (c) 2017-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information @@ -13,7 +13,7 @@ //===----------------------------------------------------------------------===// import XCTest -import NIO +import NIOCore import NIOFoundationCompat import Foundation @testable import NIOHPACK diff --git a/Tests/NIOHPACKTests/IntegerCodingTests.swift b/Tests/NIOHPACKTests/IntegerCodingTests.swift index 2bc93efb..448e613d 100644 --- a/Tests/NIOHPACKTests/IntegerCodingTests.swift +++ b/Tests/NIOHPACKTests/IntegerCodingTests.swift @@ -2,7 +2,7 @@ // // This source file is part of the SwiftNIO open source project // -// Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors +// Copyright (c) 2017-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information @@ -13,7 +13,7 @@ //===----------------------------------------------------------------------===// import XCTest -import NIO +import NIOCore @testable import NIOHPACK class IntegerCodingTests : XCTestCase { diff --git a/Tests/NIOHTTP2Tests/CircularBufferExtensionsTests.swift b/Tests/NIOHTTP2Tests/CircularBufferExtensionsTests.swift index da03065d..349181b2 100644 --- a/Tests/NIOHTTP2Tests/CircularBufferExtensionsTests.swift +++ b/Tests/NIOHTTP2Tests/CircularBufferExtensionsTests.swift @@ -2,7 +2,7 @@ // // This source file is part of the SwiftNIO open source project // -// Copyright (c) 2020 Apple Inc. and the SwiftNIO project authors +// Copyright (c) 2020-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information @@ -13,7 +13,7 @@ //===----------------------------------------------------------------------===// import XCTest -import NIO +import NIOCore @testable import NIOHTTP2 final class CircularBufferExtensionsTests: XCTestCase { diff --git a/Tests/NIOHTTP2Tests/CompoundOutboundBufferTest.swift b/Tests/NIOHTTP2Tests/CompoundOutboundBufferTest.swift index cb464bd7..ef60ae38 100644 --- a/Tests/NIOHTTP2Tests/CompoundOutboundBufferTest.swift +++ b/Tests/NIOHTTP2Tests/CompoundOutboundBufferTest.swift @@ -2,7 +2,7 @@ // // This source file is part of the SwiftNIO open source project // -// Copyright (c) 2019 Apple Inc. and the SwiftNIO project authors +// Copyright (c) 2019-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information @@ -13,7 +13,8 @@ //===----------------------------------------------------------------------===// import XCTest -import NIO +import NIOCore +import NIOEmbedded import NIOHPACK @testable import NIOHTTP2 diff --git a/Tests/NIOHTTP2Tests/ConcurrentStreamBufferTest.swift b/Tests/NIOHTTP2Tests/ConcurrentStreamBufferTest.swift index 15f86077..2439fa15 100644 --- a/Tests/NIOHTTP2Tests/ConcurrentStreamBufferTest.swift +++ b/Tests/NIOHTTP2Tests/ConcurrentStreamBufferTest.swift @@ -2,7 +2,7 @@ // // This source file is part of the SwiftNIO open source project // -// Copyright (c) 2019 Apple Inc. and the SwiftNIO project authors +// Copyright (c) 2019-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information @@ -13,7 +13,8 @@ //===----------------------------------------------------------------------===// import XCTest -import NIO +import NIOCore +import NIOEmbedded import NIOHPACK @testable import NIOHTTP2 diff --git a/Tests/NIOHTTP2Tests/ConfiguringPipelineTests.swift b/Tests/NIOHTTP2Tests/ConfiguringPipelineTests.swift index 9eef81b2..d1dff1c3 100644 --- a/Tests/NIOHTTP2Tests/ConfiguringPipelineTests.swift +++ b/Tests/NIOHTTP2Tests/ConfiguringPipelineTests.swift @@ -2,7 +2,7 @@ // // This source file is part of the SwiftNIO open source project // -// Copyright (c) 2019 Apple Inc. and the SwiftNIO project authors +// Copyright (c) 2019-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information @@ -14,7 +14,8 @@ import XCTest -import NIO +import NIOCore +import NIOEmbedded import NIOHPACK import NIOHTTP1 import NIOHTTP2 diff --git a/Tests/NIOHTTP2Tests/ConfiguringPipelineWithFramePayloadStreamsTests.swift b/Tests/NIOHTTP2Tests/ConfiguringPipelineWithFramePayloadStreamsTests.swift index 36ac83b4..85744614 100644 --- a/Tests/NIOHTTP2Tests/ConfiguringPipelineWithFramePayloadStreamsTests.swift +++ b/Tests/NIOHTTP2Tests/ConfiguringPipelineWithFramePayloadStreamsTests.swift @@ -2,7 +2,7 @@ // // This source file is part of the SwiftNIO open source project // -// Copyright (c) 2019 Apple Inc. and the SwiftNIO project authors +// Copyright (c) 2019-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information @@ -14,7 +14,8 @@ import XCTest -import NIO +import NIOCore +import NIOEmbedded import NIOHPACK import NIOHTTP1 import NIOHTTP2 diff --git a/Tests/NIOHTTP2Tests/ConnectionStateMachineTests.swift b/Tests/NIOHTTP2Tests/ConnectionStateMachineTests.swift index e6473c80..0b85b3a2 100644 --- a/Tests/NIOHTTP2Tests/ConnectionStateMachineTests.swift +++ b/Tests/NIOHTTP2Tests/ConnectionStateMachineTests.swift @@ -2,7 +2,7 @@ // // This source file is part of the SwiftNIO open source project // -// Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors +// Copyright (c) 2017-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information @@ -14,7 +14,7 @@ import XCTest -import NIO +import NIOCore import NIOHPACK @testable import NIOHTTP2 diff --git a/Tests/NIOHTTP2Tests/ControlFrameBufferTests.swift b/Tests/NIOHTTP2Tests/ControlFrameBufferTests.swift index ec1acfd9..f75165c2 100644 --- a/Tests/NIOHTTP2Tests/ControlFrameBufferTests.swift +++ b/Tests/NIOHTTP2Tests/ControlFrameBufferTests.swift @@ -2,7 +2,7 @@ // // This source file is part of the SwiftNIO open source project // -// Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors +// Copyright (c) 2017-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information @@ -13,7 +13,7 @@ //===----------------------------------------------------------------------===// import XCTest -import NIO +import NIOCore import NIOHPACK @testable import NIOHTTP2 diff --git a/Tests/NIOHTTP2Tests/HTTP2FrameParserTests.swift b/Tests/NIOHTTP2Tests/HTTP2FrameParserTests.swift index e56bb3a0..6e67089b 100644 --- a/Tests/NIOHTTP2Tests/HTTP2FrameParserTests.swift +++ b/Tests/NIOHTTP2Tests/HTTP2FrameParserTests.swift @@ -2,7 +2,7 @@ // // This source file is part of the SwiftNIO open source project // -// Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors +// Copyright (c) 2017-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information @@ -13,7 +13,7 @@ //===----------------------------------------------------------------------===// import XCTest -import NIO +import NIOCore import NIOHPACK @testable import NIOHTTP2 diff --git a/Tests/NIOHTTP2Tests/HTTP2FramePayloadStreamMultiplexerTests.swift b/Tests/NIOHTTP2Tests/HTTP2FramePayloadStreamMultiplexerTests.swift index d34ff3d4..04ab2fb0 100644 --- a/Tests/NIOHTTP2Tests/HTTP2FramePayloadStreamMultiplexerTests.swift +++ b/Tests/NIOHTTP2Tests/HTTP2FramePayloadStreamMultiplexerTests.swift @@ -2,7 +2,7 @@ // // This source file is part of the SwiftNIO open source project // -// Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors +// Copyright (c) 2017-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information @@ -13,7 +13,8 @@ //===----------------------------------------------------------------------===// import XCTest -import NIO +import NIOCore +import NIOEmbedded import NIOHTTP1 @testable import NIOHPACK // for HPACKHeaders initializers @testable import NIOHTTP2 diff --git a/Tests/NIOHTTP2Tests/HTTP2FramePayloadToHTTP1CodecTests.swift b/Tests/NIOHTTP2Tests/HTTP2FramePayloadToHTTP1CodecTests.swift index f58191aa..428a74b1 100644 --- a/Tests/NIOHTTP2Tests/HTTP2FramePayloadToHTTP1CodecTests.swift +++ b/Tests/NIOHTTP2Tests/HTTP2FramePayloadToHTTP1CodecTests.swift @@ -2,7 +2,7 @@ // // This source file is part of the SwiftNIO open source project // -// Copyright (c) 2020 Apple Inc. and the SwiftNIO project authors +// Copyright (c) 2020-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information @@ -13,7 +13,8 @@ //===----------------------------------------------------------------------===// import XCTest -import NIO +import NIOCore +import NIOEmbedded import NIOHTTP1 import NIOHPACK @testable import NIOHTTP2 diff --git a/Tests/NIOHTTP2Tests/HTTP2StreamMultiplexerTests.swift b/Tests/NIOHTTP2Tests/HTTP2StreamMultiplexerTests.swift index ed1fe776..8778e6e6 100644 --- a/Tests/NIOHTTP2Tests/HTTP2StreamMultiplexerTests.swift +++ b/Tests/NIOHTTP2Tests/HTTP2StreamMultiplexerTests.swift @@ -2,7 +2,7 @@ // // This source file is part of the SwiftNIO open source project // -// Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors +// Copyright (c) 2017-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information @@ -13,7 +13,8 @@ //===----------------------------------------------------------------------===// import XCTest -import NIO +import NIOCore +import NIOEmbedded import NIOHTTP1 @testable import NIOHPACK // for HPACKHeaders initializers @testable import NIOHTTP2 diff --git a/Tests/NIOHTTP2Tests/HTTP2ToHTTP1CodecTests.swift b/Tests/NIOHTTP2Tests/HTTP2ToHTTP1CodecTests.swift index c88b0bd6..472ce281 100644 --- a/Tests/NIOHTTP2Tests/HTTP2ToHTTP1CodecTests.swift +++ b/Tests/NIOHTTP2Tests/HTTP2ToHTTP1CodecTests.swift @@ -2,7 +2,7 @@ // // This source file is part of the SwiftNIO open source project // -// Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors +// Copyright (c) 2017-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information @@ -13,7 +13,8 @@ //===----------------------------------------------------------------------===// import XCTest -import NIO +import NIOCore +import NIOEmbedded import NIOHTTP1 @testable import NIOHPACK // For HPACKHeaders initializer access @testable import NIOHTTP2 diff --git a/Tests/NIOHTTP2Tests/OutboundFlowControlBufferTests.swift b/Tests/NIOHTTP2Tests/OutboundFlowControlBufferTests.swift index 719022b4..905d71eb 100644 --- a/Tests/NIOHTTP2Tests/OutboundFlowControlBufferTests.swift +++ b/Tests/NIOHTTP2Tests/OutboundFlowControlBufferTests.swift @@ -2,7 +2,7 @@ // // This source file is part of the SwiftNIO open source project // -// Copyright (c) 2017-2019 Apple Inc. and the SwiftNIO project authors +// Copyright (c) 2017-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information @@ -13,7 +13,8 @@ //===----------------------------------------------------------------------===// import XCTest -import NIO +import NIOCore +import NIOEmbedded import NIOHTTP1 @testable import NIOHTTP2 import NIOHPACK diff --git a/Tests/NIOHTTP2Tests/ReentrancyTests.swift b/Tests/NIOHTTP2Tests/ReentrancyTests.swift index e2d03cc2..cd59e618 100644 --- a/Tests/NIOHTTP2Tests/ReentrancyTests.swift +++ b/Tests/NIOHTTP2Tests/ReentrancyTests.swift @@ -2,7 +2,7 @@ // // This source file is part of the SwiftNIO open source project // -// Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors +// Copyright (c) 2017-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information @@ -13,7 +13,8 @@ //===----------------------------------------------------------------------===// import XCTest -import NIO +import NIOCore +import NIOEmbedded import NIOHTTP1 import NIOHTTP2 diff --git a/Tests/NIOHTTP2Tests/SimpleClientServerFramePayloadStreamTests.swift b/Tests/NIOHTTP2Tests/SimpleClientServerFramePayloadStreamTests.swift index dc4aa90a..32d0431d 100644 --- a/Tests/NIOHTTP2Tests/SimpleClientServerFramePayloadStreamTests.swift +++ b/Tests/NIOHTTP2Tests/SimpleClientServerFramePayloadStreamTests.swift @@ -2,7 +2,7 @@ // // This source file is part of the SwiftNIO open source project // -// Copyright (c) 2017-2020 Apple Inc. and the SwiftNIO project authors +// Copyright (c) 2017-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information @@ -13,7 +13,8 @@ //===----------------------------------------------------------------------===// import XCTest -import NIO +import NIOCore +import NIOEmbedded import NIOHPACK @testable import NIOHTTP2 diff --git a/Tests/NIOHTTP2Tests/SimpleClientServerTests.swift b/Tests/NIOHTTP2Tests/SimpleClientServerTests.swift index 3261e100..b6783061 100644 --- a/Tests/NIOHTTP2Tests/SimpleClientServerTests.swift +++ b/Tests/NIOHTTP2Tests/SimpleClientServerTests.swift @@ -2,7 +2,7 @@ // // This source file is part of the SwiftNIO open source project // -// Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors +// Copyright (c) 2017-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information @@ -13,7 +13,8 @@ //===----------------------------------------------------------------------===// import XCTest -import NIO +import NIOCore +import NIOEmbedded import NIOHPACK @testable import NIOHTTP2 diff --git a/Tests/NIOHTTP2Tests/TestUtilities.swift b/Tests/NIOHTTP2Tests/TestUtilities.swift index f6c42b09..4aa2a176 100644 --- a/Tests/NIOHTTP2Tests/TestUtilities.swift +++ b/Tests/NIOHTTP2Tests/TestUtilities.swift @@ -2,7 +2,7 @@ // // This source file is part of the SwiftNIO open source project // -// Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors +// Copyright (c) 2017-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information @@ -20,7 +20,8 @@ import Glibc #endif import XCTest -import NIO +import NIOCore +import NIOEmbedded import NIOHTTP1 @testable import NIOHTTP2 import NIOHPACK @@ -744,7 +745,7 @@ extension FileRegion { } } -extension NIO.NIOFileHandle { +extension NIOCore.NIOFileHandle { func appendBuffer(_ buffer: ByteBuffer) { var written = 0 diff --git a/scripts/soundness.sh b/scripts/soundness.sh index b365e4bf..8ddbbf9c 100755 --- a/scripts/soundness.sh +++ b/scripts/soundness.sh @@ -18,7 +18,7 @@ here="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" function replace_acceptable_years() { # this needs to replace all acceptable forms with 'YEARS' - sed -e 's/2017-20[12][890]/YEARS/g' -e 's/2019/YEARS/g' -e 's/2020/YEARS/g' -e 's/2021/YEARS/g' + sed -e 's/20[12][78901]-20[12][8901]/YEARS/g' -e 's/2019/YEARS/g' -e 's/2020/YEARS/g' -e 's/2021/YEARS/g' } printf "=> Checking linux tests... " @@ -52,6 +52,15 @@ if git grep --color=never -i "${unacceptable_terms[@]}" -- . ":(exclude)CODE_OF_ fi printf "\033[0;32mokay.\033[0m\n" +# This checks for the umbrella NIO module. +printf "=> Checking for imports of umbrella NIO module... " +if git grep --color=never -i "^[ \t]*import \+NIO[ \t]*$" > /dev/null; then + printf "\033[0;31mUmbrella imports found.\033[0m\n" + git grep -i "^[ \t]*import \+NIO[ \t]*$" + exit 1 +fi +printf "\033[0;32mokay.\033[0m\n" + printf "=> Checking license headers... " tmp=$(mktemp /tmp/.swift-nio-soundness_XXXXXX)