-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[build] Disable autoloaded (built-in) bazel rules #22305
[build] Disable autoloaded (built-in) bazel rules #22305
Conversation
dedbe13
to
5552f38
Compare
4762d59
to
8326231
Compare
FYI @ggould-tri @rpoyner-tri @xuchenhan-tri this is ready for reviews now, if anyone wants to sign up. |
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.
+@rpoyner-tri for reviews.
Reviewable status: LGTM missing from assignee rpoyner-tri(platform)
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.
Reviewed 29 of 29 files at r1, all commit messages.
Reviewable status: 1 unresolved discussion, LGTM missing from assignee rpoyner-tri(platform)
tools/skylark/cc.bzl
line 5 at r1 (raw file):
For all code built by Drake (both first-party code, and built-from-source externals), we should be using this file's macros. We should never call `native.cc_foo()` from anywhere other than this file, and any BUILD file
nit Does this comment need updating, now that we are avoiding native
rules for c++ altogether?
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.
Reviewable status: 1 unresolved discussion
8326231
to
dd1517b
Compare
The release-notable changes here are the addition of rules_java and rules_shell as new dependencies and the bump of the minimum supported bazel version up to 7.4. As part of uniform loading of rules we also refactor to provide a single point of control for shell and java, like we had previously done for cc and python and tidy up some missing pieces.
dd1517b
to
0f5f74b
Compare
) The release-notable changes here are the addition of rules_java and rules_shell as new dependencies and the bump of the minimum supported bazel version up to 7.4. As part of uniform loading of rules we also refactor to provide a single point of control for shell and java, like we had previously done for cc and python and tidy up some missing pieces.
Towards #20731.
The autoloading behavior will become deprecated and eventually go away in future bazel versions. This gets out ahead of the problem by opting-out of the autoloading. Note that the opt-out in
bazel.rc
is not inherited by downstream projects; it is only for Drake.Loading the specific rules versions also helps make it crystal clear to us which versions of starlark rules we are running. We definitely do not want to be mixing and matching versions in different places. With autoloading turned off, we know for sure what we're running, based on either the MODULE or WORKSPACE file (depending on which mode we're using).
This change is