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

Failure when compiling with file_descriptor_set #59

Open
gwik opened this issue Mar 10, 2023 · 3 comments
Open

Failure when compiling with file_descriptor_set #59

gwik opened this issue Mar 10, 2023 · 3 comments

Comments

@gwik
Copy link
Contributor

gwik commented Mar 10, 2023

Hi,

I have a failure compiling some protos with buf:

version: v1
plugins:
  - plugin: prost
    out: gen
    opt:
      - bytes=.
      - compile_well_known_types
      - extern_path=.google.protobuf=::pbjson_types
      - file_descriptor_set
Failure: plugin prost: envoy.service.auth.v2alpha.rs: does not exist

I'm using prost plugin compiled from main (44d3fc3).

The failure happens because the prost code generation might omit empty files but the file_descriptor_set option makes it needed. Removing file_descriptor_set makes it work.

The problem starts with commit 038cd34 when prost-build crate was upgraded.

I have a draft PR that fixes the issue, but I don't think it should be merged as is:

34c2ac3

@gwik
Copy link
Contributor Author

gwik commented Mar 10, 2023

Wondering if this is related.

#56

@neoeinstein
Copy link
Owner

Thanks for the report and the bisect to find the introducing commit. I'll take a further look here over the weekend. Is there a public set of protos that I can use to reproduce this? (perhaps the Envoy Service protobuf you mentioned works as a repro?)

@gwik
Copy link
Contributor Author

gwik commented Mar 19, 2023

Yes envoy service proto work as a repro.

See https://github.com/gwik/envoy-prost-tonic

git clone [email protected]:gwik/envoy-prost-tonic
make buf_gen
Failure: plugin prost: envoy.service.auth.v2alpha.rs: does not exist
make: *** [Makefile:6: buf_gen] Error 1

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

2 participants