forked from cockroachdb/cockroach
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
We generate this in a different way than the `Makefile` does -- we take all the proto descriptor sets (that we need to generate anyway as part of the build) and pass them in to `protoc` rather than passing a bunch of include paths, which wouldn't work terribly well in the sandbox. Also teach CI and `dev` to start building these docs. I deleted a stray comment in `pkg/server/serverpb/admin.proto` that was causing a diff in the generated file. I also had to patch `@com_github_pseudomuto_protoc_gen_doc` to quash a compiler error (I just deleted a dependency that isn't actually necessary). Closes cockroachdb#65814. Release note: None
- Loading branch information
1 parent
522e15b
commit e7898c4
Showing
8 changed files
with
130 additions
and
16 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
diff -urN a/cmd/protoc-gen-doc/BUILD.bazel b/cmd/protoc-gen-doc/BUILD.bazel | ||
--- a/cmd/protoc-gen-doc/BUILD.bazel 1969-12-31 19:00:00.000000000 -0500 | ||
+++ b/cmd/protoc-gen-doc/BUILD.bazel 2000-01-01 00:00:00.000000000 -0000 | ||
@@ -11,7 +11,6 @@ | ||
deps = [ | ||
"//:protoc-gen-doc", | ||
"//extensions/google_api_http", | ||
- "//extensions/lyft_validate", | ||
"//extensions/validator_field", | ||
"@com_github_pseudomuto_protokit//:protokit", | ||
], | ||
diff -urN a/cmd/protoc-gen-doc/main.go b/cmd/protoc-gen-doc/main.go | ||
--- a/cmd/protoc-gen-doc/main.go 1969-12-31 19:00:00.000000000 -0500 | ||
+++ b/cmd/protoc-gen-doc/main.go 2000-01-01 00:00:00.000000000 -0000 | ||
@@ -21,7 +21,6 @@ | ||
|
||
gendoc "github.com/pseudomuto/protoc-gen-doc" | ||
_ "github.com/pseudomuto/protoc-gen-doc/extensions/google_api_http" // imported for side effects | ||
- _ "github.com/pseudomuto/protoc-gen-doc/extensions/lyft_validate" // imported for side effects | ||
_ "github.com/pseudomuto/protoc-gen-doc/extensions/validator_field" // imported for side effects | ||
) | ||
|
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
genrule( | ||
name = "http", | ||
srcs = [ | ||
"//pkg/ts/tspb:tspb_proto", | ||
"//pkg/util/metric:metric_proto", | ||
"//pkg/ts/catalog:catalog_proto", | ||
"//pkg/util/duration:duration_proto", | ||
"//pkg/util/timeutil/pgdate:pgdate_proto", | ||
"//pkg/sql/sessiondatapb:sessiondatapb_proto", | ||
"//pkg/sql/inverted:inverted_proto", | ||
"//pkg/sql/pgwire/pgerror:pgerror_proto", | ||
"//pkg/sql/contentionpb:contentionpb_proto", | ||
"//pkg/sql/execinfrapb:execinfrapb_proto", | ||
"//pkg/kv/kvserver/kvserverpb:kvserverpb_proto", | ||
"//pkg/kv/kvserver/liveness/livenesspb:livenesspb_proto", | ||
"//pkg/util/log/logpb:logpb_proto", | ||
"//pkg/build:build_proto", | ||
"//pkg/clusterversion:clusterversion_proto", | ||
"//pkg/config/zonepb:zonepb_proto", | ||
"//pkg/geo/geoindex:geoindex_proto", | ||
"//pkg/geo/geopb:geopb_proto", | ||
"//pkg/gossip:gossip_proto", | ||
"//pkg/jobs/jobspb:jobspb_proto", | ||
"//pkg/kv/kvserver/concurrency/lock:lock_proto", | ||
"//pkg/kv/kvserver/readsummary/rspb:rspb_proto", | ||
"//pkg/roachpb:roachpb_proto", | ||
"//pkg/server/diagnostics/diagnosticspb:diagnosticspb_proto", | ||
"//pkg/server/serverpb:serverpb_proto", | ||
"//pkg/server/status/statuspb:statuspb_proto", | ||
"//pkg/sql/catalog/descpb:descpb_proto", | ||
"//pkg/sql/schemachanger/scpb:scpb_proto", | ||
"//pkg/sql/types:types_proto", | ||
"//pkg/storage/enginepb:enginepb_proto", | ||
"//pkg/util:util_proto", | ||
"//pkg/util/hlc:hlc_proto", | ||
"//pkg/util/tracing/tracingpb:tracingpb_proto", | ||
"@com_github_prometheus_client_model//io/prometheus/client:client_proto", | ||
"@com_github_cockroachdb_errors//errorspb:errorspb_proto", | ||
"@com_github_gogo_protobuf//gogoproto:gogo_proto", | ||
"@com_google_protobuf//:any_proto", | ||
"@com_google_protobuf//:descriptor_proto", | ||
"@com_google_protobuf//:duration_proto", | ||
"@com_google_protobuf//:timestamp_proto", | ||
"@go_googleapis//google/api:annotations_proto", | ||
"@io_etcd_go_etcd_raft_v3//raftpb:raftpb_proto", | ||
], | ||
outs = [ | ||
"full.md", | ||
"health-other.md", | ||
"health-request.md", | ||
"health-response.md", | ||
"hotranges-other.md", | ||
"hotranges-request.md", | ||
"hotranges-response.md", | ||
"nodes-other.md", | ||
"nodes-request.md", | ||
"nodes-response.md", | ||
], | ||
cmd = """ | ||
DESCRIPTOR_SET_IN=$$(echo $(SRCS) | tr -s '[:blank:]' ':') | ||
$(location //pkg/cmd/docgen) \ | ||
http --protoc $(location @com_google_protobuf//:protoc) \ | ||
--gendoc $(location @com_github_pseudomuto_protoc_gen_doc//cmd/protoc-gen-doc) \ | ||
--out $(RULEDIR) \ | ||
--protoc-flags "--descriptor_set_in $$DESCRIPTOR_SET_IN server/serverpb/status.proto server/serverpb/admin.proto server/status/statuspb/status.proto" | ||
""", | ||
exec_tools = [ | ||
"@com_google_protobuf//:protoc", | ||
"@com_github_pseudomuto_protoc_gen_doc//cmd/protoc-gen-doc", | ||
"//pkg/cmd/docgen", | ||
], | ||
) |
This file contains 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
This file contains 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