Conversation
Need rules_cc for abseil and build_bazel_rules_apple for grpc.
| load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") | ||
|
|
||
| # Build rules for C++ projects. | ||
| http_archive( |
There was a problem hiding this comment.
For what it's worth, I would consider the fact that this dependency had to be added to your WORKSPACE a bug in the abseil-cpp repo. There doesn't appear to be anything stopping them from pulling this out to a deps() macro.
There was a problem hiding this comment.
Please correct me if I'm wrong but my understanding is that this will be required for all C++ projects after bazel 1.0(?) because rules like cc_library will move from native to skylark implementations.
There was a problem hiding this comment.
That may be the case for one hop. But suppose absl CPP requires rules_cc and your repo provides, say, a Golang tool. It's not intuitive to users of the Golang tool that they should have to pull in rules_cc despite never directly using a C++ rule.
This has already happened in the gRPC repo. We have to pull in a Golang-only tool used by Envoy even though we're only -- to my knowledge -- using some of their protos.
There was a problem hiding this comment.
Ditto. opencensus-cpp pulls in e.g. grpc-java, because opencensus-proto depends on it.
As for rules_cc specifically, I think opencensus-cpp will end up using them directly after bazel 1.0.
| ) | ||
|
|
||
| # Used by gRPC. | ||
| http_archive( |
There was a problem hiding this comment.
You shouldn't need this particular http_archive invocation unless for some reason you really want master branch (which, btw, makes your build non-hermetic). You're already getting an instance from your call to grpc_deps(). It's just the load() and apple_rules_dependencies() invocations below that are necessary due to bazelbuild/bazel#1550.
There was a problem hiding this comment.
Thanks! How does #379 look to you?
As for master, we are trying to follow Abseil's "live at head" philosophy. (...on our own master branch; whereas OpenCensus releases pin their deps)
Need rules_cc for abseil and build_bazel_rules_apple for grpc.