-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[build] Disable autoloaded (built-in) bazel rules
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.
- Loading branch information
1 parent
b95c19c
commit 8326231
Showing
29 changed files
with
159 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
"""Provides a single point of control for rules_shell inside Drake.""" | ||
|
||
load("@rules_shell//shell:sh_binary.bzl", _sh_binary = "sh_binary") | ||
load("@rules_shell//shell:sh_test.bzl", _sh_test = "sh_test") | ||
|
||
def sh_binary(name, **kwargs): | ||
_sh_binary( | ||
name = name, | ||
**kwargs | ||
) | ||
|
||
def sh_test(name, **kwargs): | ||
_sh_test( | ||
name = name, | ||
**kwargs | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
load("//tools/lint:lint.bzl", "add_lint_tests") | ||
|
||
# Required for workspace_bzlmod_sync_test.py. | ||
exports_files( | ||
["repository.bzl"], | ||
visibility = ["//tools/workspace:__pkg__"], | ||
) | ||
|
||
add_lint_tests() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
load("//tools/workspace:github.bzl", "github_archive") | ||
|
||
# Note that we do NOT install a LICENSE file as part of the Drake install | ||
# because this repository is required only when building and testing with | ||
# Bazel. | ||
|
||
def rules_java_repository( | ||
name, | ||
mirrors = None): | ||
if native.bazel_version[0:2] == "7.": | ||
# The new rules_java only works with Bazel 8; for bazel 7 we'll use the | ||
# built-in rules_java. We can remove this once Drake's minimum Bazel | ||
# version is >= 8. | ||
return | ||
github_archive( | ||
name = name, | ||
repository = "bazelbuild/rules_java", # License: Apache-2.0, | ||
upgrade_advice = """ | ||
When updating, you must also manually propagate to the new version | ||
number into the MODULE.bazel file (at the top level of Drake). | ||
""", | ||
commit = "8.6.1", | ||
sha256 = "b2519fabcd360529071ade8732f208b3755489ed7668b118f8f90985c0e51324", # noqa | ||
mirrors = mirrors, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
load("//tools/lint:lint.bzl", "add_lint_tests") | ||
|
||
# Required for workspace_bzlmod_sync_test.py. | ||
exports_files( | ||
["repository.bzl"], | ||
visibility = ["//tools/workspace:__pkg__"], | ||
) | ||
|
||
add_lint_tests() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
load("//tools/workspace:github.bzl", "github_archive") | ||
|
||
# Note that we do NOT install a LICENSE file as part of the Drake install | ||
# because this repository is required only when building and testing with | ||
# Bazel. | ||
|
||
def rules_shell_repository( | ||
name, | ||
mirrors = None): | ||
github_archive( | ||
name = name, | ||
repository = "bazelbuild/rules_shell", # License: Apache-2.0, | ||
upgrade_advice = """ | ||
When updating, you must also manually propagate to the new version | ||
number into the MODULE.bazel file (at the top level of Drake). | ||
""", | ||
commit = "v0.3.0", | ||
sha256 = "d8cd4a3a91fc1dc68d4c7d6b655f09def109f7186437e3f50a9b60ab436a0c53", # noqa | ||
mirrors = mirrors, | ||
) |
Oops, something went wrong.