Skip to content

Commit e168553

Browse files
authored
Update README.md
1 parent b646d4c commit e168553

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

README.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,26 @@
11
# Bazel toolchain for pre-built protoc
22

3-
Using Protocol Buffers with Bazel has always been painful.
3+
_#NeverCompileProtocAgain_
4+
5+
Using Protocol Buffers with Bazel has always been difficult.
46

57
- Nearly every Bazel user has waited for `protoc` to compile from sources many, MANY times.
8+
This universally slows down builds, especially due to issues like https://github.com/bazelbuild/bazel/issues/7095 where it is observed to be easily cache-busted.
69
- The versioning of the protobuf module on Bazel Central Registry has fallen behind and contains many patches.
10+
As of mid-March 2024 there are [7 patches](https://github.com/bazelbuild/bazel-central-registry/tree/main/modules/protobuf/23.1/patches)
11+
which essentially constitute a fork of the protobuf repo specifically for publishing to BCR.
712
- Relying on the protobuf runtime for each language from the `@com_google_protobuf` repo forces you to use
813
the same version of the runtime for all languages in a monorepo, and matching protoc.
914

1015
The key observations:
1116

1217
- `protoc` has always been distributed as pre-built binaries on https://github.com/protocolbuffers/protobuf/releases
13-
- the protobuf runtimes for each language are distributed to the appropriate package manager
18+
- That distribution includes the "well known types" such as `timestamp.proto`
19+
- The protobuf runtimes for each language are distributed to the appropriate package manager.
1420

1521
Bazel 7 introduced `--incompatible_enable_proto_toolchain_resolution` to allow us fetch `protoc` rather than re-build it!
1622
That flag ALSO decouples how each language rule locates the runtime.
17-
18-
This repo simply contains a toolchain that resolves those pre-built binaries.
23+
Thanks to that flag, this repo simply contains a toolchain that resolves those pre-built binaries.
1924

2025
See `examples` for several language rules like `py_proto_library` and `java_proto_library`.
2126
There is NO dependency on `@com_google_protobuf` anywhere.

0 commit comments

Comments
 (0)