Skip to content

Commit

Permalink
Re-add NIO as a dependency of our library targets.
Browse files Browse the repository at this point in the history
Motivation:

In apple#1935 I removed NIO as a dependency of a number of our library
targets. This unfortunately led to some downstream breakage in modules
that were (incorrectly) assuming they could import NIO without
expressing a dependency on it in their Package.swift, e.g.
swift-server/swift-aws-lambda-runtime#218.

While a forums thread
(https://forums.swift.org/t/semantic-versioning-should-removing-a-dependency-be-a-semver-major/51179)
is ongoing to discuss the implications of this, we should re-add the
dependency to undo the breakage against main. I've validated this
locally: merely having the dependency is enough, we don't have to use
it.

Modifications:

- Re-add NIO as a dependency to:
    - _NIOConcurrency
    - NIOFoundationCompat
    - NIOHTTP1
    - NIOTLS
    - NIOWebSocket

Result:

Broken downstreams can build again.
  • Loading branch information
Lukasa committed Aug 16, 2021
1 parent 64285cb commit fb71e48
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 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: ["NIOCore"]),
.target(name: "NIOFoundationCompat", dependencies: ["NIOCore"]),
dependencies: ["NIO", "NIOCore"]),
.target(name: "NIOFoundationCompat", dependencies: ["NIO", "NIOCore"]),
.target(name: "CNIOAtomics", dependencies: []),
.target(name: "CNIOSHA1", dependencies: []),
.target(name: "CNIOLinux", dependencies: []),
Expand All @@ -39,7 +39,7 @@ var targets: [PackageDescription.Target] = [
.target(name: "NIOConcurrencyHelpers",
dependencies: ["CNIOAtomics"]),
.target(name: "NIOHTTP1",
dependencies: ["NIOCore", "NIOConcurrencyHelpers", "CNIOHTTPParser"]),
dependencies: ["NIO", "NIOCore", "NIOConcurrencyHelpers", "CNIOHTTPParser"]),
.target(name: "NIOEchoServer",
dependencies: ["NIO", "NIOCore", "NIOConcurrencyHelpers"]),
.target(name: "NIOEchoClient",
Expand All @@ -49,13 +49,13 @@ var targets: [PackageDescription.Target] = [
.target(name: "NIOHTTP1Client",
dependencies: ["NIO", "NIOCore", "NIOHTTP1", "NIOConcurrencyHelpers"]),
.target(name: "CNIOHTTPParser"),
.target(name: "NIOTLS", dependencies: ["NIOCore"]),
.target(name: "NIOTLS", dependencies: ["NIO", "NIOCore"]),
.target(name: "NIOChatServer",
dependencies: ["NIO", "NIOCore", "NIOConcurrencyHelpers"]),
.target(name: "NIOChatClient",
dependencies: ["NIO", "NIOCore", "NIOConcurrencyHelpers"]),
.target(name: "NIOWebSocket",
dependencies: ["NIOCore", "NIOHTTP1", "CNIOSHA1"]),
dependencies: ["NIO", "NIOCore", "NIOHTTP1", "CNIOSHA1"]),
.target(name: "NIOWebSocketServer",
dependencies: ["NIO", "NIOCore", "NIOHTTP1", "NIOWebSocket"]),
.target(name: "NIOWebSocketClient",
Expand Down

0 comments on commit fb71e48

Please sign in to comment.