Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bazel: set
--include_source_info
when generating protobuf code
This flag [instructs Bazel](bazelbuild/rules_proto#56 (comment)) to set a [command-line flag](protocolbuffers/protobuf#7623 (comment)) when invoking `protoc` that causes the generated proto descriptor sets to contain extra info: ``` --include_source_info When using --descriptor_set_out, do not strip SourceCodeInfo from the FileDescriptorProto. This results in vastly larger descriptors that include information about the original location of each decl in the source file as well as surrounding comments. ``` Setting this solves two problems: 1. We need the descriptor sets to have comments for cockroachdb#65814. 2. Without this change, generated `.pb.go` files from the sandbox won't contain comments. This makes the files more difficult to read and dirties the files in your checkout if you copy those `.pb.go` files to your workspace. Also delete an unnecessary `--symlink_prefix=_bazel/` from the `test` configuration (it's inherited from the `build` configuration so it's redundant). Release note: None
- Loading branch information