chore(build): use includes
argument in BUILD.bazel
#154
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Envoy was failing to build becase it couldn't locate the necessary headers in the
src
directory, even with the-Isrc/datadog
flag. After investigating, I found that dd-trace-cpp srouce code is actually located atexternal/com_github_datadog_dd_trace_cpp/src/datadog
. This means the correct include path should be-Iexternal/com_github_datadog_dd_trace_cpp/src/datadog
. For some reson Bazel isn't able to handle this path expansion automatically.After researching, it seems the recommended solution is to use the
includes
argument incc_library
. However, the Bazel documentation includes this warning:I'm not entirely sure about the implications here, so I went ahead with this approach despite the warning. If someone with a bigger brain, IQ and experience can suggest a better way™️, I'm happy to adjust accordingly!
Motivation
Preparing the new release 🎉