-
Notifications
You must be signed in to change notification settings - Fork 44
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
[protoc-gen-tonic] Minimal.rs: Tried to insert into file that doesn't exist. #10
Comments
The tonic generator relies and builds on the artifacts provided by the prost generator. We could add an option not to append to that seed file, but the tonic generator isn't standalone and would rely on the generated prost files anyway. While the documentation references usage with buf, the same restriction applies if you are invoking it via The same is true and specified for the |
After running |
I'll take a look and see if I can reproduce as you have. I do less running manually with |
I pushed a workaround in #13. |
Running any of the below commands all give the same error + exit code 1: "Minimal.rs: Tried to insert into file that doesn't exist."
protoc --tonic_out=. ./minimal.proto
protoc --prost-crate_out=. ./minimal.proto // actually gives "Cargo.toml: Tried to insert into file that doesn't exist."
protoc --prost-serde_out=. ./minimal.proto
The below commands work:
protoc --prost_out=. ./minimal.proto // produces Minimal.rs file with proto declaration but no GRPC service, as expected
protoc --tonic_out=. --tonic_opt=no_client=true,no_server=true ./minimal.proto // generates nothing
protoc --go-grpc_out=. ./min.proto // generates a go service as expected, just for example
Minimal proto that causes this issue:
OS: Ubuntu 20.04 LTS
protoc --version: libprotoc 3.6.1
cargo install --list | grep protoc:
protoc-gen-prost v0.1.3:
protoc-gen-prost
protoc-gen-prost-crate v0.1.5:
protoc-gen-prost-crate
protoc-gen-prost-serde v0.1.0:
protoc-gen-prost-serde
protoc-gen-tonic v0.1.0:
protoc-gen-tonic
The text was updated successfully, but these errors were encountered: