Open oliverlee opened 2 weeks ago
The code below is a workaround; however, @oliverlee , do you think rules_foreign_cc_dependencies()
itself should be calling bazel_feature_deps()
?
load("@rules_foreign_cc//foreign_cc:repositories.bzl", "rules_foreign_cc_dependencies")
rules_foreign_cc_dependencies()
load("@bazel_features//:deps.bzl", "bazel_features_deps")
bazel_features_deps()
rules_foreign_cc_dependencies()
can't do it as it defines the repository; we'd have to add an additional workspace macro to do that setup.
I think the best we can do is update the documentation to include the bazel_features setup as I don't think we need to be introducing a new workspace macro at this point given the future is bzlmod.
I think either two macros or a note in the README is fine.
bazel_features
is pulled in here: https://github.com/bazelbuild/rules_foreign_cc/blob/b25485b26d6ddf6be8bde2bc0c651b1a06ebe54c/foreign_cc/repositories.bzl#L86-L92But I don't see (a second macro for)
bazel_features_deps
: https://github.com/bazel-contrib/bazel_features/blob/main/deps.bzl which in turn sets up these: https://github.com/bazel-contrib/bazel_features/blob/main/private/repos.bzl