-
Notifications
You must be signed in to change notification settings - Fork 929
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
Importing proto with dotted name #1643
Comments
Unsure whether this is the intended solution, but one way to circumvent this is the following instead of the raw import of pub mod foo {
pub mod bar {
tonic::include_proto!("foo.bar");
}
}
use crate::foo::bar;
pub mod pb {
tonic::include_proto!("foo.example");
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug Report
Version
tonic v0.11.0
tonic-build v0.11.0
Platform
Darwin 23.2.0 Darwin Kernel Version 23.2.0: Wed Nov 15 21:55:06 PST 2023; root:xnu-10002.61.3~2/RELEASE_ARM64_T6020 arm64
Description
I have the following two proto files:
foobar.proto
example.proto
and a
main.rs
file:When running
cargo clippy
, the following output prints:It seems like tonic is not set up to handle packages with dotted names (i.e.
foo.bar
) in imports.If the dotted package is 'standalone', that works. Is there anything I overlooked to make this work?
The text was updated successfully, but these errors were encountered: