[bazel.build] Problem with /reference/be/protocol-buffer #23611
Labels
P2
We'll consider working on this in future. (Assignee optional)
team-Documentation
Documentation improvements that cannot be directly linked to other team labels
team-OSS
Issues for the Bazel OSS team: installation, release processBazel packaging, website
team-Rules-API
API for writing rules/aspects: providers, runfiles, actions, artifacts
type: documentation (cleanup)
Page link:
https://bazel.build/reference/be/protocol-buffer
Problem description (include actual vs expected text, if applicable):
The https://github.com/bazelbuild/rules_proto/ repository is deprecated.
Where do you see this issue? (include link to specific section of the page, if applicable)
See this section: https://bazel.build/reference/be/protocol-buffer#proto_library
Any other information you'd like to share?
For what it's worth it's very hard for developers to come in and actually use bazel to build protocol buffers at the moment if they don't already have a working build. There is a lot of information in various places online which seems valid for old versions of protobuf; for example, many sources say that you can load the functions that generate code from protocol buffers using the following:
Now it seems that
cc_proto_library
is not available this way. I tried consulting the Bazel documentation but I don't actually think there's information about how to loadcc_proto_library
on the docs page. Furthermore if you look on the protocol buffers bazel docs they point you to the deprecatedrules_proto
repository. However in the readme for that repository, it says that the rules have been migrated to the protobuf repo, but if I search the docs in that repo there is no mention ofcc_proto_library
at all.Looking in the protobuf repo examples directory, there is a usage of
cc_proto_library
which apparently you can load by doingafter you've done
However there is a note about needing
However for the project I'm working on, I'm trying to update the (currently broken) build system so that it actually runs; unfortunately doing this leads to other build errors which look an awful lot like the
cc_proto_library
andpy_proto_library
APIs have changed.Anyway, it's not really in the scope of this issue to fix all of this, but I just wanted to say that it's currently quite hard for new Bazel users to come in and actually find a path forward. This is exacerbated by the fact that in addition to managing project dependencies, developers are required to manually manage Bazel rule dependencies, as well as Bazel versions via Bazelisk. If there's any way to update the docs with a working example of how to generate python and C++ code from protocol buffers, I'd be super grateful.
The text was updated successfully, but these errors were encountered: