-
Notifications
You must be signed in to change notification settings - Fork 419
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bazel Build alterations #416
Bazel Build alterations #416
Conversation
TL;DR: Consumers of the bazel build can define their own dependencies prior to importing OTel and we will attempt to use their build/versions rather than our own.
Codecov Report
@@ Coverage Diff @@
## master #416 +/- ##
=======================================
Coverage 94.58% 94.58%
=======================================
Files 179 179
Lines 7677 7677
=======================================
Hits 7261 7261
Misses 416 416
|
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.
LGTM. Would like some more eye to review too due to my limited bazel knowledge : )
], | ||
) | ||
# Load our direct dependencies. | ||
opentelemetry_cpp_deps() |
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.
+1 on these changes. The root WORKSPACE
looks much cleaner now : )
native.local_repository, | ||
name = "com_google_googletest", | ||
path = "third_party/googletest", | ||
) |
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.
Nice. We are using google-test and benchmark from submodules directory now : )
|
||
# OTLP Protocol definition | ||
maybe( | ||
native.new_local_repository, |
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.
This seems coming from the WORKSPACE
file, but still wondering why OTLP protocol definition is native.new_local_repository
but others are native.local_repository
?
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's the difference between something that HAS a bazel-build already, or one where we're adapting it to be a BAZEL workspace.
OTLP does NOT have a bazel build, so we're provding our own build file.
# Google Benchmark library. | ||
# Only needed for benchmarks, not to build the OpenTelemetry library. | ||
maybe( | ||
native.local_repository, |
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.
Are consumers of otel-cpp meant to load e.g. benchmark before calling opentelemetry_cpp_deps()
?
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.
yeah. I need to write the "INSTALLING" section for bazel, but basic gist is if you want to configure your own version/build that you can do so if you load BEFORE calling our macro, but you'll be on your own ensuring the version is compatible with us.
This PR attempts to do the following:
Note: This follows OpenCensusCpp implementation pretty closely
Note: These submodules are NOT locked to version/tags, but really should be. Also, lack of SHA verification has me concerned. I'm not sure what the git submodule equivalent of this is.