You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi there, forgive me for any ignorance, as I'm a total newb with gRPC, but I tried the gRPC example to see if it would work (specifically, if generating Golang code from the provided .proto file would result in the same or similar results as what's already checked in to this repo) because I'm planning to use this repo's plugin system in my company's project and I want to make sure that I can reference the examples to make sure I'm on the right track. However, when I follow the instructions from the README, I get the following error:
% protoc -I proto/ proto/kv.proto --go_out=plugins=grpc:proto/
protoc-gen-go: unable to determine Go import path for "kv.proto"
Please specify either:
• a "go_package" option in the .proto source file, or
• a "M" argument on the command line.
See https://developers.google.com/protocol-buffers/docs/reference/go-generated#package for more information.
--go_out: protoc-gen-go: Plugin failed with status code 1.
Here's my version of protoc in case it matters:
% protoc --version
libprotoc 3.15.8
I did notice that the README hasn't been updated in 6 years, so my guess is that either there's something that changed with protoc since then, or maybe there's some unspoken assumption about the development environment that I'm supposed to have met before I started on this, but I did check to make sure that the example compiled and worked as-is without changing anything about my development environment, and since it does, I feel like it's not PEBKAC in this case. Regardless, it would be nice to get an update to the instructions either way: if it's a matter of something about protoc changing in the past 6 years, then the code/instructions should change accordingly, and if it's a matter of me just not meeting some base assumptions about the development environment, then having those assumptions mentioned, if not spelled out, would be really useful. It would probably also be good to mention which version of protoc was used to generate the Golang code.
Thank you for taking the time to read this!
The text was updated successfully, but these errors were encountered:
This was done using the latest release of protoc as of this authoring,
3.15.8. Whatever very old version of protoc was used before was not
stated, so in order to ensure that the example instructions still
worked, we wanted to use the latest available now. Updating the grpc and
protobuf dependencies was required, as well as adding the `go_package`
option to the .proto file.
This fixeshashicorp#249.
Co-authored-by: crashdummy101 <129228667+crashdummy101@users.noreply.github.com>
Co-authored-by: czavieh <czavieh@users.noreply.github.com>
Thanks for reporting with all the details, you're absolutely right. #286 is going to switch over to using buf (https://buf.build/docs/installation) and update the instructions, and it pins the plugin versions used to prevent confusion like this in future.
Hi there, forgive me for any ignorance, as I'm a total newb with gRPC, but I tried the gRPC example to see if it would work (specifically, if generating Golang code from the provided
.proto
file would result in the same or similar results as what's already checked in to this repo) because I'm planning to use this repo's plugin system in my company's project and I want to make sure that I can reference the examples to make sure I'm on the right track. However, when I follow the instructions from the README, I get the following error:Here's my version of
protoc
in case it matters:I did notice that the README hasn't been updated in 6 years, so my guess is that either there's something that changed with
protoc
since then, or maybe there's some unspoken assumption about the development environment that I'm supposed to have met before I started on this, but I did check to make sure that the example compiled and worked as-is without changing anything about my development environment, and since it does, I feel like it's not PEBKAC in this case. Regardless, it would be nice to get an update to the instructions either way: if it's a matter of something aboutprotoc
changing in the past 6 years, then the code/instructions should change accordingly, and if it's a matter of me just not meeting some base assumptions about the development environment, then having those assumptions mentioned, if not spelled out, would be really useful. It would probably also be good to mention which version ofprotoc
was used to generate the Golang code.Thank you for taking the time to read this!
The text was updated successfully, but these errors were encountered: