-
Notifications
You must be signed in to change notification settings - Fork 256
feat: use skylib's use_all_repos to reduce toil #1420
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
base: main
Are you sure you want to change the base?
Conversation
https://github.com/bazelbuild/bazel-skylib/blob/main/docs/modules_doc.md#modulesuse_all_repos will cause `bazel mod tidy` to keep the use_repo list up to date with the repos declared by the extension. Note: the bazel_features check for `has_reproducible` is no longer required, because this check is already embedded inside the skylib function.
use_repo( | ||
tools, | ||
"cmake-3.31.8-linux-aarch64", |
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.
Note that this version does not match the version given in tools.cmake because the extension currently only honors tools versions set in non-root repos (and the example repo is a root repo for the purposes of this MODULE.bazel file). This does not appear to be a bug in this PR.
See my comment over here, I suspect the fix is to just remove mod.is_root
line?
"cmake-3.31.8-linux-aarch64", | ||
"cmake-3.31.8-linux-x86_64", | ||
"cmake-3.31.8-macos-universal", | ||
"cmake-3.31.8-windows-i386", | ||
"cmake-3.31.8-windows-x86_64", |
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.
I don't think we actually want to be pulling these repositories names into the parent scope? In fact the extension should be reducing the number of repositories it is making visible to the user as the structure of these is an implementation detail.
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.
I think not having these in the list is maybe what is generating that warning I mentioned in the other issue (though I'm not confident in that assertion...)
https://github.com/bazelbuild/bazel-skylib/blob/main/docs/modules_doc.md#modulesuse_all_repos will cause
bazel mod tidy
to keep the use_repo list up to date with the repos declared by the extension.Note: the bazel_features check for
has_reproducible
is no longer required, because this check is already embedded inside the skylib function.