From 7f98ba3cebcd578429d89922820e9bf265611882 Mon Sep 17 00:00:00 2001 From: George Barnett Date: Wed, 6 Nov 2024 17:35:03 +0000 Subject: [PATCH 1/3] Remove '@_exported import GRPCCore' Motivation: We added '@_exported import GRPCCore' to transport modules to make it easier for users as it saves them from adding an import. On reflection we've our position on this has changed and the implicit dependency will likely make things less clear. Modifications: - Remove exported import from in-proc transport - Update tutorials/examples to have explicit 'GRPCCore' imports Result: More explicit dependencies --- Examples/echo/Package.swift | 2 ++ Examples/hello-world/Package.swift | 2 ++ .../hello-world/Sources/Subcommands/Greet.swift | 1 + .../hello-world/Sources/Subcommands/Serve.swift | 1 + Examples/route-guide/Package.swift | 2 ++ .../Sources/Subcommands/GetFeature.swift | 1 + .../Sources/Subcommands/ListFeatures.swift | 1 + .../Sources/Subcommands/RecordRoute.swift | 1 + .../Sources/Subcommands/RouteChat.swift | 1 + .../route-guide/Sources/Subcommands/Serve.swift | 1 + .../route-guide-sec01-step08-description.swift | 1 + .../route-guide-sec05-step00-package.swift | 1 + .../route-guide-sec05-step01-package.swift | 1 + .../route-guide-sec05-step02-package.swift | 1 + .../route-guide-sec05-step07-server.swift | 1 + .../route-guide-sec05-step08-run.swift | 1 + ...oute-guide-sec06-step02-add-run-client.swift | 2 -- ...route-guide-sec06-step03-create-client.swift | 1 + .../route-guide-sec06-step04-run-client.swift | 1 + .../route-guide-sec06-step05-stub.swift | 1 + .../route-guide-sec06-step06-get-feature.swift | 1 + ...route-guide-sec06-step07-list-features.swift | 1 + .../route-guide-sec06-step08-record-route.swift | 1 + .../route-guide-sec06-step09-route-chat.swift | 1 + .../Tutorials/Route-Guide/Route-Guide.tutorial | 5 +++-- Sources/GRPCInProcessTransport/Exports.swift | 17 ----------------- 26 files changed, 29 insertions(+), 21 deletions(-) delete mode 100644 Sources/GRPCInProcessTransport/Exports.swift diff --git a/Examples/echo/Package.swift b/Examples/echo/Package.swift index 4510456be..e2f4b696b 100644 --- a/Examples/echo/Package.swift +++ b/Examples/echo/Package.swift @@ -21,6 +21,7 @@ let package = Package( name: "echo", platforms: [.macOS("15.0")], dependencies: [ + .package(url: "https://github.com/grpc/grpc-swift", exact: "1.0.0-alpha.1"), .package(url: "https://github.com/grpc/grpc-swift-protobuf", exact: "1.0.0-alpha.1"), .package(url: "https://github.com/grpc/grpc-swift-nio-transport", branch: "1.0.0-alpha.1"), .package(url: "https://github.com/apple/swift-argument-parser", from: "1.5.0"), @@ -29,6 +30,7 @@ let package = Package( .executableTarget( name: "echo", dependencies: [ + .product(name: "GRPCCore", package: "grpc-swift"), .product(name: "GRPCNIOTransportHTTP2", package: "grpc-swift-nio-transport"), .product(name: "GRPCProtobuf", package: "grpc-swift-protobuf"), .product(name: "ArgumentParser", package: "swift-argument-parser"), diff --git a/Examples/hello-world/Package.swift b/Examples/hello-world/Package.swift index 52a9b349a..05bf65acb 100644 --- a/Examples/hello-world/Package.swift +++ b/Examples/hello-world/Package.swift @@ -21,6 +21,7 @@ let package = Package( name: "hello-world", platforms: [.macOS("15.0")], dependencies: [ + .package(url: "https://github.com/grpc/grpc-swift", exact: "1.0.0-alpha.1"), .package(url: "https://github.com/grpc/grpc-swift-protobuf", exact: "1.0.0-alpha.1"), .package(url: "https://github.com/grpc/grpc-swift-nio-transport", exact: "1.0.0-alpha.1"), .package(url: "https://github.com/apple/swift-argument-parser", from: "1.5.0"), @@ -29,6 +30,7 @@ let package = Package( .executableTarget( name: "hello-world", dependencies: [ + .product(name: "GRPCCore", package: "grpc-swift"), .product(name: "GRPCNIOTransportHTTP2", package: "grpc-swift-nio-transport"), .product(name: "GRPCProtobuf", package: "grpc-swift-protobuf"), .product(name: "ArgumentParser", package: "swift-argument-parser"), diff --git a/Examples/hello-world/Sources/Subcommands/Greet.swift b/Examples/hello-world/Sources/Subcommands/Greet.swift index 64d405863..1b6e817c2 100644 --- a/Examples/hello-world/Sources/Subcommands/Greet.swift +++ b/Examples/hello-world/Sources/Subcommands/Greet.swift @@ -15,6 +15,7 @@ */ import ArgumentParser +import GRPCNIOCore import GRPCNIOTransportHTTP2 import GRPCProtobuf diff --git a/Examples/hello-world/Sources/Subcommands/Serve.swift b/Examples/hello-world/Sources/Subcommands/Serve.swift index ef5dc2935..d65483865 100644 --- a/Examples/hello-world/Sources/Subcommands/Serve.swift +++ b/Examples/hello-world/Sources/Subcommands/Serve.swift @@ -15,6 +15,7 @@ */ import ArgumentParser +import GRPCCore import GRPCNIOTransportHTTP2 import GRPCProtobuf diff --git a/Examples/route-guide/Package.swift b/Examples/route-guide/Package.swift index 79e553920..3714b3122 100644 --- a/Examples/route-guide/Package.swift +++ b/Examples/route-guide/Package.swift @@ -21,6 +21,7 @@ let package = Package( name: "route-guide", platforms: [.macOS("15.0")], dependencies: [ + .package(url: "https://github.com/grpc/grpc-swift", exact: "1.0.0-alpha.1"), .package(url: "https://github.com/grpc/grpc-swift-protobuf", exact: "1.0.0-alpha.1"), .package(url: "https://github.com/grpc/grpc-swift-nio-transport", exact: "1.0.0-alpha.1"), .package(url: "https://github.com/apple/swift-argument-parser", from: "1.5.0"), @@ -29,6 +30,7 @@ let package = Package( .executableTarget( name: "route-guide", dependencies: [ + .product(name: "GRPCCore", package: "grpc-swift"), .product(name: "GRPCNIOTransportHTTP2", package: "grpc-swift-nio-transport"), .product(name: "GRPCProtobuf", package: "grpc-swift-protobuf"), .product(name: "ArgumentParser", package: "swift-argument-parser"), diff --git a/Examples/route-guide/Sources/Subcommands/GetFeature.swift b/Examples/route-guide/Sources/Subcommands/GetFeature.swift index 72ba1d1a4..890d432cd 100644 --- a/Examples/route-guide/Sources/Subcommands/GetFeature.swift +++ b/Examples/route-guide/Sources/Subcommands/GetFeature.swift @@ -15,6 +15,7 @@ */ import ArgumentParser +import GRPCCore import GRPCNIOTransportHTTP2 struct GetFeature: AsyncParsableCommand { diff --git a/Examples/route-guide/Sources/Subcommands/ListFeatures.swift b/Examples/route-guide/Sources/Subcommands/ListFeatures.swift index 7e83add71..e2d1a5f5c 100644 --- a/Examples/route-guide/Sources/Subcommands/ListFeatures.swift +++ b/Examples/route-guide/Sources/Subcommands/ListFeatures.swift @@ -15,6 +15,7 @@ */ import ArgumentParser +import GRPCCore import GRPCNIOTransportHTTP2 struct ListFeatures: AsyncParsableCommand { diff --git a/Examples/route-guide/Sources/Subcommands/RecordRoute.swift b/Examples/route-guide/Sources/Subcommands/RecordRoute.swift index 7cdf30cd2..e6d1611f1 100644 --- a/Examples/route-guide/Sources/Subcommands/RecordRoute.swift +++ b/Examples/route-guide/Sources/Subcommands/RecordRoute.swift @@ -15,6 +15,7 @@ */ import ArgumentParser +import GRPCCore import GRPCNIOTransportHTTP2 struct RecordRoute: AsyncParsableCommand { diff --git a/Examples/route-guide/Sources/Subcommands/RouteChat.swift b/Examples/route-guide/Sources/Subcommands/RouteChat.swift index 3461e1f75..d25352662 100644 --- a/Examples/route-guide/Sources/Subcommands/RouteChat.swift +++ b/Examples/route-guide/Sources/Subcommands/RouteChat.swift @@ -15,6 +15,7 @@ */ import ArgumentParser +import GRPCCore import GRPCNIOTransportHTTP2 struct RouteChat: AsyncParsableCommand { diff --git a/Examples/route-guide/Sources/Subcommands/Serve.swift b/Examples/route-guide/Sources/Subcommands/Serve.swift index c799b4fb7..8651346d4 100644 --- a/Examples/route-guide/Sources/Subcommands/Serve.swift +++ b/Examples/route-guide/Sources/Subcommands/Serve.swift @@ -16,6 +16,7 @@ import ArgumentParser import Foundation +import GRPCCore import GRPCNIOTransportHTTP2 import GRPCProtobuf import Synchronization diff --git a/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec01-step08-description.swift b/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec01-step08-description.swift index 09de19627..65a51d4b9 100644 --- a/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec01-step08-description.swift +++ b/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec01-step08-description.swift @@ -12,6 +12,7 @@ let package = Package( .executableTarget( name: "RouteGuide", dependencies: [ + .product(name: "GRPCCore", package: "grpc-swift"), .product(name: "GRPCNIOTransportHTTP2", package: "grpc-swift-nio-transport"), .product(name: "GRPCProtobuf", package: "grpc-swift-protobuf"), ] diff --git a/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec05-step00-package.swift b/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec05-step00-package.swift index 09de19627..65a51d4b9 100644 --- a/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec05-step00-package.swift +++ b/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec05-step00-package.swift @@ -12,6 +12,7 @@ let package = Package( .executableTarget( name: "RouteGuide", dependencies: [ + .product(name: "GRPCCore", package: "grpc-swift"), .product(name: "GRPCNIOTransportHTTP2", package: "grpc-swift-nio-transport"), .product(name: "GRPCProtobuf", package: "grpc-swift-protobuf"), ] diff --git a/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec05-step01-package.swift b/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec05-step01-package.swift index aac2037d5..e5f9b1088 100644 --- a/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec05-step01-package.swift +++ b/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec05-step01-package.swift @@ -12,6 +12,7 @@ let package = Package( .executableTarget( name: "RouteGuide", dependencies: [ + .product(name: "GRPCCore", package: "grpc-swift"), .product(name: "GRPCNIOTransportHTTP2", package: "grpc-swift-nio-transport"), .product(name: "GRPCProtobuf", package: "grpc-swift-protobuf"), ], diff --git a/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec05-step02-package.swift b/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec05-step02-package.swift index 13c5b9816..1e8ef47e1 100644 --- a/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec05-step02-package.swift +++ b/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec05-step02-package.swift @@ -13,6 +13,7 @@ let package = Package( .executableTarget( name: "RouteGuide", dependencies: [ + .product(name: "GRPCCore", package: "grpc-swift"), .product(name: "GRPCNIOTransportHTTP2", package: "grpc-swift-nio-transport"), .product(name: "GRPCProtobuf", package: "grpc-swift-protobuf"), .product(name: "ArgumentParser", package: "swift-argument-parser"), diff --git a/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec05-step07-server.swift b/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec05-step07-server.swift index a9797e762..a0ba287f4 100644 --- a/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec05-step07-server.swift +++ b/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec05-step07-server.swift @@ -1,3 +1,4 @@ +import GRPCCore import GRPCNIOTransportHTTP2 extension RouteGuide { diff --git a/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec05-step08-run.swift b/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec05-step08-run.swift index ac8280a58..6502dee78 100644 --- a/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec05-step08-run.swift +++ b/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec05-step08-run.swift @@ -1,3 +1,4 @@ +import GRPCCore import GRPCNIOTransportHTTP2 extension RouteGuide { diff --git a/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec06-step02-add-run-client.swift b/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec06-step02-add-run-client.swift index 55d8b69ee..15d650a6f 100644 --- a/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec06-step02-add-run-client.swift +++ b/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec06-step02-add-run-client.swift @@ -1,5 +1,3 @@ -import GRPCNIOTransportHTTP2 - extension RouteGuide { func runClient() async throws { } diff --git a/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec06-step03-create-client.swift b/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec06-step03-create-client.swift index 445f09ede..ef8bc14ae 100644 --- a/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec06-step03-create-client.swift +++ b/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec06-step03-create-client.swift @@ -1,3 +1,4 @@ +import GRPCCore import GRPCNIOTransportHTTP2 extension RouteGuide { diff --git a/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec06-step04-run-client.swift b/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec06-step04-run-client.swift index c667bf626..f87f8cc80 100644 --- a/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec06-step04-run-client.swift +++ b/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec06-step04-run-client.swift @@ -1,3 +1,4 @@ +import GRPCCore import GRPCNIOTransportHTTP2 extension RouteGuide { diff --git a/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec06-step05-stub.swift b/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec06-step05-stub.swift index 6d4e9dc7e..15322b30f 100644 --- a/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec06-step05-stub.swift +++ b/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec06-step05-stub.swift @@ -1,3 +1,4 @@ +import GRPCCore import GRPCNIOTransportHTTP2 extension RouteGuide { diff --git a/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec06-step06-get-feature.swift b/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec06-step06-get-feature.swift index 4f7efb31c..04f75c699 100644 --- a/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec06-step06-get-feature.swift +++ b/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec06-step06-get-feature.swift @@ -1,3 +1,4 @@ +import GRPCCore import GRPCNIOTransportHTTP2 extension RouteGuide { diff --git a/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec06-step07-list-features.swift b/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec06-step07-list-features.swift index 22caf8eeb..adc6a25f4 100644 --- a/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec06-step07-list-features.swift +++ b/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec06-step07-list-features.swift @@ -1,3 +1,4 @@ +import GRPCCore import GRPCNIOTransportHTTP2 extension RouteGuide { diff --git a/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec06-step08-record-route.swift b/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec06-step08-record-route.swift index ab68b76c9..448eaa0ac 100644 --- a/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec06-step08-record-route.swift +++ b/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec06-step08-record-route.swift @@ -1,3 +1,4 @@ +import GRPCCore import GRPCNIOTransportHTTP2 extension RouteGuide { diff --git a/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec06-step09-route-chat.swift b/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec06-step09-route-chat.swift index fddc42966..12f75d83d 100644 --- a/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec06-step09-route-chat.swift +++ b/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec06-step09-route-chat.swift @@ -1,3 +1,4 @@ +import GRPCCore import GRPCNIOTransportHTTP2 extension RouteGuide { diff --git a/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Route-Guide.tutorial b/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Route-Guide.tutorial index ef4f3809f..2d9192efc 100644 --- a/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Route-Guide.tutorial +++ b/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Route-Guide.tutorial @@ -77,8 +77,9 @@ Next we can add a target. In this tutorial we'll create a single executable target which can act as both a client and a server. - We require two gRPC dependencies: `GRPCNIOTransportHTTP2"` provides an implementation of an HTTP/2 - client and server, while `GRPCProtobuf` provides the necessary components to serialize + We require three gRPC dependencies: `GRPCCore` provides core abstractions and runtime + components, `GRPCNIOTransportHTTP2` provides an implementation of an HTTP/2 + client and server, and `GRPCProtobuf` provides the necessary components to serialize and deserialize `SwiftProtobuf` messages. @Code(name: "Package.swift", file: "route-guide-sec01-step08-description.swift") diff --git a/Sources/GRPCInProcessTransport/Exports.swift b/Sources/GRPCInProcessTransport/Exports.swift deleted file mode 100644 index 1f32ac4d1..000000000 --- a/Sources/GRPCInProcessTransport/Exports.swift +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright 2024, gRPC Authors All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -@_exported import GRPCCore From d972263c6b732e6d39df0121f1982c2c4b43434a Mon Sep 17 00:00:00 2001 From: George Barnett Date: Fri, 8 Nov 2024 11:11:49 +0000 Subject: [PATCH 2/3] Fix version --- Examples/echo/Package.swift | 2 +- Examples/hello-world/Package.swift | 2 +- Examples/route-guide/Package.swift | 2 +- README.md | 6 ++++-- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Examples/echo/Package.swift b/Examples/echo/Package.swift index e2f4b696b..3792fcb04 100644 --- a/Examples/echo/Package.swift +++ b/Examples/echo/Package.swift @@ -21,7 +21,7 @@ let package = Package( name: "echo", platforms: [.macOS("15.0")], dependencies: [ - .package(url: "https://github.com/grpc/grpc-swift", exact: "1.0.0-alpha.1"), + .package(url: "https://github.com/grpc/grpc-swift", exact: "2.0.0-alpha.1"), .package(url: "https://github.com/grpc/grpc-swift-protobuf", exact: "1.0.0-alpha.1"), .package(url: "https://github.com/grpc/grpc-swift-nio-transport", branch: "1.0.0-alpha.1"), .package(url: "https://github.com/apple/swift-argument-parser", from: "1.5.0"), diff --git a/Examples/hello-world/Package.swift b/Examples/hello-world/Package.swift index 05bf65acb..5437aa7dc 100644 --- a/Examples/hello-world/Package.swift +++ b/Examples/hello-world/Package.swift @@ -21,7 +21,7 @@ let package = Package( name: "hello-world", platforms: [.macOS("15.0")], dependencies: [ - .package(url: "https://github.com/grpc/grpc-swift", exact: "1.0.0-alpha.1"), + .package(url: "https://github.com/grpc/grpc-swift", exact: "2.0.0-alpha.1"), .package(url: "https://github.com/grpc/grpc-swift-protobuf", exact: "1.0.0-alpha.1"), .package(url: "https://github.com/grpc/grpc-swift-nio-transport", exact: "1.0.0-alpha.1"), .package(url: "https://github.com/apple/swift-argument-parser", from: "1.5.0"), diff --git a/Examples/route-guide/Package.swift b/Examples/route-guide/Package.swift index 3714b3122..7aba9a836 100644 --- a/Examples/route-guide/Package.swift +++ b/Examples/route-guide/Package.swift @@ -21,7 +21,7 @@ let package = Package( name: "route-guide", platforms: [.macOS("15.0")], dependencies: [ - .package(url: "https://github.com/grpc/grpc-swift", exact: "1.0.0-alpha.1"), + .package(url: "https://github.com/grpc/grpc-swift", exact: "2.0.0-alpha.1"), .package(url: "https://github.com/grpc/grpc-swift-protobuf", exact: "1.0.0-alpha.1"), .package(url: "https://github.com/grpc/grpc-swift-nio-transport", exact: "1.0.0-alpha.1"), .package(url: "https://github.com/apple/swift-argument-parser", from: "1.5.0"), diff --git a/README.md b/README.md index bc2c4d3cf..ea764d8e0 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ about gRPC on the [gRPC project's website][grpcio]. - [`grpc-swift-nio-transport`][grpc-swift-nio-transport] contains high-performance HTTP/2 client and server transport implementations for gRPC Swift built on top of SwiftNIO. - [`grpc-swift-protobuf`][grpc-swift-protobuf] contains integrations with SwiftProtobuf for gRPC Swift. - [`grpc-swift-extras`][grpc-swift-extras] contains optional extras for gRPC Swift. - + ## Quick Start @@ -32,6 +32,7 @@ let package = Package( name: "foo-package", platforms: [.macOS("15.0")], dependencies: [ + .package(url: "https://github.com/grpc/grpc-swift.git", from: "2.0.0-alpha.1"), .package(url: "https://github.com/grpc/grpc-swift-nio-transport.git", from: "1.0.0-alpha.1"), .package(url: "https://github.com/grpc/grpc-swift-protobuf.git", from: "1.0.0-alpha.1"), ], @@ -39,6 +40,7 @@ let package = Package( .executableTarget( name: "bar-target", dependencies: [ + .product(name: "GRPCCore", package: "grpc-swift"), .product(name: "GRPCNIOTransportHTTP2", package: "grpc-swift-nio-transport"), .product(name: "GRPCProtobuf", package: "grpc-swift-protobuf"), ] @@ -52,4 +54,4 @@ let package = Package( [spi-grpc-swift]: https://swiftpackageindex.com/grpc/grpc-swift/documentation [grpc-swift-nio-transport]: https://github.com/grpc/grpc-swift-nio-transport [grpc-swift-protobuf]: https://github.com/grpc/grpc-swift-protobuf -[grpc-swift-extras]: https://github.com/grpc/grpc-swift-extras +[grpc-swift-extras]: https://github.com/grpc/grpc-swift-extras From edb50bd64f1707647ea5811a32b8e53fe7490c97 Mon Sep 17 00:00:00 2001 From: George Barnett Date: Fri, 8 Nov 2024 11:23:19 +0000 Subject: [PATCH 3/3] Fix typo --- Examples/hello-world/Sources/Subcommands/Greet.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Examples/hello-world/Sources/Subcommands/Greet.swift b/Examples/hello-world/Sources/Subcommands/Greet.swift index 1b6e817c2..cd005534a 100644 --- a/Examples/hello-world/Sources/Subcommands/Greet.swift +++ b/Examples/hello-world/Sources/Subcommands/Greet.swift @@ -15,7 +15,7 @@ */ import ArgumentParser -import GRPCNIOCore +import GRPCCore import GRPCNIOTransportHTTP2 import GRPCProtobuf