rules_proto
rules_proto copied to clipboard
Extract protobuf_workspace to a separate repository
Released protoc binaries are great. It saves a lot of build time. Thanks for doing this!
However, maybe this could be extracted to a separate repository?
If I have to use rules_proto directly then the setup is really simple (just call rules_proto_dependencies in my workspace and it's done).
But things are getting slightly complicated for rules authors where rules depend on protoc. It's is not enough for a ruleset to provide rules_lang_dependencies in order to get protoc setup. You have to ask users of the ruleset to call rules_proto_dependencies directly or via some utility macro in their workspace.
It would be nice if rules authors could declare a repository in rules_lang_dependencies
http_archive(
name = "com_google_protobuf",
url = "a-repo-with-released-binaries/3.13.0.tar.gz",
)
I think this also somewhat relates to https://github.com/bazelbuild/rules_proto/issues/73 because that proposed repository with released binaries could have different releases corresponding to protoc binary versions.
Also if I understood correctly the new plan of migrating native rules to starlark https://docs.google.com/document/d/1GW7UVo1s9X0cti9OMgT3ga5ozKYUWLPk9k8c4-34rC4/edit#heading=h.e2vec9j9h1s9 bazel users will not be supposed to load rules_proto in their workspaces. In this case (I think) a separate repository with released binaries also would make sense.