-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Add disable_comments option #1127
Conversation
I'll fix it later. |
cd0dfb6
to
b774086
Compare
b774086
to
3659c6d
Compare
I rebased and fixed the conflicts and tests. I didn't try it on ubuntu-latest, so it might fail. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM just would like to see the generated code go into the OUT_DIR rather than commited into the folder.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM thanks!
let method_doc = if disable_comments.contains(&format!( | ||
"{}{}{}.{}", | ||
package, | ||
if package.is_empty() { "" } else { "." }, | ||
service.identifier(), | ||
method.identifier() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For a follow up PR if you have time would be good to move these to a fn to centralize the impl
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have created a draft PR. #1144
Motivation
In prost-build's Configurations, there is a disable_comments. This disables the generation of comments in proto as documentation comments. However, it only works for message and its fields, not service and its rpc.
This Pull Request adds similar functionality to tonic-build's Configurations.
Solution
tonic_build::Builder
.