Common dependencies are hard to reuse #9325
Labels
P3
We're not considering working on this, but happy to review a PR. (No assignee)
stale
Issues or PRs that are stale (no activity for 30 days)
team-ExternalDeps
External dependency handling, remote repositiories, WORKSPACE file.
type: feature request
Description of the problem / feature request:
Bazel UX for dealing with common dependencies is less than ideal at the moment, one needs to:
project_dependencies
-like function accepting a ton ofomit_xxx
flags deciding whether to load a particular sub-dependency or not (in case one is available already).googletest
ascom_google_googletest
, notcom_googletest
orcom_google_google_test
orgoogletest
(and this is a simple case).cmake_external
dependency sharing (these require//external:<name>
syntax so need to beselect
-ed via Bazel config settings.Feature requests: what underlying problem are you trying to solve with this feature?
Simplify the process and make it less error-prone, one idea I had was to allow declaring a map like
so then instead of
bool
flags one can writenot having to rely on string matching and defining stuff like
and
This was originally encountered when submoduling Envoy and sharing dependencies between Envoy's and other submodules, see discussion at envoyproxy/envoy#8141 which has some examples. Related to #2757.
Example of a dependency trying to be a good Bazel citizen https://github.com/Netflix/spectator-cpp/blob/master/BUILD
The text was updated successfully, but these errors were encountered: