Forráskód Böngészése

Update dependency requirements and docs (#2188)

George Barnett 10 hónapja
szülő
commit
2ed95d8573

+ 3 - 3
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: [

+ 3 - 3
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: [

+ 2 - 2
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(

+ 3 - 3
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: [

+ 4 - 4
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: [

+ 3 - 3
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: [

+ 5 - 10
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"),

+ 0 - 3
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

+ 1 - 1
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

+ 3 - 3
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: []
 )

+ 3 - 3
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(

+ 3 - 3
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(

+ 3 - 3
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(

+ 3 - 3
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(

+ 3 - 3
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: [

+ 1 - 2
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.