-
Notifications
You must be signed in to change notification settings - Fork 5
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
Do not download non-local binaries #12
Conversation
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.
Seems reasonable
The way Bazel is meant for this to work (and works with remote execution as well) is via toolchain resolution. See https://github.com/aspect-build/rules_py/blob/main/py/private/toolchain/repo.bzl as an example: the "hub" repo just registers a bunch of |
Still not sure I follow how to defer downloads in a repository rule — it seems like even if I create a repository for each of the platforms for each of the tools that I’m going to end up needing a download call in that rule, which ends up largely the same? |
I'll try to send the PR for this :) |
Today, we download all the declared binaries in our lockfile. This can be slow/expensive.
After this PR, we skip downloading any binary that doesn't match the local machine's OS or CPU. We're not users of remote execution, and it's not clear if/how this affects remote execution. If it negatively affects RBE, we can always drop this functionality behind a flag on our repository rules.