Skip to content

Commit

Permalink
twiq: Fix doc-comments errors
Browse files Browse the repository at this point in the history
  • Loading branch information
bouzuya committed Oct 27, 2022
1 parent b96dc52 commit 4e67f62
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
3 changes: 1 addition & 2 deletions twiq/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions twiq/Cargo.toml
@@ -1,2 +1,5 @@
[workspace]
members = ["crates/*"]

[patch.crates-io]
tonic-build = { git = "https://github.com/bouzuya/tonic", branch = "add-disable-comments" }
7 changes: 7 additions & 0 deletions twiq/crates/db/build.rs
Expand Up @@ -11,13 +11,20 @@ fn main() {
fs::create_dir_all(&out_dir).unwrap();
let mut config = Config::new();
config.disable_comments(&[
// message や field は消せるが service や rpc は消せない
// 前者は prost-build crate の範囲、後者は tonic-build crate の範囲
"google.api.HttpRule",
"google.firestore.v1.StructuredQuery.start_at",
"google.firestore.v1.StructuredAggregationQuery.Aggregation.alias",
"google.firestore.v1.StructuredAggregationQuery.Aggregation.Count.up_to",
]);
tonic_build::configure()
.build_client(true)
.build_server(false)
.out_dir(out_dir)
// service および rpc の comments 出力の廃止
.disable_comments("google.firestore.v1.Firestore")
.disable_comments("google.firestore.v1.Firestore.RunAggregationQuery")
.compile_with_config(
config,
&["proto/googleapis/google/firestore/v1/firestore.proto"],
Expand Down

0 comments on commit 4e67f62

Please sign in to comment.