Skip to content

[workspace] Patch rules_rust for Bazel 7 compatibility #21104

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

Merged
merged 1 commit into from
Mar 6, 2024

Conversation

jwnimmer-tri
Copy link
Collaborator

@jwnimmer-tri jwnimmer-tri commented Mar 6, 2024

The full extent of bazelbuild/rules_rust#2383 is not actually fixed, so we need to work around it here.

Towards #21103 and #21054.

The manual testing recipe here is bazel test //... --config=lint on Ubuntu when using Bazel 7.0. On master, it barfs an error about a BUILD file cycle[1]; with this PR, it passes.

One good way to try that is to use bazelisk.py test //... --config=lint via bazelisk.py to use a temporary bazel version, by changing the .bazeliskrc to point to 7.0.2 like we have in #21003.

The intent behind landing this patch now (ahead of Drake's full Bazel 7 transition), is to make it easier to test out Bazel 7 in downstream CI, and to make any commit-revert war over #21103 as minimal as possible. The unprovisioned job in #21103 has evidence that Bazel 7 will be happy in CI.


[1]

ERROR: .../external/rules_rust/util/import/BUILD.bazel:21:6:
  in alias rule @@rules_rust//util/import:import: cycle in dependency graph:
    //lcmtypes:py/install_lint
...
    @@clarabel_cpp_internal//:clarabel_cpp
...
    @@crate__autocfg-1.1.0//:autocfg
.-> @@rules_rust//util/import:import
|   @@rules_rust//util/import:import_macro_label
|   @@rules_rust//util/import:import_macro
|   @@rules_rust//util/import:import_macro_impl
`-- @@rules_rust//util/import:import

This change is Reviewable

@jwnimmer-tri jwnimmer-tri added priority: medium status: single reviewer ok https://drake.mit.edu/reviewable.html release notes: fix This pull request contains fixes (no new features) labels Mar 6, 2024
@jwnimmer-tri
Copy link
Collaborator Author

+@rpoyner-tri for both reviews, please.

Copy link
Contributor

@rpoyner-tri rpoyner-tri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😱
also :lgtm:

Reviewed 1 of 2 files at r1, all commit messages.
Reviewable status: :shipit: complete! all discussions resolved, LGTM from assignee rpoyner-tri(platform)

@rpoyner-tri rpoyner-tri merged commit 16f907c into RobotLocomotion:master Mar 6, 2024
@jwnimmer-tri jwnimmer-tri deleted the bazel7-rules_rust branch March 6, 2024 22:48
jwnimmer-tri added a commit to jwnimmer-tri/drake that referenced this pull request Apr 1, 2024
RussTedrake pushed a commit to RussTedrake/drake that referenced this pull request Dec 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: medium release notes: fix This pull request contains fixes (no new features) status: single reviewer ok https://drake.mit.edu/reviewable.html
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants