Tonic Relection needs a readme/howto
Feature Request
Crates
tonic_reflection
Motivation
There are no usage examples and I had to reverse engineer the crate to use it.
Proposal
There should be a readme and/or crate documentation illustrating how to use tonic_reflection
Alternatives
Scour the web/roll my own, which made it hard to use the crate.
+1 on this. Reflection is a little more spread-out than other examples. It's the build.rs, tonic-reflection in Cargo.toml, and finally the example file.
There are many more undocumented examples though, not just this one.
+1 on this. Reflection is a little more spread-out than other examples. It's the build.rs,
tonic-reflectionin Cargo.toml, and finally the example file.There are many more undocumented examples though, not just this one.
I'd be down to write up an example if the maintainers would be open to a PR.
+1 on this. Reflection is a little more spread-out than other examples. It's the build.rs,
tonic-reflectionin Cargo.toml, and finally the example file. There are many more undocumented examples though, not just this one.I'd be down to write up an example if the maintainers would be open to a PR.
@jaredmcqueen is that a yes?
I'll help out. I've written a few services with tonic now and know my way around reflection. I can't merge PRs though
👀
Also agree with this, the example is incomplete.
I cannot figure out how to implement tonic::include_file_descriptor_set!("test")
It just complains that there's no file, but the 'bin' isn't generated for the directory it's looking in, so I'm completely stuck.
build/protobrain-grpc-b9250147e4fbee18/out/test.bin
The error is super cryptic
error: couldn't read /Users/oliverdixon/Projects/protobrain/protobrain-grpc/target/debug/build/protobrain-grpc-ce623c313148455c/out/test.bin: No such file or directory (os error 2)
--> src/main.rs:5:51
|
5 | pub(crate) const FILE_DESCRIPTOR_SET: &[u8] = tonic::include_file_descriptor_set!("test");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: this error originates in the macro `include_bytes` which comes from the expansion of the macro `tonic::include_file_descriptor_set` (in Nightly builds, run with -Z macro-backtrace for more info)
are you calling this tonic::include_file_descriptor_set!("test") in the same crate that you have the descriptor set in?
i somehow missed this thread even though i scoured the entire repo for references to reflection 😂 and ended up making my own issue (#1600). ive got a PR out as well with an example (#1601), but am happy to include some actual documentation for how to get it working from scratch without relying on cloning the tonic repo for its build process