@@ -188,8 +188,7 @@ proto_gazelle(
188188)
189189```
190190
191- - ` name ` : the rule name
192- - ` gazelle ` : a ` attr.label ` that should point to a ` gazelle_binary ` rule.
191+ - ` gazelle ` : an ` attr.label ` that should point to a ` gazelle_binary ` rule.
193192- ` cfgs ` : an optional ` attr.label_list ` that references base YAML configuration files.
194193- ` imports ` : an optional ` attr.label_list ` that references CSV files that are
195194 produced by the ` proto_repository ` rule.
@@ -256,7 +255,7 @@ proto_go_library(
256255)
257256```
258257
259- ### default workspace vendoring strategy : ` proto_compiled_sources `
258+ ### Default Workspace Vendoring Strategy : ` proto_compiled_sources `
260259
261260For IDE completion and UX, you may decide that it is preferable to vendor the
262261generated source files into your repo. This is the use case for
@@ -335,9 +334,9 @@ proto_compile_assets(
335334
336335> NOTE: the ` proto_compile_assets ` is not generated by gazelle currently. It
337336> will require manual rule edits or your own hand-rolled gazelle extension for
338- > this (pretty easy to write ).
337+ > this (not difficult ).
339338
340- ### advanced topic : external proto deps with ` proto_repository `
339+ ### Advanced Topic : external proto deps with ` proto_repository `
341340
342341A common strategy for using protos from other sources is to simply copy them
343342into your own repo. This works but can be tedious and hard to maintain. The
@@ -579,14 +578,14 @@ INFO: Running command line: bazel-bin/cmd/bescli/bescli_/bescli
579578
580579### advanced topic: vendoring external go proto assets with ` proto_go_modules `
581580
582- > This is golang specific
581+ > NOTE: this section is specific to golang only
583582
584583Given the above, we still have the issue that while ` bazel ` and ` gazelle `
585584understood how to work with ` build_event_service ` , the IDE and traditional go
586585tooling like ` go mod tidy ` do not. To address this problem, consider
587586` proto_go_modules ` . This rule copies over generated go proto assets to a
588587` local/ ` folder (for reasons beyond the scope of this document, ` vendor/ ` does
589- not work, it has to be a different dir ).
588+ not work, it has to be a different directory ).
590589
591590` proto_go_modules ` is a separate gazelle extension and a runnable rule. To use
592591it, first add the extension to your ` gazelle_binary ` :
@@ -748,6 +747,7 @@ genproto
748747
749748``` sh
750749$ cat genproto/github.com/bazelbuild/bazelapis/src/main/java/com/google/devtools/build/lib/buildeventstream/proto/build_event_stream/build_event_stream/go.mod
750+
751751module github.com/bazelbuild/bazelapis/src/main/java/com/google/devtools/build/lib/buildeventstream/proto/build_event_stream/build_event_stream
752752go 1.23.1
753753```
@@ -758,105 +758,7 @@ The default `go.mod` file has been modified with additional `replace` directives
758758replace github.com/bazelbuild/bazelapis/src/main/java/com/google/devtools/build/lib/buildeventstream/proto/build_event_stream/build_event_stream => ./genproto/github.com/bazelbuild/bazelapis/src/main/java/com/google/devtools/build/lib/buildeventstream/proto/build_event_stream/build_event_stream
759759```
760760
761- ## Appendix 1: preconfigured ` proto_plugin ` rules
762-
763- ``` sh
764- $ bazel query ' kind(proto_plugin,@build_stack_rules_proto//...)' --keep_going
765- @build_stack_rules_proto//plugin/akka/akka-grpc:protoc-gen-akka-grpc
766- @build_stack_rules_proto//plugin/bufbuild:connect-es
767- @build_stack_rules_proto//plugin/bufbuild:es
768- @build_stack_rules_proto//plugin/builtin:closurejs
769- @build_stack_rules_proto//plugin/builtin:commonjs
770- @build_stack_rules_proto//plugin/builtin:cpp
771- @build_stack_rules_proto//plugin/builtin:csharp
772- @build_stack_rules_proto//plugin/builtin:java
773- @build_stack_rules_proto//plugin/builtin:objc
774- @build_stack_rules_proto//plugin/builtin:php
775- @build_stack_rules_proto//plugin/builtin:pyi
776- @build_stack_rules_proto//plugin/builtin:python
777- @build_stack_rules_proto//plugin/builtin:ruby
778- @build_stack_rules_proto//plugin/gogo/protobuf:protoc-gen-combo
779- @build_stack_rules_proto//plugin/gogo/protobuf:protoc-gen-gogo
780- @build_stack_rules_proto//plugin/gogo/protobuf:protoc-gen-gogofast
781- @build_stack_rules_proto//plugin/gogo/protobuf:protoc-gen-gogofaster
782- @build_stack_rules_proto//plugin/gogo/protobuf:protoc-gen-gogoslick
783- @build_stack_rules_proto//plugin/gogo/protobuf:protoc-gen-gogotypes
784- @build_stack_rules_proto//plugin/gogo/protobuf:protoc-gen-gostring
785- @build_stack_rules_proto//plugin/golang/protobuf:protoc-gen-go
786- @build_stack_rules_proto//plugin/grpc/grpc:protoc-gen-grpc-cpp
787- @build_stack_rules_proto//plugin/grpc/grpc:protoc-gen-grpc-python
788- @build_stack_rules_proto//plugin/grpc/grpc-go:protoc-gen-go-grpc
789- @build_stack_rules_proto//plugin/grpc/grpc-java:protoc-gen-grpc-java
790- @build_stack_rules_proto//plugin/grpc/grpc-node:protoc-gen-grpc-node
791- @build_stack_rules_proto//plugin/grpc/grpc-web:protoc-gen-grpc-web
792- @build_stack_rules_proto//plugin/scalapb/scalapb:protoc-gen-scala
793- @build_stack_rules_proto//plugin/scalapb/scalapb:protoc-gen-scala-grpc
794- @build_stack_rules_proto//plugin/scalapb/zio-grpc:protoc-gen-zio-grpc
795- @build_stack_rules_proto//plugin/stackb/grpc_js:protoc-gen-grpc-js
796- @build_stack_rules_proto//plugin/stephenh/ts-proto:protoc-gen-ts-proto
797- ```
798-
799- ## Appendix 2: preconfigured ` Plugin ` implementations
800-
801- The plugin name is an opaque string, but by convention they are maven-esqe
802- artifact identifiers that follow a GitHub org/repo/plugin_name convention.
803-
804- | Plugin |
805- | ------------------------------------------------------------------------------------------------------------------------|
806- | [ builtin: cpp ] ( pkg/plugin/builtin/cpp_plugin.go ) |
807- | [ builtin: csharp ] ( pkg/plugin/builtin/csharp_plugin.go ) |
808- | [ builtin: java ] ( pkg/plugin/builtin/java_plugin.go ) |
809- | [ builtin:js: closure ] ( pkg/plugin/builtin/js_closure_plugin.go ) |
810- | [ builtin:js: common ] ( pkg/plugin/builtin/js_common_plugin.go ) |
811- | [ builtin: objc ] ( pkg/plugin/builtin/objc_plugin.go ) |
812- | [ builtin: php ] ( pkg/plugin/builtin/php_plugin.go ) |
813- | [ builtin: python ] ( pkg/plugin/builtin/python_plugin.go ) |
814- | [ builtin: pyi ] ( pkg/plugin/builtin/pyi_plugin.go ) |
815- | [ builtin: ruby ] ( pkg/plugin/builtin/ruby_plugin.go ) |
816- | [ grpc:grpc: cpp ] ( pkg/plugin/builtin/grpc_grpc_cpp.go ) |
817- | [ grpc:grpc: protoc-gen-grpc-python ] ( pkg/plugin/grpc/grpc/protoc-gen-grpc-python.go ) |
818- | [ golang:protobuf: protoc-gen-go ] ( pkg/plugin/golang/protobuf/protoc-gen-go.go ) |
819- | [ grpc:grpc-go: protoc-gen-go-grpc ] ( pkg/plugin/grpc/grpcgo/protoc-gen-go-grpc.go ) |
820- | [ grpc:grpc-java: protoc-gen-grpc-java ] ( pkg/plugin/grpc/grpcjava/protoc-gen-grpc-java.go ) |
821- | [ grpc:grpc-node: protoc-gen-grpc-node ] ( pkg/plugin/grpc/grpcnode/protoc-gen-grpc-node.go ) |
822- | [ grpc:grpc-web: protoc-gen-grpc-web ] ( pkg/plugin/grpc/grpcweb/protoc-gen-grpc-web.go ) |
823- | [ gogo:protobuf: protoc-gen-combo ] ( pkg/plugin/gogo/protobuf/protoc-gen-gogo.go ) |
824- | [ gogo:protobuf: protoc-gen-gogo ] ( pkg/plugin/gogo/protobuf/protoc-gen-gogo.go ) |
825- | [ gogo:protobuf: protoc-gen-gogofast ] ( pkg/plugin/gogo/protobuf/protoc-gen-gogo.go ) |
826- | [ gogo:protobuf: protoc-gen-gogofaster ] ( pkg/plugin/gogo/protobuf/protoc-gen-gogo.go ) |
827- | [ gogo:protobuf: protoc-gen-gogoslick ] ( pkg/plugin/gogo/protobuf/protoc-gen-gogo.go ) |
828- | [ gogo:protobuf: protoc-gen-gogotypes ] ( pkg/plugin/gogo/protobuf/protoc-gen-gogo.go ) |
829- | [ gogo:protobuf: protoc-gen-gostring ] ( pkg/plugin/gogo/protobuf/protoc-gen-gogo.go ) |
830- | [ grpc-ecosystem:grpc-gateway: protoc-gen-grpc-gateway ] ( pkg/plugin/grpcecosystem/grpcgateway/protoc-gen-grpc-gateway.go ) |
831- | [ scalapb:scalapb: protoc-gen-scala ] ( pkg/plugin/scalapb/scalapb/protoc_gen_scala.go ) |
832- | [ stackb: grpc .js: protoc-gen-grpc-js ] ( pkg/plugin/stackb/grpc_js/protoc-gen-grpc-js.go ) |
833- | [ stephenh:ts-proto: protoc-gen-ts-proto ] ( pkg/plugin/stephenh/ts-proto/protoc-gen-ts-proto.go ) |
834-
835- ## Appendix 3: preconfigured ` Rule ` implementations
836-
837- The rule name is an opaque string, but by convention they are maven-esqe
838- artifact identifiers that follow a GitHub org/repo/rule_name convention.
839-
840- | Plugin |
841- | ---------------------------------------------------------------------------------------------------|
842- | [ stackb:rules_proto: grpc_cc_library ] ( pkg/rule/rules_cc/grpc_cc_library.go ) |
843- | [ stackb:rules_proto: grpc_closure_js_library ] ( pkg/rule/rules_closure/grpc_closure_js_library.go ) |
844- | [ stackb:rules_proto: grpc_java_library ] ( pkg/rule/rules_java/grpc_java_library.go ) |
845- | [ stackb:rules_proto: grpc_nodejs_library ] ( pkg/rule/rules_nodejs/grpc_nodejs_library.go ) |
846- | [ stackb:rules_proto: grpc_web_js_library ] ( pkg/rule/rules_nodejs/grpc_web_js_library.go ) |
847- | [ stackb:rules_proto: grpc_py_library ] ( pkg/rule/rules_python/grpc_py_library.go ) |
848- | [ stackb:rules_proto: proto_cc_library ] ( pkg/rule/rules_cc/proto_cc_library.go ) |
849- | [ stackb:rules_proto: proto_closure_js_library ] ( pkg/rule/rules_closure/proto_closure_js_library.go ) |
850- | [ stackb:rules_proto: proto_compile ] ( pkg/protoc/proto_compile.go ) |
851- | [ stackb:rules_proto: proto_compiled_sources ] ( pkg/protoc/proto_compiled_sources.go ) |
852- | [ stackb:rules_proto: proto_descriptor_set ] ( pkg/protoc/proto_descriptor_set.go ) |
853- | [ stackb:rules_proto: proto_go_library ] ( pkg/rule/rules_go/go_library.go ) |
854- | [ stackb:rules_proto: proto_java_library ] ( pkg/rule/rules_java/proto_java_library.go ) |
855- | [ stackb:rules_proto: proto_nodejs_library ] ( pkg/rule/rules_nodejs/proto_nodejs_library.go ) |
856- | [ stackb:rules_proto: proto_py_library ] ( pkg/rule/rules_python/proto_py_library.go ) |
857- | [ bazelbuild:rules_scala: scala_proto_library ] ( pkg/rule/rules_scala/scala_proto_library.go ) |
858-
859- ## Appendix 4: Registered Flags
761+ ## Appendix 1: Registered Flags
860762
861763- ` --proto_configs ` : optional config.yaml file(s) that provide preconfiguration
862764- ` --proto_imports_in ` : index files to parse and load symbols from
@@ -870,7 +772,7 @@ artifact identifiers that follow a GitHub org/repo/rule_name convention.
870772- ` --proto_plugin ` : register custom starlark plugin of the form
871773 ` <file_name>%<plugin_name> `
872774
873- ## Appendix 5 : Known Directives
775+ ## Appendix 2 : Known Directives
874776
875777### ` gazelle:proto_plugin ` - Configure Plugin Metadata
876778
0 commit comments