Skip to content

Clean up dependencies and imports. #1935

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 26 additions & 26 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ var targets: [PackageDescription.Target] = [
"_NIODataStructures",
"NIOEmbedded"]),
.target(name: "_NIOConcurrency",
dependencies: ["NIO"]),
.target(name: "NIOFoundationCompat", dependencies: ["NIO"]),
dependencies: ["NIOCore"]),
.target(name: "NIOFoundationCompat", dependencies: ["NIOCore"]),
.target(name: "CNIOAtomics", dependencies: []),
.target(name: "CNIOSHA1", dependencies: []),
.target(name: "CNIOLinux", dependencies: []),
Expand All @@ -39,59 +39,59 @@ var targets: [PackageDescription.Target] = [
.target(name: "NIOConcurrencyHelpers",
dependencies: ["CNIOAtomics"]),
.target(name: "NIOHTTP1",
dependencies: ["NIO", "NIOConcurrencyHelpers", "CNIOHTTPParser"]),
dependencies: ["NIOCore", "NIOConcurrencyHelpers", "CNIOHTTPParser"]),
.target(name: "NIOEchoServer",
dependencies: ["NIO", "NIOConcurrencyHelpers"]),
dependencies: ["NIO", "NIOCore", "NIOConcurrencyHelpers"]),
.target(name: "NIOEchoClient",
dependencies: ["NIO", "NIOConcurrencyHelpers"]),
dependencies: ["NIO", "NIOCore", "NIOConcurrencyHelpers"]),
.target(name: "NIOHTTP1Server",
dependencies: ["NIO", "NIOHTTP1", "NIOConcurrencyHelpers"]),
dependencies: ["NIO", "NIOCore", "NIOHTTP1", "NIOConcurrencyHelpers"]),
.target(name: "NIOHTTP1Client",
dependencies: ["NIO", "NIOHTTP1", "NIOConcurrencyHelpers"]),
dependencies: ["NIO", "NIOCore", "NIOHTTP1", "NIOConcurrencyHelpers"]),
.target(name: "CNIOHTTPParser"),
.target(name: "NIOTLS", dependencies: ["NIO"]),
.target(name: "NIOTLS", dependencies: ["NIOCore"]),
.target(name: "NIOChatServer",
dependencies: ["NIO", "NIOConcurrencyHelpers"]),
dependencies: ["NIO", "NIOCore", "NIOConcurrencyHelpers"]),
.target(name: "NIOChatClient",
dependencies: ["NIO", "NIOConcurrencyHelpers"]),
dependencies: ["NIO", "NIOCore", "NIOConcurrencyHelpers"]),
.target(name: "NIOWebSocket",
dependencies: ["NIO", "NIOHTTP1", "CNIOSHA1"]),
dependencies: ["NIOCore", "NIOHTTP1", "CNIOSHA1"]),
.target(name: "NIOWebSocketServer",
dependencies: ["NIO", "NIOHTTP1", "NIOWebSocket"]),
dependencies: ["NIO", "NIOCore", "NIOHTTP1", "NIOWebSocket"]),
.target(name: "NIOWebSocketClient",
dependencies: ["NIO", "NIOHTTP1", "NIOWebSocket"]),
dependencies: ["NIO", "NIOCore", "NIOHTTP1", "NIOWebSocket"]),
.target(name: "NIOPerformanceTester",
dependencies: ["NIO", "NIOHTTP1", "NIOFoundationCompat", "NIOWebSocket"]),
dependencies: ["NIO", "NIOCore", "NIOEmbedded", "NIOHTTP1", "NIOFoundationCompat", "NIOWebSocket"]),
.target(name: "NIOMulticastChat",
dependencies: ["NIO"]),
dependencies: ["NIO", "NIOCore"]),
.target(name: "NIOUDPEchoServer",
dependencies: ["NIO"]),
dependencies: ["NIO", "NIOCore"]),
.target(name: "NIOUDPEchoClient",
dependencies: ["NIO"]),
dependencies: ["NIO", "NIOCore"]),
.target(name: "NIOTestUtils",
dependencies: ["NIO", "NIOHTTP1"]),
dependencies: ["NIO", "NIOCore", "NIOEmbedded", "NIOHTTP1"]),
.target(name: "NIOCrashTester",
dependencies: ["NIO", "NIOHTTP1", "NIOWebSocket", "NIOFoundationCompat"]),
dependencies: ["NIO", "NIOCore", "NIOEmbedded", "NIOHTTP1", "NIOWebSocket", "NIOFoundationCompat"]),
.target(name: "NIOAsyncAwaitDemo",
dependencies: ["NIO", "NIOHTTP1", "_NIOConcurrency"]),
dependencies: ["NIO", "NIOCore", "NIOHTTP1", "_NIOConcurrency"]),
.testTarget(name: "NIOEmbeddedTests",
dependencies: ["NIOConcurrencyHelpers", "NIOCore", "NIOEmbedded"]),
.testTarget(name: "NIOTests",
dependencies: ["NIO", "NIOFoundationCompat", "NIOTestUtils", "NIOConcurrencyHelpers", "NIOEmbedded"]),
dependencies: ["NIO", "NIOCore", "NIOFoundationCompat", "NIOTestUtils", "NIOConcurrencyHelpers", "NIOEmbedded"]),
.testTarget(name: "NIOConcurrencyHelpersTests",
dependencies: ["NIOConcurrencyHelpers", "NIO"]),
dependencies: ["NIOConcurrencyHelpers", "NIOCore"]),
.testTarget(name: "NIODataStructuresTests",
dependencies: ["_NIODataStructures"]),
.testTarget(name: "NIOHTTP1Tests",
dependencies: ["NIOHTTP1", "NIOFoundationCompat", "NIOTestUtils"]),
dependencies: ["NIOCore", "NIOEmbedded", "NIO", "NIOHTTP1", "NIOFoundationCompat", "NIOTestUtils"]),
.testTarget(name: "NIOTLSTests",
dependencies: ["NIO", "NIOTLS", "NIOFoundationCompat"]),
dependencies: ["NIOCore", "NIOEmbedded", "NIOTLS", "NIOFoundationCompat"]),
.testTarget(name: "NIOWebSocketTests",
dependencies: ["NIO", "NIOWebSocket"]),
dependencies: ["NIOCore", "NIOEmbedded", "NIOWebSocket"]),
.testTarget(name: "NIOTestUtilsTests",
dependencies: ["NIOTestUtils"]),
.testTarget(name: "NIOFoundationCompatTests",
dependencies: ["NIO", "NIOFoundationCompat"]),
dependencies: ["NIOCore", "NIOFoundationCompat"]),
]

