-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add example of non-working global grpc_api_configuration file #3062
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you need to run the generation commands? See CONTRIBUTING.md in the root of the repository for a guide.
@johanbrandhorst yeah, I've take a look at contributing guide, but I can't run regenerate command cause it raise following error:
|
Btw, what do you think about ability to specify multiple configuration files? If it's okay, I'll take a look how to implement it |
I really don't think that will be a good idea. I would sooner we allow users to specify multiple target files and directories in a single file. Specifying an external file is already a hack, unfortunately. |
Yeah uhm I'm not entirely sure what the selector should be. Try and play around with it a bit 😝 |
@johanbrandhorst selector is right, If I delete second_svc rule and remove folder "second_svc" everything generates as expected, otherwise returns selector error. Also it's look kinda strange that in output with selector error we got dot at the start of selector e.g. instead of |
Oh, if it's already a hack, than adding new features to it will be strange, I agree |
It does look strange, I agree. I think it has to do with how the protobuf internal representation looks. I'm not sure why you're getting that selector error, you might have to do some debugging in the code, sorry. This part of the generator is rarely used and could do with some love. |
Maybe you can share any instruction how to debug such instruments? I tried run it as standard go application, but got error saying that it should be run using protoc |
Yes unfortunately you'll need to recompile the binary and rerun protoc to do a full integration test. It might be easier to write a test locally to understand how the logic works.
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
It's a reproducible example of issue #3059.
I've added two proto services,
grpc_configuration
andglobalconfig.buf.gen.yaml
files toexamples/internal/proto/globalconfig