From acee68e6215aa2417e4b88d10b787715f3d95760 Mon Sep 17 00:00:00 2001 From: Stefan VanBuren Date: Thu, 1 Aug 2024 16:20:31 -0400 Subject: [PATCH] Update Cargo plugin settings (#1397) This: * Enables `default_features` for the `tonic` dependency of the `protoc-gen-tonic` generated code * Enables the `file_descriptor_set` option for `prost`, which embeds the FileDescriptorSet in the file, which is used by Tonic's reflection implementation. --- plugins/community/neoeinstein-prost/v0.3.1/buf.plugin.yaml | 5 +++-- plugins/community/neoeinstein-tonic/v0.4.0/buf.plugin.yaml | 3 +-- .../community/neoeinstein-prost/v0.3.1/eliza/plugin.sum | 2 +- .../community/neoeinstein-prost/v0.3.1/petapis/plugin.sum | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/plugins/community/neoeinstein-prost/v0.3.1/buf.plugin.yaml b/plugins/community/neoeinstein-prost/v0.3.1/buf.plugin.yaml index cbd432183..b85f1ca4e 100644 --- a/plugins/community/neoeinstein-prost/v0.3.1/buf.plugin.yaml +++ b/plugins/community/neoeinstein-prost/v0.3.1/buf.plugin.yaml @@ -23,5 +23,6 @@ registry: # https://docs.rs/crate/prost-types/0.12.3/features default_features: true # https://github.com/neoeinstein/protoc-gen-prost/blob/protoc-gen-prost-v0.3.1/protoc-gen-prost/README.md#options - # No options set. - opts: [] + opts: + # Includes the encoded FileDescriptorSet in the generated output for each module. + - file_descriptor_set diff --git a/plugins/community/neoeinstein-tonic/v0.4.0/buf.plugin.yaml b/plugins/community/neoeinstein-tonic/v0.4.0/buf.plugin.yaml index 071a97310..2f4d384dc 100644 --- a/plugins/community/neoeinstein-tonic/v0.4.0/buf.plugin.yaml +++ b/plugins/community/neoeinstein-tonic/v0.4.0/buf.plugin.yaml @@ -16,8 +16,7 @@ registry: - name: "tonic" req: "0.11.0" # https://github.com/hyperium/tonic/blob/v0.11.0/tonic/Cargo.toml#L29 - # The generated code does not require any of the default features of tonic. - default_features: false + default_features: true # https://github.com/neoeinstein/protoc-gen-prost/blob/protoc-gen-tonic-v0.4.0/protoc-gen-tonic/README.md#options opts: - no_include=true diff --git a/tests/testdata/buf.build/community/neoeinstein-prost/v0.3.1/eliza/plugin.sum b/tests/testdata/buf.build/community/neoeinstein-prost/v0.3.1/eliza/plugin.sum index 4ecce7cc5..685dde568 100644 --- a/tests/testdata/buf.build/community/neoeinstein-prost/v0.3.1/eliza/plugin.sum +++ b/tests/testdata/buf.build/community/neoeinstein-prost/v0.3.1/eliza/plugin.sum @@ -1 +1 @@ -h1:JsjQgBmoYPRx2D2Qy1BNCDAH8tLofGgjZp46Lm4Aii8= +h1:OOQTZuSd3HaGWEbX7DL5OdP7KamFOtYCWEwN8NDPrhg= diff --git a/tests/testdata/buf.build/community/neoeinstein-prost/v0.3.1/petapis/plugin.sum b/tests/testdata/buf.build/community/neoeinstein-prost/v0.3.1/petapis/plugin.sum index b498b1e89..c7440379e 100644 --- a/tests/testdata/buf.build/community/neoeinstein-prost/v0.3.1/petapis/plugin.sum +++ b/tests/testdata/buf.build/community/neoeinstein-prost/v0.3.1/petapis/plugin.sum @@ -1 +1 @@ -h1:wJlYOc3eSFsYLteXBSvMtseQjbKBGUc2fP2dKKMZAbc= +h1:Iz6wUNZqhHZ8tt+RtP/GB32MIBJLZ7PA0Ql+VBRYqvA=