Skip to content
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

Error generating files #30

Open
pmenon opened this issue Oct 11, 2022 · 2 comments
Open

Error generating files #30

pmenon opened this issue Oct 11, 2022 · 2 comments

Comments

@pmenon
Copy link

pmenon commented Oct 11, 2022

I'm getting the following error using this plugin from rules_proto_grpc:

thread 'main' panicked at 'no source code info in request', external/crate-index__prost-build-0.11.1/src/code_generator.rs:56:14
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
--rust_prost_plugin_out: protoc-gen-rust_prost_plugin: Plugin failed with status code 101.

Bazel version is 5.3.0. Any reason this might be occuring?

@neoeinstein
Copy link
Owner

Prost-build expects to be able to find source code info from the protoc compiler so that it can include doc comments from the original protoc file. Without any valid source info, prost-build will error out. It sounds like you're using a non-standard protobuf compiler, which may not provide this source info. It's possible that we could support this by providing a default empty source info if none is provided, but there may be deeper expectations within prost-build itself that would expect to find some source info (even if empty) for every item.

@bpalermo
Copy link

@neoeinstein any chance this is fixed in the newer version?
https://github.com/tokio-rs/prost/blob/master/prost-build/src/code_generator.rs#L54

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants