Skip to content
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][FR] Consider a workspace() function to recursively add dependencies #1510

Closed
coryan opened this issue Nov 11, 2022 · 1 comment · Fixed by #1520
Closed

[bazel][FR] Consider a workspace() function to recursively add dependencies #1510

coryan opened this issue Nov 11, 2022 · 1 comment · Fixed by #1520

Comments

@coryan
Copy link
Contributor

coryan commented Nov 11, 2022

Is your feature request related to a problem? Please describe.

Starting with #1408 (which was included in v1.7.1) all users for google/benchmark via Bazel must provide the @libpfm repository or must set the perfcounters config to 0
As you may know, Bazel does not load WORKSPACE files recursively (see bazelbuild/bazel#1943 for history, and bzlmod for the modern thing). This meas downstream projects must add this dependency to their own WORKSPACE files.

Describe the solution you'd like

By convention, Bazel projects provide a *_deps() or workspace() function to load the dependencies they need. For example, this is one in Tensorflow:

https://github.com/tensorflow/tensorflow/blob/master/tensorflow/workspace2.bzl
https://github.com/tensorflow/tensorflow/blob/master/tensorflow/workspace1.bzl

and here is what grpc does:

https://github.com/grpc/grpc/blob/master/bazel/grpc_deps.bzl

Anything along those lines would be helpful.

Describe alternatives you've considered

You could wait until bzlmod is ready, but I do not know if that works with rules_foreign_cc

Additional context

Adding a new dep seems surprising for a patch release.

@LebedevRI LebedevRI changed the title [FR] Consider a workspace() function to recursively add dependencies [bazel][FR] Consider a workspace() function to recursively add dependencies Nov 11, 2022
@Forchapeatl
Copy link

Hello everyone. @coryan it seems like . Please help me.

workspace(name = "com_github_google_benchmark")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants