Skip to content

Commit 29dedf9

Browse files
committed
1 parent a60f159 commit 29dedf9

29 files changed

+168
-179
lines changed

.swiftformat

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,5 @@
1414
--disable andOperator
1515
--disable wrapMultilineStatementBraces
1616
--disable enumNamespaces
17-
--disable redundantExtensionACL
1817

1918
# rules

Package.swift

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ let package = Package(
1818
.library(name: "TencentSCFTesting", targets: ["TencentSCFTesting"]),
1919
],
2020
dependencies: [
21-
.package(url: "https://github.com/apple/swift-nio.git", from: "2.17.0"),
21+
.package(url: "https://github.com/apple/swift-nio.git", from: "2.32.0"),
2222
.package(url: "https://github.com/apple/swift-log.git", from: "1.0.0"),
2323
.package(url: "https://github.com/swift-server/swift-backtrace.git", from: "1.1.0"),
2424
.package(url: "https://github.com/stevapple/tencent-cloud-core.git", .upToNextMinor(from: "0.2.0")),
@@ -27,7 +27,7 @@ let package = Package(
2727
targets: [
2828
.target(name: "TencentSCFRuntime", dependencies: [
2929
.byName(name: "TencentSCFRuntimeCore"),
30-
.product(name: "NIO", package: "swift-nio"),
30+
.product(name: "NIOCore", package: "swift-nio"),
3131
.product(name: "NIOFoundationCompat", package: "swift-nio"),
3232
]),
3333
.testTarget(name: "TencentSCFRuntimeTests", dependencies: [
@@ -39,6 +39,9 @@ let package = Package(
3939
.product(name: "Logging", package: "swift-log"),
4040
.product(name: "Backtrace", package: "swift-backtrace"),
4141
.product(name: "NIOHTTP1", package: "swift-nio"),
42+
.product(name: "NIOCore", package: "swift-nio"),
43+
.product(name: "NIOConcurrencyHelpers", package: "swift-nio"),
44+
.product(name: "NIOPosix", package: "swift-nio"),
4245
]),
4346
.testTarget(name: "TencentSCFRuntimeCoreTests", dependencies: [
4447
.byName(name: "TencentSCFRuntimeCore"),
@@ -58,8 +61,12 @@ let package = Package(
5861
// for perf testing
5962
.target(name: "MockServer", dependencies: [
6063
.product(name: "NIOHTTP1", package: "swift-nio"),
64+
.product(name: "NIO", package: "swift-nio"),
6165
]),
6266
.target(name: "StringSample", dependencies: ["TencentSCFRuntime"]),
63-
.target(name: "CodableSample", dependencies: ["TencentSCFRuntime"]),
67+
.target(name: "CodableSample", dependencies: [
68+
.byName(name: "TencentSCFRuntime"),
69+
.product(name: "NIO", package: "swift-nio"),
70+
]),
6471
]
6572
)

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,9 @@ Performance sensitive cloud functions may choose to use a more complex API which
111111

112112
```swift
113113
// Import the modules.
114+
import NIOCore
114115
import TencentSCFRuntime
115116
import TencentSCFEvents
116-
import NIO
117-
118117
// Our SCF handler, conforms to EventLoopSCFHandler.
119118
struct Handler: EventLoopSCFHandler {
120119
typealias In = COS.Event // Request type

Sources/CodableSample/main.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
//
2626
//===------------------------------------------------------------------------------------===//
2727

28-
import NIO
28+
import NIOCore
2929
import TencentSCFRuntime
3030

3131
struct Request: Decodable {

Sources/MockServer/main.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,9 @@
2626
//===------------------------------------------------------------------------------------===//
2727

2828
import Foundation
29-
import NIO
29+
import NIOCore
3030
import NIOHTTP1
31+
import NIOPosix
3132

3233
internal struct MockServer {
3334
private let group: EventLoopGroup

Sources/StringSample/main.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
//
2626
//===------------------------------------------------------------------------------------===//
2727

28-
import NIO
28+
import NIOCore
2929
import TencentSCFRuntimeCore
3030

3131
// In this example we are receiving and responding with strings.

Sources/TencentSCFRuntime/SCF+Codable.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
import class Foundation.JSONDecoder
2929
import class Foundation.JSONEncoder
30-
import NIO
30+
import NIOCore
3131
import NIOFoundationCompat
3232
@_exported import TencentSCFRuntimeCore
3333

0 commit comments

Comments
 (0)