Skip to content

Commit

Permalink
[UPDATE] remove @preconcurrency and fix warnning for 6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Grady Zhuo committed Sep 11, 2024
1 parent c861288 commit 6310ff2
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 29 deletions.
39 changes: 20 additions & 19 deletions Package.resolved
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"originHash" : "f868a8ea7ed17f6a77a82457b30f295c87ce312e7d8167e11237d802b715fb76",
"pins" : [
{
"identity" : "grpc-swift",
Expand All @@ -23,62 +24,62 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-collections.git",
"state" : {
"revision" : "94cf62b3ba8d4bed62680a282d4c25f9c63c2efb",
"version" : "1.1.0"
"revision" : "9bf03ff58ce34478e66aaee630e491823326fd06",
"version" : "1.1.3"
}
},
{
"identity" : "swift-http-types",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-http-types",
"state" : {
"revision" : "9bee2fdb79cc740081abd8ebd80738063d632286",
"version" : "1.1.0"
"revision" : "ae67c8178eb46944fd85e4dc6dd970e1f3ed6ccd",
"version" : "1.3.0"
}
},
{
"identity" : "swift-log",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-log.git",
"state" : {
"revision" : "e97a6fcb1ab07462881ac165fdbb37f067e205d5",
"version" : "1.5.4"
"revision" : "9cb486020ebf03bfa5b5df985387a14a98744537",
"version" : "1.6.1"
}
},
{
"identity" : "swift-nio",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-nio.git",
"state" : {
"revision" : "359c461e5561d22c6334828806cc25d759ca7aa6",
"version" : "2.65.0"
"revision" : "9746cf80e29edfef2a39924a66731249223f42a3",
"version" : "2.72.0"
}
},
{
"identity" : "swift-nio-extras",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-nio-extras.git",
"state" : {
"revision" : "a3b640d7dc567225db7c94386a6e71aded1bfa63",
"version" : "1.22.0"
"revision" : "d1ead62745cc3269e482f1c51f27608057174379",
"version" : "1.24.0"
}
},
{
"identity" : "swift-nio-http2",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-nio-http2.git",
"state" : {
"revision" : "c6afe04165c865faaa687b42c32ed76dfcc91076",
"version" : "1.31.0"
"revision" : "b5f7062b60e4add1e8c343ba4eb8da2e324b3a94",
"version" : "1.34.0"
}
},
{
"identity" : "swift-nio-ssl",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-nio-ssl.git",
"state" : {
"revision" : "7c381eb6083542b124a6c18fae742f55001dc2b5",
"version" : "2.26.0"
"revision" : "7b84abbdcef69cc3be6573ac12440220789dcd69",
"version" : "2.27.2"
}
},
{
Expand All @@ -95,19 +96,19 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-protobuf.git",
"state" : {
"revision" : "9f0c76544701845ad98716f3f6a774a892152bcb",
"version" : "1.26.0"
"revision" : "edb6ed4919f7756157fe02f2552b7e3850a538e5",
"version" : "1.28.1"
}
},
{
"identity" : "swift-system",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-system.git",
"state" : {
"revision" : "025bcb1165deab2e20d4eaba79967ce73013f496",
"version" : "1.2.1"
"revision" : "d2ba781702a1d8285419c15ee62fd734a9437ff5",
"version" : "1.3.2"
}
}
],
"version" : 2
"version" : 3
}
10 changes: 5 additions & 5 deletions [email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ let package = Package(
),
],
dependencies: [
.package(url: "https://github.com/grpc/grpc-swift.git", from: "1.15.0"),
.package(url: "https://github.com/apple/swift-protobuf.git", from: "1.6.0"),
.package(url: "https://github.com/grpc/grpc-swift.git", from: "1.23.0"),
.package(url: "https://github.com/apple/swift-log.git", from: "1.0.0"),
],
targets: [
Expand All @@ -33,8 +32,7 @@ let package = Package(
.target(
name: "GRPCEncapsulates",
dependencies: [
.product(name: "GRPC", package: "grpc-swift"),
.product(name: "SwiftProtobuf", package: "swift-protobuf"),
.product(name: "GRPC", package: "grpc-swift")
]
),
.testTarget(
Expand All @@ -52,5 +50,7 @@ let package = Package(
dependencies: ["GRPCEncapsulates"]
),
],
swiftLanguageVersions: [.version("6")]
swiftLanguageModes: [
.v6
]
)
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Created by Grady Zhuo on 2024/5/21.
//

@preconcurrency import Foundation
import Foundation
import GRPCEncapsulates

extension Stream {
Expand Down
6 changes: 3 additions & 3 deletions Sources/EventStoreDB/StreamClient/StreamClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public struct StreamClient: GRPCConcreteClient {

public private(set) var channel: GRPCChannel
public var callOptions: CallOptions

public init(channel: GRPCChannel, callOptions: CallOptions) {
self.channel = channel
self.callOptions = callOptions
Expand Down Expand Up @@ -61,7 +61,7 @@ extension StreamClient {

package func subscribe(stream: Stream.Identifier, from cursor: Cursor<Stream.Revision>, options: StreamClient.Subscribe.Options) async throws -> Subscription {
let handler = Subscribe(streamIdentifier: stream, cursor: cursor, options: options)
var request = try handler.build()
let request = try handler.build()

let getSubscriptionCall = underlyingClient.makeReadCall(request)
return try await .init(readCall: getSubscriptionCall)
Expand All @@ -71,7 +71,7 @@ extension StreamClient {

package func subscribeToAll(from cursor: Cursor<Stream.Position>, options: StreamClient.SubscribeToAll.Options) async throws -> Subscription {
let handler = SubscribeToAll(cursor: cursor, options: options)
var request = try handler.build()
let request = try handler.build()

let getSubscriptionCall = underlyingClient.makeReadCall(request)
return try await .init(readCall: getSubscriptionCall)
Expand Down
2 changes: 1 addition & 1 deletion Sources/EventStoreDB/utils/Error/Error.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Created by Grady Zhuo on 2023/10/17.
//

@preconcurrency import Foundation
import Foundation
import GRPC
import GRPCEncapsulates

Expand Down

0 comments on commit 6310ff2

Please sign in to comment.