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

[Bug] protoc-gen-prost 0.2.1 now is broken directly from cargo registry #54

Closed
larry-aptos opened this issue Feb 23, 2023 · 4 comments
Closed

Comments

@larry-aptos
Copy link

larry-aptos commented Feb 23, 2023

This can be reproduced on a fresh Ubuntu machine.

Repro steps

  1. sudo apt update
  2. sudo apt install curl build-essential -y
  3. curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
  4. source "$HOME/.cargo/env"
  5. cargo install protoc-gen-prost

Current behavior:

error[E0603]: module `compiler` is private
  --> /home/larry/.cargo/registry/src/github.com-1ecc6299db9ec823/protoc-gen-prost-0.2.1/src/lib.rs:13:5
   |
13 |     compiler::{code_generator_response::File, CodeGeneratorRequest},
   |     ^^^^^^^^ private module
   |
note: the module `compiler` is defined here
  --> /home/larry/.cargo/registry/src/github.com-1ecc6299db9ec823/prost-types-0.11.7/src/lib.rs:15:1
   |
15 | mod compiler;
   | ^^^^^^^^^^^^

error[E0603]: module `compiler` is private
  --> /home/larry/.cargo/registry/src/github.com-1ecc6299db9ec823/protoc-gen-prost-0.2.1/src/generator.rs:3:18
   |
3  | use prost_types::compiler::{
   |                  ^^^^^^^^ private module
   |
note: the module `compiler` is defined here
  --> /home/larry/.cargo/registry/src/github.com-1ecc6299db9ec823/prost-types-0.11.7/src/lib.rs:15:1
   |
15 | mod compiler;
   | ^^^^^^^^^^^^

error[E0603]: module `compiler` is private
  --> /home/larry/.cargo/registry/src/github.com-1ecc6299db9ec823/protoc-gen-prost-0.2.1/src/generator/core.rs:2:18
   |
2  | use prost_types::compiler::code_generator_response::File;
   |                  ^^^^^^^^ private module
   |
note: the module `compiler` is defined here
  --> /home/larry/.cargo/registry/src/github.com-1ecc6299db9ec823/prost-types-0.11.7/src/lib.rs:15:1
   |
15 | mod compiler;
   | ^^^^^^^^^^^^

error[E0603]: module `compiler` is private
  --> /home/larry/.cargo/registry/src/github.com-1ecc6299db9ec823/protoc-gen-prost-0.2.1/src/generator/file_descriptor_set.rs:3:18
   |
3  | use prost_types::compiler::code_generator_response::File;
   |                  ^^^^^^^^ private module
   |
note: the module `compiler` is defined here
  --> /home/larry/.cargo/registry/src/github.com-1ecc6299db9ec823/prost-types-0.11.7/src/lib.rs:15:1
   |
15 | mod compiler;
   | ^^^^^^^^^^^^

error[E0282]: type annotations needed
  --> /home/larry/.cargo/registry/src/github.com-1ecc6299db9ec823/protoc-gen-prost-0.2.1/src/generator/core.rs:49:37
   |
49 |         request.write_to_file(move |buffer| {
   |                                     ^^^^^^
50 |             buffer.push_str("// @generated\n");
   |             ------ type must be known at this point
   |
help: consider giving this closure parameter an explicit type
   |
49 |         request.write_to_file(move |buffer: _| {
   |                                           +++

Some errors have detailed explanations: E0282, E0603.
For more information about an error, try `rustc --explain E0282`.
error: could not compile `protoc-gen-prost` due to 5 previous errors
warning: build failed, waiting for other jobs to finish...
error: failed to compile `protoc-gen-prost v0.2.1`, intermediate artifacts can be found at `/tmp/cargo-installZD0bjX

Expected behavior:

Install successfully.

@neoeinstein
Copy link
Owner

Will look into this. In the meantime, use --locked when doing an install to ensure that you're using the exact dependency versions that the package was published against.

@neoeinstein
Copy link
Owner

Put in a fix as tokio-rs/prost#824. Until that lands and is released, you'll want to use --locked.

@LucioFranco
Copy link

Yup, we will release a new version 0.11.8 with this fix and I will yank 0.11.7

@neoeinstein
Copy link
Owner

This should now be resolved. Thanks for the report!

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