diff --git a/FuzzTesting/Package.swift b/FuzzTesting/Package.swift index 2702a1c..c612408 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 e7e0ded..02d8ed2 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 83c7304..9beb39d 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 4d176a6..e533316 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 b0d9359..bb5844f 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 8442d87..0e67776 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 a481793..d79c8af 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 5594943..6bfe98b 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 f3c21ab..d7bf165 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 e3bce8e..274c71a 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 e5917eb..acfae4b 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 80459ad..d48605d 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 4734343..2c3a9ad 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 c2dad77..dca8249 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 9459730..24b8a52 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 a31cf02..56099f7 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 86ea751..82c779d 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 1df5361..b4ae2cf 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 986f1b6..6f75413 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 e616d35..ae097e0 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 8ddd4f3..22dc209 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 b861239..92047f1 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 3308e68..2d74ea0 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 17e1dc0..5a5cc5a 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 eefaa8e..7a4190b 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 e9a8001..90f5676 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 f0e4f3e..3bdc94f 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 080df80..11113ac 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 b0c5697..2b00aa3 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 4ddbbc5..efe80ca 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 f37a1e7..8df59e2 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 1627080..ea0d4c7 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 af8effe..f08ad45 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 b8079ff..8bfe89d 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 8f92270..06865eb 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 02ad1c1..ac0075e 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 7eb880d..d26e9f5 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 37577c9..422a362 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 6217955..5853471 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 e3aef3c..0edf0a4 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 486d1f0..0fbd912 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 95c3310..aac061c 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 ac241a4..d653b14 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 5ce6b23..5581c89 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 efbd0c2..f86db3b 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 15656e6..aafdf15 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 a9dd318..08bb2b0 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 29387b2..097feb8 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 a4fefab..bc5aa8f 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 8b80bc6..584fb61 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 2bc93ef..448e613 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 da03065..349181b 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 cb464bd..ef60ae3 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 15f8607..2439fa1 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 9eef81b..d1dff1c 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 36ac83b..8574461 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 e6473c8..0b85b3a 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 ec1acfd..f75165c 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 e56bb3a..6e67089 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 d34ff3d..04ab2fb 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 f58191a..428a74b 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 ed1fe77..8778e6e 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 c88b0bd..472ce28 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 719022b..905d71e 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 e2d03cc..cd59e61 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 dc4aa90..32d0431 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 3261e10..b678306 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 f6c42b0..4aa2a17 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 b365e4b..8ddbbf9 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)