Skip to content

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

novas0x2a
Copy link
Contributor

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.

@novas0x2a novas0x2a changed the title use skylib's use_all_repos to reduce toil feat: use skylib's use_all_repos to reduce toil Jun 20, 2025
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",
Copy link
Contributor Author

@novas0x2a novas0x2a Jun 20, 2025

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?

Comment on lines +31 to +35
"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",
Copy link
Member

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.

Copy link
Contributor Author

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...)

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

Successfully merging this pull request may close these issues.

2 participants