feat: use skylib's use_all_repos to reduce toil#1420
feat: use skylib's use_all_repos to reduce toil#1420novas0x2a wants to merge 1 commit intobazel-contrib:mainfrom
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.
| # Note: bazel mod tidy will keep this up to date | ||
| use_repo( | ||
| tools, | ||
| "cmake-3.31.8-linux-aarch64", |
There was a problem hiding this comment.
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.
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.
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 tidyto keep the use_repo list up to date with the repos declared by the extension.Note: the bazel_features check for
has_reproducibleis no longer required, because this check is already embedded inside the skylib function.