Skip to content

Commit 0614251

Browse files
authored
Depend on swift-http-api-proposal and remove vendored-in code (#58)
We had vendored-in `AsyncStreaming` types, `Middleware`, and all `HTTPServer`-related protocols from `swift-http-api-proposal` into this repo until that repo was public. Now that it is, we should move to depend on it.
1 parent 6c83ee3 commit 0614251

53 files changed

Lines changed: 88 additions & 3017 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Package.swift

Lines changed: 5 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -30,20 +30,17 @@ let extraSettings: [SwiftSetting] = [
3030
let package = Package(
3131
name: "swift-http-server",
3232
products: [
33-
.library(
34-
name: "HTTPServer",
35-
targets: ["HTTPServer"]
36-
),
3733
.library(
3834
name: "NIOHTTPServer",
3935
targets: ["NIOHTTPServer"]
40-
),
36+
)
4137
],
4238
traits: [
4339
.trait(name: "SwiftConfiguration"),
4440
.default(enabledTraits: ["SwiftConfiguration"]),
4541
],
4642
dependencies: [
43+
.package(url: "https://github.com/apple/swift-http-api-proposal", branch: "main"),
4744
.package(
4845
url: "https://github.com/FranzBusch/swift-collections.git",
4946
branch: "fb-async"
@@ -67,24 +64,15 @@ let package = Package(
6764
.product(name: "Tracing", package: "swift-distributed-tracing"),
6865
.product(name: "Instrumentation", package: "swift-distributed-tracing"),
6966
.product(name: "Logging", package: "swift-log"),
70-
"HTTPServer",
71-
"Middleware",
67+
.product(name: "HTTPServer", package: "swift-http-api-proposal"),
7268
"NIOHTTPServer",
7369
],
7470
swiftSettings: extraSettings
7571
),
76-
.target(
77-
name: "HTTPServer",
78-
dependencies: [
79-
"AsyncStreaming",
80-
.product(name: "HTTPTypes", package: "swift-http-types"),
81-
],
82-
swiftSettings: extraSettings
83-
),
8472
.target(
8573
name: "NIOHTTPServer",
8674
dependencies: [
87-
"AsyncStreaming",
75+
.product(name: "AsyncStreaming", package: "swift-http-api-proposal"),
8876
.product(name: "DequeModule", package: "swift-collections"),
8977
.product(name: "BasicContainers", package: "swift-collections"),
9078
.product(name: "X509", package: "swift-certificates"),
@@ -103,22 +91,7 @@ let package = Package(
10391
package: "swift-configuration",
10492
condition: .when(traits: ["SwiftConfiguration"])
10593
),
106-
"HTTPServer",
107-
],
108-
swiftSettings: extraSettings
109-
),
110-
.target(
111-
name: "Middleware",
112-
dependencies: [
113-
.product(name: "DequeModule", package: "swift-collections"),
114-
.product(name: "HTTPTypes", package: "swift-http-types"),
115-
],
116-
swiftSettings: extraSettings
117-
),
118-
.target(
119-
name: "AsyncStreaming",
120-
dependencies: [
121-
.product(name: "BasicContainers", package: "swift-collections")
94+
.product(name: "HTTPServer", package: "swift-http-api-proposal"),
12295
],
12396
swiftSettings: extraSettings
12497
),

Sources/AsyncStreaming/EitherError.swift

Lines changed: 0 additions & 56 deletions
This file was deleted.

Sources/AsyncStreaming/Internal/InlineArray+convenience.swift

Lines changed: 0 additions & 24 deletions
This file was deleted.

Sources/AsyncStreaming/Internal/Optional+SendingTake.swift

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)