Skip to content

Commit 454042f

Browse files
authored
Merge pull request #40 from sidepelican/split_package
Split targets into multiple packages
2 parents 12116d0 + 364bbc7 commit 454042f

File tree

14 files changed

+103
-1175
lines changed

14 files changed

+103
-1175
lines changed

.github/workflows/test.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,10 @@ jobs:
1313
strategy:
1414
matrix:
1515
os: [ubuntu-latest, macos-latest]
16-
defaults:
17-
run:
18-
working-directory: example
1916
steps:
2017
- uses: actions/checkout@v4
21-
- run: npm ci
22-
working-directory: example/TSClient
23-
- run: ./test.sh vapor
24-
- run: ./test.sh hummingbird
18+
- run: swift test
19+
# - run: npm ci
20+
# working-directory: example/TSClient
21+
# - run: ./test.sh vapor
22+
# - run: ./test.sh hummingbird

Package.resolved

Lines changed: 1 addition & 280 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package.swift

Lines changed: 6 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -7,38 +7,13 @@ let package = Package(
77
name: "CallableKit",
88
platforms: [.macOS(.v14)],
99
products: [
10-
.executable(name: "codegen", targets: ["Codegen"]),
1110
.library(name: "CallableKit", targets: ["CallableKit"]),
12-
.library(name: "CallableKitVaporTransport", targets: ["CallableKitVaporTransport"]),
13-
.library(name: "CallableKitHummingbirdTransport", targets: ["CallableKitHummingbirdTransport"]),
1411
.library(name: "CallableKitURLSessionStub", targets: ["CallableKitURLSessionStub"]),
1512
],
1613
dependencies: [
17-
.package(url: "https://github.com/apple/swift-argument-parser.git", from: "1.2.2"),
18-
.package(url: "https://github.com/swiftlang/swift-syntax.git", from: "600.0.1"),
19-
.package(url: "https://github.com/omochi/CodableToTypeScript.git", from: "3.0.1"),
20-
.package(url: "https://github.com/omochi/SwiftTypeReader.git", from: "3.1.0"),
21-
.package(url: "https://github.com/vapor/vapor.git", from: "4.106.7"),
22-
.package(url: "https://github.com/hummingbird-project/hummingbird.git", from: "2.5.0"),
14+
.package(url: "https://github.com/swiftlang/swift-syntax.git", "600.0.0"..<"999.0.0"),
2315
],
2416
targets: [
25-
.executableTarget(
26-
name: "Codegen",
27-
dependencies: [
28-
.product(name: "ArgumentParser", package: "swift-argument-parser"),
29-
"CodegenImpl",
30-
]
31-
),
32-
.target(
33-
name: "CodegenImpl",
34-
dependencies: [
35-
"CodableToTypeScript",
36-
"SwiftTypeReader",
37-
],
38-
swiftSettings: [
39-
.enableUpcomingFeature("BareSlashRegexLiterals"),
40-
]
41-
),
4217
.target(
4318
name: "CallableKit",
4419
dependencies: [
@@ -53,25 +28,18 @@ let package = Package(
5328
.product(name: "SwiftSyntaxMacros", package: "swift-syntax"),
5429
]
5530
),
56-
.target(
57-
name: "CallableKitVaporTransport",
58-
dependencies: [
59-
.product(name: "Vapor", package: "vapor"),
60-
"CallableKit",
61-
]
62-
),
63-
.target(
64-
name: "CallableKitHummingbirdTransport",
31+
.testTarget(
32+
name: "CallableKitMacrosTests",
6533
dependencies: [
66-
.product(name: "Hummingbird", package: "hummingbird"),
67-
"CallableKit",
34+
.product(name: "SwiftSyntaxMacrosTestSupport", package: "swift-syntax"),
35+
"CallableKitMacros",
6836
]
6937
),
7038
.target(
7139
name: "CallableKitURLSessionStub",
7240
dependencies: [
7341
"CallableKit",
7442
]
75-
)
43+
),
7644
]
7745
)

Sources/CallableKit/StubClientProtocol.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,6 @@ extension StubClientProtocol {
4242
@inlinable public func send(
4343
path: String
4444
) async throws {
45-
_ = try await send(path: path, request: CallableKitEmpty())
45+
_ = try await send(path: path, request: CallableKitEmpty()) as CallableKitEmpty
4646
}
4747
}

0 commit comments

Comments
 (0)