-
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] Use MODULE.bazel for all dependencies
The WORKSPACE.bzlmod is no longer load-bearing, so as of this commit it should be possible to consume Drake as module external of other downstream projects (instead of as a repository external). However, note that the Drake module only provides Drake itself -- it doesn't yet export any public externals (e.g., eigen) for re-use. That is still future work (along with other customizations). Detailed changes: Adjust the pkg_config repository rule to convert canonical repository names back into their apparent names. Adjust some of our hard-coded runfiles paths (header_lint test, wheel build snopt, drake_models parse_test) to align with the new canonical repository names. Since we're doing surgery on the parse_test anyway, we also refactor it to use sharding for improved latency. Adjust our lcm native code loader to accommodate the new runfiles layout. Adjust labels used by our (non-symbolic) macros to only ever refer to drake labels, not external labels. Textual macros resolve labels in the workspace context of the code calling them, not Drake. Therefore they must only ever refer to Drake, since Drake's externals are now invisible (by default) with bzlmod. We introduce Drake aliases for the externals so that we can use a safe labels in our macros. (This fix is only necessary for macros which we expect downstream code to call, i.e., macros with out a "drake_..." prefix in their name. We still have plenty of other drake-specific macros that refer to non-drake labels, but that's not a problem.) The longer term fix for this will probably be switching from textual macros to symbolic macros, but we don't attempt that here. Adjust CMake logic to edit MODULE.bazel to opt-out of any overridden externals, so that the WORKSPACE.bzlmod replacements take effect.
- Loading branch information
1 parent
127042c
commit 7ad102c
Showing
17 changed files
with
340 additions
and
145 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
Oops, something went wrong.