From 2ed95d8573dadb593e9ae339ee9b796268599593 Mon Sep 17 00:00:00 2001 From: George Barnett Date: Fri, 31 Jan 2025 13:46:42 +0000 Subject: [PATCH] Update dependency requirements and docs (#2188) --- Examples/echo-metadata/Package.swift | 6 +++--- Examples/echo/Package.swift | 6 +++--- Examples/error-details/Package.swift | 4 ++-- Examples/hello-world/Package.swift | 6 +++--- Examples/reflection-server/Package.swift | 8 ++++---- Examples/route-guide/Package.swift | 6 +++--- README.md | 15 +++++---------- .../GRPCCore/Documentation.docc/Documentation.md | 3 --- .../Tutorials/Hello-World/Hello-World.tutorial | 2 +- .../route-guide-sec01-step07-description.swift | 6 +++--- .../route-guide-sec01-step08-description.swift | 6 +++--- .../route-guide-sec01-step09-plugin.swift | 6 +++--- .../route-guide-sec05-step00-package.swift | 6 +++--- .../route-guide-sec05-step01-package.swift | 6 +++--- .../route-guide-sec05-step02-package.swift | 6 +++--- .../Tutorials/Route-Guide/Route-Guide.tutorial | 3 +-- 16 files changed, 43 insertions(+), 52 deletions(-) diff --git a/Examples/echo-metadata/Package.swift b/Examples/echo-metadata/Package.swift index 9cad1a0ff..e19ab6ef0 100644 --- a/Examples/echo-metadata/Package.swift +++ b/Examples/echo-metadata/Package.swift @@ -21,9 +21,9 @@ let package = Package( name: "echo-metadata", platforms: [.macOS("15.0")], dependencies: [ - .package(url: "https://github.com/grpc/grpc-swift.git", exact: "2.0.0-rc.1"), - .package(url: "https://github.com/grpc/grpc-swift-protobuf.git", exact: "1.0.0-rc.1"), - .package(url: "https://github.com/grpc/grpc-swift-nio-transport.git", exact: "1.0.0-rc.1"), + .package(url: "https://github.com/grpc/grpc-swift.git", from: "2.0.0"), + .package(url: "https://github.com/grpc/grpc-swift-protobuf.git", from: "1.0.0"), + .package(url: "https://github.com/grpc/grpc-swift-nio-transport.git", from: "1.0.0"), .package(url: "https://github.com/apple/swift-argument-parser.git", from: "1.5.0"), ], targets: [ diff --git a/Examples/echo/Package.swift b/Examples/echo/Package.swift index ca43e1957..6705a8b1f 100644 --- a/Examples/echo/Package.swift +++ b/Examples/echo/Package.swift @@ -21,9 +21,9 @@ let package = Package( name: "echo", platforms: [.macOS("15.0")], dependencies: [ - .package(url: "https://github.com/grpc/grpc-swift.git", exact: "2.0.0-rc.1"), - .package(url: "https://github.com/grpc/grpc-swift-protobuf.git", exact: "1.0.0-rc.1"), - .package(url: "https://github.com/grpc/grpc-swift-nio-transport.git", exact: "1.0.0-rc.1"), + .package(url: "https://github.com/grpc/grpc-swift.git", from: "2.0.0"), + .package(url: "https://github.com/grpc/grpc-swift-protobuf.git", from: "1.0.0"), + .package(url: "https://github.com/grpc/grpc-swift-nio-transport.git", from: "1.0.0"), .package(url: "https://github.com/apple/swift-argument-parser.git", from: "1.5.0"), ], targets: [ diff --git a/Examples/error-details/Package.swift b/Examples/error-details/Package.swift index 1810e76b0..b2f15c721 100644 --- a/Examples/error-details/Package.swift +++ b/Examples/error-details/Package.swift @@ -21,8 +21,8 @@ let package = Package( name: "error-details", platforms: [.macOS(.v15)], dependencies: [ - .package(url: "https://github.com/grpc/grpc-swift.git", exact: "2.0.0-rc.1"), - .package(url: "https://github.com/grpc/grpc-swift-protobuf.git", exact: "1.0.0-rc.1"), + .package(url: "https://github.com/grpc/grpc-swift.git", from: "2.0.0"), + .package(url: "https://github.com/grpc/grpc-swift-protobuf.git", from: "1.0.0"), ], targets: [ .executableTarget( diff --git a/Examples/hello-world/Package.swift b/Examples/hello-world/Package.swift index 237b86d8f..daa71a571 100644 --- a/Examples/hello-world/Package.swift +++ b/Examples/hello-world/Package.swift @@ -21,9 +21,9 @@ let package = Package( name: "hello-world", platforms: [.macOS("15.0")], dependencies: [ - .package(url: "https://github.com/grpc/grpc-swift.git", exact: "2.0.0-rc.1"), - .package(url: "https://github.com/grpc/grpc-swift-protobuf.git", exact: "1.0.0-rc.1"), - .package(url: "https://github.com/grpc/grpc-swift-nio-transport.git", exact: "1.0.0-rc.1"), + .package(url: "https://github.com/grpc/grpc-swift.git", from: "2.0.0"), + .package(url: "https://github.com/grpc/grpc-swift-protobuf.git", from: "1.0.0"), + .package(url: "https://github.com/grpc/grpc-swift-nio-transport.git", from: "1.0.0"), .package(url: "https://github.com/apple/swift-argument-parser.git", from: "1.5.0"), ], targets: [ diff --git a/Examples/reflection-server/Package.swift b/Examples/reflection-server/Package.swift index 8630885dd..4361c689c 100644 --- a/Examples/reflection-server/Package.swift +++ b/Examples/reflection-server/Package.swift @@ -21,10 +21,10 @@ let package = Package( name: "reflection-server", platforms: [.macOS(.v15)], dependencies: [ - .package(url: "https://github.com/grpc/grpc-swift.git", exact: "2.0.0-rc.1"), - .package(url: "https://github.com/grpc/grpc-swift-protobuf.git", exact: "1.0.0-rc.1"), - .package(url: "https://github.com/grpc/grpc-swift-nio-transport.git", exact: "1.0.0-rc.1"), - .package(url: "https://github.com/grpc/grpc-swift-extras.git", exact: "1.0.0-rc.1"), + .package(url: "https://github.com/grpc/grpc-swift.git", from: "2.0.0"), + .package(url: "https://github.com/grpc/grpc-swift-protobuf.git", from: "1.0.0"), + .package(url: "https://github.com/grpc/grpc-swift-nio-transport.git", from: "1.0.0"), + .package(url: "https://github.com/grpc/grpc-swift-extras.git", from: "1.0.0"), .package(url: "https://github.com/apple/swift-argument-parser.git", from: "1.5.0"), ], targets: [ diff --git a/Examples/route-guide/Package.swift b/Examples/route-guide/Package.swift index c6730cfb2..b4a9589f1 100644 --- a/Examples/route-guide/Package.swift +++ b/Examples/route-guide/Package.swift @@ -21,9 +21,9 @@ let package = Package( name: "route-guide", platforms: [.macOS("15.0")], dependencies: [ - .package(url: "https://github.com/grpc/grpc-swift.git", exact: "2.0.0-rc.1"), - .package(url: "https://github.com/grpc/grpc-swift-protobuf.git", exact: "1.0.0-rc.1"), - .package(url: "https://github.com/grpc/grpc-swift-nio-transport.git", exact: "1.0.0-rc.1"), + .package(url: "https://github.com/grpc/grpc-swift.git", from: "2.0.0"), + .package(url: "https://github.com/grpc/grpc-swift-protobuf.git", from: "1.0.0"), + .package(url: "https://github.com/grpc/grpc-swift-nio-transport.git", from: "1.0.0"), .package(url: "https://github.com/apple/swift-argument-parser.git", from: "1.5.0"), ], targets: [ diff --git a/README.md b/README.md index b5abda907..a6ea9c736 100644 --- a/README.md +++ b/README.md @@ -3,11 +3,6 @@ This repository contains a gRPC implementation for Swift. You can read more about gRPC on the [gRPC project's website][grpcio]. -> gRPC Swift v2.x is under active development on the `main` branch and takes -> full advantage of Swift's native concurrency features. -> -> v1.x is still supported and maintained on the `release/1.x` branch. - - 📚 **Documentation** and **tutorials** are available on the [Swift Package Index][spi-grpc-swift] - 💻 **Examples** are available in the [Examples](Examples) directory - 🚀 **Contributions** are welcome, please see [CONTRIBUTING.md](CONTRIBUTING.md) @@ -29,16 +24,16 @@ the SwiftNIO based transport and SwiftProtobuf serialization: import PackageDescription let package = Package( - name: "foo-package", + name: "Application", platforms: [.macOS("15.0")], dependencies: [ - .package(url: "https://github.com/grpc/grpc-swift.git", from: "2.0.0-rc.1"), - .package(url: "https://github.com/grpc/grpc-swift-nio-transport.git", from: "1.0.0-rc.1"), - .package(url: "https://github.com/grpc/grpc-swift-protobuf.git", from: "1.0.0-rc.1"), + .package(url: "https://github.com/grpc/grpc-swift.git", from: "2.0.0"), + .package(url: "https://github.com/grpc/grpc-swift-nio-transport.git", from: "1.0.0"), + .package(url: "https://github.com/grpc/grpc-swift-protobuf.git", from: "1.0.0"), ], targets: [ .executableTarget( - name: "bar-target", + name: "Server", dependencies: [ .product(name: "GRPCCore", package: "grpc-swift"), .product(name: "GRPCNIOTransportHTTP2", package: "grpc-swift-nio-transport"), diff --git a/Sources/GRPCCore/Documentation.docc/Documentation.md b/Sources/GRPCCore/Documentation.docc/Documentation.md index b885c72e8..7902e601c 100644 --- a/Sources/GRPCCore/Documentation.docc/Documentation.md +++ b/Sources/GRPCCore/Documentation.docc/Documentation.md @@ -2,9 +2,6 @@ A gRPC library for Swift written natively in Swift. -> 🚧 This module is part of gRPC Swift v2 which is under active development and in the pre-release -> stage. - ## Overview ### Package structure diff --git a/Sources/GRPCCore/Documentation.docc/Tutorials/Hello-World/Hello-World.tutorial b/Sources/GRPCCore/Documentation.docc/Tutorials/Hello-World/Hello-World.tutorial index 93788cf4b..a16c4edb2 100644 --- a/Sources/GRPCCore/Documentation.docc/Tutorials/Hello-World/Hello-World.tutorial +++ b/Sources/GRPCCore/Documentation.docc/Tutorials/Hello-World/Hello-World.tutorial @@ -18,7 +18,7 @@ repository by running the following command in a terminal: ```console - git clone --branch 2.0.0-rc.1 https://github.com/grpc/grpc-swift + git clone --branch 2.0.0 https://github.com/grpc/grpc-swift ``` You then need to change directory to the `Examples/hello-world` directory of the cloned diff --git a/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec01-step07-description.swift b/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec01-step07-description.swift index 1d964173c..e30951efb 100644 --- a/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec01-step07-description.swift +++ b/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec01-step07-description.swift @@ -5,9 +5,9 @@ let package = Package( name: "RouteGuide", platforms: [.macOS(.v15)], dependencies: [ - .package(url: "https://github.com/grpc/grpc-swift.git", from: "2.0.0-rc.1"), - .package(url: "https://github.com/grpc/grpc-swift-protobuf.git", from: "1.0.0-rc.1"), - .package(url: "https://github.com/grpc/grpc-swift-nio-transport.git", from: "1.0.0-rc.1"), + .package(url: "https://github.com/grpc/grpc-swift.git", from: "2.0.0"), + .package(url: "https://github.com/grpc/grpc-swift-protobuf.git", from: "1.0.0"), + .package(url: "https://github.com/grpc/grpc-swift-nio-transport.git", from: "1.0.0"), ], targets: [] ) 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 401ba2054..0fe74355e 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 @@ -5,9 +5,9 @@ let package = Package( name: "RouteGuide", platforms: [.macOS(.v15)], dependencies: [ - .package(url: "https://github.com/grpc/grpc-swift.git", from: "2.0.0-rc.1"), - .package(url: "https://github.com/grpc/grpc-swift-protobuf.git", from: "1.0.0-rc.1"), - .package(url: "https://github.com/grpc/grpc-swift-nio-transport.git", from: "1.0.0-rc.1"), + .package(url: "https://github.com/grpc/grpc-swift.git", from: "2.0.0"), + .package(url: "https://github.com/grpc/grpc-swift-protobuf.git", from: "1.0.0"), + .package(url: "https://github.com/grpc/grpc-swift-nio-transport.git", from: "1.0.0"), ], targets: [ .executableTarget( diff --git a/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec01-step09-plugin.swift b/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec01-step09-plugin.swift index 81793e013..427915609 100644 --- a/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec01-step09-plugin.swift +++ b/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Resources/route-guide-sec01-step09-plugin.swift @@ -5,9 +5,9 @@ let package = Package( name: "RouteGuide", platforms: [.macOS(.v15)], dependencies: [ - .package(url: "https://github.com/grpc/grpc-swift.git", from: "2.0.0-rc.1"), - .package(url: "https://github.com/grpc/grpc-swift-protobuf.git", from: "1.0.0-rc.1"), - .package(url: "https://github.com/grpc/grpc-swift-nio-transport.git", from: "1.0.0-rc.1"), + .package(url: "https://github.com/grpc/grpc-swift.git", from: "2.0.0"), + .package(url: "https://github.com/grpc/grpc-swift-protobuf.git", from: "1.0.0"), + .package(url: "https://github.com/grpc/grpc-swift-nio-transport.git", from: "1.0.0"), ], targets: [ .executableTarget( 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 81793e013..427915609 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 @@ -5,9 +5,9 @@ let package = Package( name: "RouteGuide", platforms: [.macOS(.v15)], dependencies: [ - .package(url: "https://github.com/grpc/grpc-swift.git", from: "2.0.0-rc.1"), - .package(url: "https://github.com/grpc/grpc-swift-protobuf.git", from: "1.0.0-rc.1"), - .package(url: "https://github.com/grpc/grpc-swift-nio-transport.git", from: "1.0.0-rc.1"), + .package(url: "https://github.com/grpc/grpc-swift.git", from: "2.0.0"), + .package(url: "https://github.com/grpc/grpc-swift-protobuf.git", from: "1.0.0"), + .package(url: "https://github.com/grpc/grpc-swift-nio-transport.git", from: "1.0.0"), ], targets: [ .executableTarget( 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 3f149e5d0..757d99104 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 @@ -5,9 +5,9 @@ let package = Package( name: "RouteGuide", platforms: [.macOS(.v15)], dependencies: [ - .package(url: "https://github.com/grpc/grpc-swift.git", from: "2.0.0-rc.1"), - .package(url: "https://github.com/grpc/grpc-swift-protobuf.git", from: "1.0.0-rc.1"), - .package(url: "https://github.com/grpc/grpc-swift-nio-transport.git", from: "1.0.0-rc.1"), + .package(url: "https://github.com/grpc/grpc-swift.git", from: "2.0.0"), + .package(url: "https://github.com/grpc/grpc-swift-protobuf.git", from: "1.0.0"), + .package(url: "https://github.com/grpc/grpc-swift-nio-transport.git", from: "1.0.0"), ], targets: [ .executableTarget( 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 7163d45f1..89ace64df 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 @@ -5,9 +5,9 @@ let package = Package( name: "RouteGuide", platforms: [.macOS(.v15)], dependencies: [ - .package(url: "https://github.com/grpc/grpc-swift.git", from: "2.0.0-rc.1"), - .package(url: "https://github.com/grpc/grpc-swift-protobuf.git", from: "1.0.0-rc.1"), - .package(url: "https://github.com/grpc/grpc-swift-nio-transport.git", from: "1.0.0-rc.1"), + .package(url: "https://github.com/grpc/grpc-swift.git", from: "2.0.0"), + .package(url: "https://github.com/grpc/grpc-swift-protobuf.git", from: "1.0.0"), + .package(url: "https://github.com/grpc/grpc-swift-nio-transport.git", from: "1.0.0"), .package(url: "https://github.com/apple/swift-argument-parser", from: "1.5.0"), ], targets: [ 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 1e62f5120..c1d8e42b2 100644 --- a/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Route-Guide.tutorial +++ b/Sources/GRPCCore/Documentation.docc/Tutorials/Route-Guide/Route-Guide.tutorial @@ -75,8 +75,7 @@ } @Step { - We need to add a dependency on the gRPC Swift and Swift Protobuf packages. As gRPC Swift v2 - hasn't yet been released the dependencies must use the `-beta` tags. + We need to add a dependency on the gRPC Swift and Swift Protobuf packages. Note that we also add `.macOS(.v15)` to platforms, this is the earliest macOS version supported by gRPC Swift v2.