-
Notifications
You must be signed in to change notification settings - Fork 12
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
Add neoeinstein-prost-crate v0.3.1 plugin #609
Conversation
add neoeinstein-prost-crate to community plugins to generate include file in rust projects
Thanks @cobbinma for the contribution. We previously discussed the prost-crate plugin here: #96 (comment) It relies on accessing files which aren't available to remote plugins, so it would need to be used with |
Thanks @pkwarren. As I only need the features that can be run remotely, can the plugin be added so that we can use it with I am currently using it this way and would like to keep doing so: - remote: buf.build/prost/plugins/crate:v0.3.1-1
out: autogen/lang/rust
opt:
- no_features |
Although this works for some use cases, it's also not something we can easily test. I.e., all plugins in this repository are run through at least 1 module and the output is committed as a sum file. We would have to special case this plugin and trust it "just works" without any validation. Furthermore, I'm hesitant to add this plugin unless it has sane default behaviour and can be tested. |
@mfridman I have added go sum files and a plugins test override, similar to the other rust plugins. I agree with your comments and think it is unfortunate The repository does have documentation on why the https://github.com/neoeinstein/protoc-gen-prost/tree/main/protoc-gen-prost-crate#usage-with-buf |
@cobbinma - Is this plugin functional on its own without specifying any options? We set |
@@ -55,6 +55,7 @@ exec docker run --log-driver=none --rm -i {{.ImageName}}:{{.Version}} "$@" | |||
// these plugins until the tests are updated to support running all plugin dependencies in sequence. | |||
testOverrideOptions = map[string][]string{ | |||
"buf.build/community/neoeinstein-prost-serde": {"no_include"}, | |||
"buf.build/community/neoeinstein-prost-crate": {"no_features"}, |
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.
nit: Can you move this up one line to keep these plugin names sorted?
@pkwarren ❯ buf generate --include-imports
WARN Plugin "buf.build/prost/crate" is deprecated
Failure: plugin buf.build/prost/plugins/crate:v0.3.1-1: Cargo.toml: does not exist |
Co-authored-by: Philip K. Warren <[email protected]>
Really cool, is it usable right now or there is some wait on Buf side? |
It is available now and ready for use: https://buf.build/community/neoeinstein-prost-crate There are limitations as documented here: https://github.com/neoeinstein/protoc-gen-prost/blob/main/protoc-gen-prost-crate/README.md. In particular, remote plugins don't have access to arbitrary files from the filesystem, so the |
Yep I'm aware thanks, I'm using it in the way it works. |
add neoeinstein-prost-crate to community plugins
Closes #608