From 3246e670faf2b18d563266b227cd5c4b2c1581d2 Mon Sep 17 00:00:00 2001 From: Michael Cho Date: Wed, 5 Mar 2025 18:23:43 -0500 Subject: [PATCH 1/3] grpc-swift: rename to `protoc-gen-grpc-swift` --- .github/autobump.txt | 2 +- Formula/g/grpc-swift.rb | 58 ----------------------------------------- formula_renames.json | 1 + 3 files changed, 2 insertions(+), 59 deletions(-) delete mode 100644 Formula/g/grpc-swift.rb diff --git a/.github/autobump.txt b/.github/autobump.txt index 0f991809ceaf..c13f9e286ad8 100644 --- a/.github/autobump.txt +++ b/.github/autobump.txt @@ -1349,7 +1349,6 @@ groonga groovy groovysdk grpc -grpc-swift grpcui grype gsan @@ -2727,6 +2726,7 @@ protobuf-c protoc-gen-go protoc-gen-go-grpc protoc-gen-grpc-java +protoc-gen-grpc-swift protoc-gen-grpc-web protolint prowler diff --git a/Formula/g/grpc-swift.rb b/Formula/g/grpc-swift.rb deleted file mode 100644 index 9832a41f86af..000000000000 --- a/Formula/g/grpc-swift.rb +++ /dev/null @@ -1,58 +0,0 @@ -class GrpcSwift < Formula - desc "Swift language implementation of gRPC" - homepage "https://github.com/grpc/grpc-swift" - url "https://github.com/grpc/grpc-swift/archive/refs/tags/1.24.2.tar.gz" - sha256 "06f504ec5ce4b375e48e25983d06bb7f55dea126a65669d326def832c8da3581" - license "Apache-2.0" - head "https://github.com/grpc/grpc-swift.git", branch: "main" - - livecheck do - url :stable - regex(/^v?(\d+(?:\.\d+)+)$/i) - end - - bottle do - sha256 cellar: :any_skip_relocation, arm64_sequoia: "77a3718fec21c195890abd756f9367c397ea99d35af5d299602cb57fb08dbad8" - sha256 cellar: :any_skip_relocation, arm64_sonoma: "67eb22f2334a994e04bfc6ab89d2f3427812d478240434163108bed1a6494b00" - sha256 cellar: :any_skip_relocation, arm64_ventura: "ac62dc16446915e1d0df21846c2688ec7080fb0c2faf183df50d0359b0c57d51" - sha256 cellar: :any_skip_relocation, sonoma: "26896664dc139e80c7b8d08fc0ea44fcd506fe3643a278c3e80b7acb5893ad39" - sha256 cellar: :any_skip_relocation, ventura: "5fcedf2f3a4fa371ed947446d396b4dafaf0f8ccda8885f16a64a2b15c6731bc" - sha256 cellar: :any_skip_relocation, x86_64_linux: "d44b36b070eed8ad0209fd694490d6b0b31cf53cbe9516061ff266d517e8af04" - end - - depends_on xcode: ["15.0", :build] - depends_on "protobuf" - depends_on "swift-protobuf" - - uses_from_macos "swift" => :build - - def install - args = if OS.mac? - ["--disable-sandbox"] - else - ["--static-swift-stdlib"] - end - system "swift", "build", *args, "-c", "release", "--product", "protoc-gen-grpc-swift" - bin.install ".build/release/protoc-gen-grpc-swift" - end - - test do - (testpath/"echo.proto").write <<~PROTO - syntax = "proto3"; - service Echo { - rpc Get(EchoRequest) returns (EchoResponse) {} - rpc Expand(EchoRequest) returns (stream EchoResponse) {} - rpc Collect(stream EchoRequest) returns (EchoResponse) {} - rpc Update(stream EchoRequest) returns (stream EchoResponse) {} - } - message EchoRequest { - string text = 1; - } - message EchoResponse { - string text = 1; - } - PROTO - system Formula["protobuf"].opt_bin/"protoc", "echo.proto", "--grpc-swift_out=." - assert_path_exists testpath/"echo.grpc.swift" - end -end diff --git a/formula_renames.json b/formula_renames.json index f1a1ab8decc8..a476528a3679 100644 --- a/formula_renames.json +++ b/formula_renames.json @@ -49,6 +49,7 @@ "gold": "binutils", "google-perftools": "gperftools", "grakn": "typedb", + "grpc-swift": "protoc-gen-grpc-swift", "grunt": "grunt-cli", "gst-devtools": "gstreamer", "gst-editing-services": "gstreamer", From d74c6f3eae88434cd7fb2f5efa9377bbd21d21da Mon Sep 17 00:00:00 2001 From: Michael Cho Date: Wed, 5 Mar 2025 19:14:48 -0500 Subject: [PATCH 2/3] protoc-gen-grpc-swift 1.1.0 --- Formula/p/protoc-gen-grpc-swift.rb | 52 ++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 Formula/p/protoc-gen-grpc-swift.rb diff --git a/Formula/p/protoc-gen-grpc-swift.rb b/Formula/p/protoc-gen-grpc-swift.rb new file mode 100644 index 000000000000..5d5a0c39c712 --- /dev/null +++ b/Formula/p/protoc-gen-grpc-swift.rb @@ -0,0 +1,52 @@ +class ProtocGenGrpcSwift < Formula + desc "Protoc plugin for generating gRPC Swift stubs" + homepage "https://github.com/grpc/grpc-swift-protobuf" + url "https://github.com/grpc/grpc-swift-protobuf/archive/refs/tags/1.1.0.tar.gz" + sha256 "fe19d6931605e957031369578ab03faa6b3b3ad8fdee0214a08275ef209f36f9" + license "Apache-2.0" + version_scheme 1 + head "https://github.com/grpc/grpc-swift-protobuf.git", branch: "main" + + livecheck do + url :stable + regex(/^v?(\d+(?:\.\d+)+)$/i) + end + + depends_on xcode: ["15.0", :build] + # https://swiftpackageindex.com/grpc/grpc-swift/documentation/grpccore/compatibility#Platforms + depends_on macos: :sequoia + depends_on "protobuf" + depends_on "swift-protobuf" + + uses_from_macos "swift" => :build + + def install + args = if OS.mac? + ["--disable-sandbox"] + else + ["--static-swift-stdlib"] + end + system "swift", "build", *args, "-c", "release", "--product", "protoc-gen-grpc-swift" + bin.install ".build/release/protoc-gen-grpc-swift" + end + + test do + (testpath/"echo.proto").write <<~PROTO + syntax = "proto3"; + service Echo { + rpc Get(EchoRequest) returns (EchoResponse) {} + rpc Expand(EchoRequest) returns (stream EchoResponse) {} + rpc Collect(stream EchoRequest) returns (EchoResponse) {} + rpc Update(stream EchoRequest) returns (stream EchoResponse) {} + } + message EchoRequest { + string text = 1; + } + message EchoResponse { + string text = 1; + } + PROTO + system Formula["protobuf"].opt_bin/"protoc", "echo.proto", "--grpc-swift_out=." + assert_path_exists testpath/"echo.grpc.swift" + end +end From 39460d56d36ae3059dc0bd3f373be8c343340b81 Mon Sep 17 00:00:00 2001 From: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com> Date: Thu, 6 Mar 2025 03:04:46 +0000 Subject: [PATCH 3/3] protoc-gen-grpc-swift: add 1.1.0 bottle. --- Formula/p/protoc-gen-grpc-swift.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Formula/p/protoc-gen-grpc-swift.rb b/Formula/p/protoc-gen-grpc-swift.rb index 5d5a0c39c712..1bf67dff7436 100644 --- a/Formula/p/protoc-gen-grpc-swift.rb +++ b/Formula/p/protoc-gen-grpc-swift.rb @@ -12,6 +12,11 @@ class ProtocGenGrpcSwift < Formula regex(/^v?(\d+(?:\.\d+)+)$/i) end + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "19c9c068affc59d455635cf5d2749d3f36eb35ea8bb05bdea9a708df1b90497d" + sha256 cellar: :any_skip_relocation, x86_64_linux: "5f196d46a031f46add8ca18b687de951994fc96f007099125b2acb5b64a84da2" + end + depends_on xcode: ["15.0", :build] # https://swiftpackageindex.com/grpc/grpc-swift/documentation/grpccore/compatibility#Platforms depends_on macos: :sequoia