let package = Package(
Expand Down
2 changes: 1 addition & 1 deletion Sources/NIOAsyncAwaitDemo/AsyncChannelIO.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
//
//===----------------------------------------------------------------------===//

import NIO
import NIOCore
import NIOHTTP1

#if compiler(>=5.5) // we cannot write this on one line with `&&` because Swift 5.0 doesn't like it...
Expand Down
2 changes: 1 addition & 1 deletion Sources/NIOAsyncAwaitDemo/FullRequestResponse.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

// THIS FILE IS MOSTLY COPIED FROM swift-nio-extras

import NIO
import NIOCore
import NIOHTTP1

public final class MakeFullRequestHandler: ChannelOutboundHandler {
Expand Down
2 changes: 1 addition & 1 deletion Sources/NIOAsyncAwaitDemo/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

import NIOCore
import NIO
import _NIOConcurrency
import NIOHTTP1
Expand Down
3 changes: 2 additions & 1 deletion Sources/NIOChatClient/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -11,6 +11,7 @@
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//
import NIOCore
import NIO

private final class ChatHandler: ChannelInboundHandler {
Expand Down
3 changes: 2 additions & 1 deletion Sources/NIOChatServer/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -11,6 +11,7 @@
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//
import NIOCore
import NIO
import Dispatch

Expand Down
4 changes: 2 additions & 2 deletions Sources/NIOCrashTester/CrashTests+ByteBuffer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -12,7 +12,7 @@
//
//===----------------------------------------------------------------------===//

import NIO
import NIOCore

struct ByteBufferCrashTests {
let testMovingReaderIndexPastWriterIndex = CrashTest(
Expand Down
4 changes: 2 additions & 2 deletions Sources/NIOCrashTester/CrashTests+EventLoop.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -11,7 +11,7 @@
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

import NIOCore
import NIO

fileprivate let group = MultiThreadedEventLoopGroup(numberOfThreads: 2)
Expand Down
6 changes: 3 additions & 3 deletions Sources/NIOCrashTester/CrashTests+HTTP.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -11,8 +11,8 @@
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

import NIO
import NIOEmbedded
import NIOCore
import NIOHTTP1

struct HTTPCrashTests {
Expand Down
4 changes: 2 additions & 2 deletions Sources/NIOCrashTester/OutputGrepper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -11,7 +11,7 @@
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

import NIOCore
import NIO
import NIOFoundationCompat
import class Foundation.Pipe
Expand Down
4 changes: 2 additions & 2 deletions Sources/NIOCrashTester/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -11,7 +11,7 @@
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

import NIOCore
import NIO
import class Foundation.Process
import struct Foundation.URL
Expand Down
3 changes: 2 additions & 1 deletion Sources/NIOEchoClient/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -11,6 +11,7 @@
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//
import NIOCore
import NIO

print("Please enter line to send to the server")
Expand Down
3 changes: 2 additions & 1 deletion Sources/NIOEchoServer/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -11,6 +11,7 @@
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//
import NIOCore
import NIO

private final class EchoHandler: ChannelInboundHandler {
Expand Down
4 changes: 2 additions & 2 deletions Sources/NIOFoundationCompat/ByteBuffer-foundation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -12,7 +12,7 @@
//
//===----------------------------------------------------------------------===//

import NIO
import NIOCore
import Foundation


Expand Down
4 changes: 2 additions & 2 deletions Sources/NIOFoundationCompat/Codable+ByteBuffer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -12,7 +12,7 @@
//
//===----------------------------------------------------------------------===//

import NIO
import NIOCore
import Foundation

extension ByteBuffer {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
//
//===----------------------------------------------------------------------===//

import NIO
import NIOCore
import Foundation

extension JSONSerialization {
Expand All @@ -28,4 +28,4 @@ extension JSONSerialization {
options opt: JSONSerialization.ReadingOptions = []) throws -> Any {
return try JSONSerialization.jsonObject(with: Data(buffer: buffer), options: opt)
}
}
}
4 changes: 2 additions & 2 deletions Sources/NIOHTTP1/ByteCollectionUtils.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -12,7 +12,7 @@
//
//===----------------------------------------------------------------------===//

import NIO
import NIOCore

fileprivate let defaultWhitespaces = [" ", "\t"].map({$0.utf8.first!})

Expand Down
4 changes: 2 additions & 2 deletions Sources/NIOHTTP1/HTTPDecoder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -12,7 +12,7 @@
//
//===----------------------------------------------------------------------===//

import NIO
import NIOCore
#if compiler(>=5.1)
@_implementationOnly import CNIOHTTPParser
#else
Expand Down
4 changes: 2 additions & 2 deletions Sources/NIOHTTP1/HTTPEncoder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -12,7 +12,7 @@
//
//===----------------------------------------------------------------------===//

import NIO
import NIOCore

private func writeChunk(wrapOutboundOut: (IOData) -> NIOAny, context: ChannelHandlerContext, isChunked: Bool, chunk: IOData, promise: EventLoopPromise<Void>?) {
let (mW1, mW2, mW3): (EventLoopPromise<Void>?, EventLoopPromise<Void>?, EventLoopPromise<Void>?)
Expand Down
Loading