Add disable_comments option#1127
Merged
LucioFranco merged 3 commits intohyperium:masterfrom Nov 8, 2022
Merged
Conversation
Contributor
Author
|
I'll fix it later. |
cd0dfb6 to
b774086
Compare
b774086 to
3659c6d
Compare
Contributor
Author
|
I rebased and fixed the conflicts and tests. I didn't try it on ubuntu-latest, so it might fail. |
LucioFranco
requested changes
Nov 7, 2022
Member
LucioFranco
left a comment
There was a problem hiding this comment.
LGTM just would like to see the generated code go into the OUT_DIR rather than commited into the folder.
LucioFranco
approved these changes
Nov 8, 2022
Comment on lines
+224
to
+229
| let method_doc = if disable_comments.contains(&format!( | ||
| "{}{}{}.{}", | ||
| package, | ||
| if package.is_empty() { "" } else { "." }, | ||
| service.identifier(), | ||
| method.identifier() |
Member
There was a problem hiding this comment.
For a follow up PR if you have time would be good to move these to a fn to centralize the impl
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.