-
Notifications
You must be signed in to change notification settings - Fork 76
Build fix. #378
Build fix. #378
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,13 @@ workspace(name = "io_opencensus_cpp") | |
|
||
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") | ||
|
||
# Build rules for C++ projects. | ||
http_archive( | ||
name = "rules_cc", | ||
strip_prefix = "rules_cc-master", | ||
urls = ["https://github.com/bazelbuild/rules_cc/archive/master.zip"], | ||
) | ||
|
||
# We depend on Abseil. | ||
http_archive( | ||
name = "com_google_absl", | ||
|
@@ -39,6 +46,20 @@ http_archive( | |
urls = ["https://github.com/google/benchmark/archive/master.zip"], | ||
) | ||
|
||
# Used by gRPC. | ||
http_archive( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You shouldn't need this particular There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 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) |
||
name = "build_bazel_rules_apple", | ||
strip_prefix = "rules_apple-master", | ||
urls = ["https://github.com/bazelbuild/rules_apple/archive/master.zip"], | ||
) | ||
|
||
load( | ||
"@build_bazel_rules_apple//apple:repositories.bzl", | ||
"apple_rules_dependencies", | ||
) | ||
|
||
apple_rules_dependencies() | ||
|
||
# Used by gRPC. | ||
http_archive( | ||
name = "build_bazel_apple_support", | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 adeps()
macro.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 inrules_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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.