-
Notifications
You must be signed in to change notification settings - Fork 435
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
Stop rustfmt versioning from overriding rust-analyzer versioning. #2553
Conversation
…ified rust-analyzer version.
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
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.
Good catch, thank you!
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [rules_rust](https://togithub.com/bazelbuild/rules_rust) | http_archive | minor | `0.40.0` -> `0.41.0` | --- ### Release Notes <details> <summary>bazelbuild/rules_rust (rules_rust)</summary> ### [`v0.41.0`](https://togithub.com/bazelbuild/rules_rust/releases/tag/0.41.0) [Compare Source](https://togithub.com/bazelbuild/rules_rust/compare/0.40.0...0.41.0) ### 0.41.0 ```python load("@​bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") http_archive( name = "rules_rust", integrity = "sha256-Y4v6kjQQfXxh5tU6FQB6YXux/ODFGUq3IlpgBV4Bwj8=", urls = ["https://github.com/bazelbuild/rules_rust/releases/download/0.41.0/rules_rust-v0.41.0.tar.gz"], ) ``` Additional documentation can be found at: https://bazelbuild.github.io/rules_rust/#setup #### What's Changed - Add example of cross-compiling with musl by [@​illicitonion](https://togithub.com/illicitonion) in [https://github.com/bazelbuild/rules_rust/pull/2535](https://togithub.com/bazelbuild/rules_rust/pull/2535) - Temporarily disable "Examples Clang with LLD" CI job by [@​UebelAndre](https://togithub.com/UebelAndre) in [https://github.com/bazelbuild/rules_rust/pull/2560](https://togithub.com/bazelbuild/rules_rust/pull/2560) - Update cargo_toml to `0.19.2` by [@​jun-sheaf](https://togithub.com/jun-sheaf) in [https://github.com/bazelbuild/rules_rust/pull/2551](https://togithub.com/bazelbuild/rules_rust/pull/2551) - Stop rustfmt versioning from overriding rust-analyzer versioning. by [@​ReticentIris](https://togithub.com/ReticentIris) in [https://github.com/bazelbuild/rules_rust/pull/2553](https://togithub.com/bazelbuild/rules_rust/pull/2553) - Rust Analyzer added NixOS supported platforms by [@​rickvanprim](https://togithub.com/rickvanprim) in [https://github.com/bazelbuild/rules_rust/pull/2547](https://togithub.com/bazelbuild/rules_rust/pull/2547) - Removed unused 'select_with_or' by [@​dzbarsky](https://togithub.com/dzbarsky) in [https://github.com/bazelbuild/rules_rust/pull/2562](https://togithub.com/bazelbuild/rules_rust/pull/2562) - Added Rust 1.77.0 by [@​UebelAndre](https://togithub.com/UebelAndre) in [https://github.com/bazelbuild/rules_rust/pull/2568](https://togithub.com/bazelbuild/rules_rust/pull/2568) - bzlmod: fix issue with nightly versions by [@​QuentinPerez](https://togithub.com/QuentinPerez) in [https://github.com/bazelbuild/rules_rust/pull/2545](https://togithub.com/bazelbuild/rules_rust/pull/2545) - Allow a no-cargo setup for bzlmod by [@​dzbarsky](https://togithub.com/dzbarsky) in [https://github.com/bazelbuild/rules_rust/pull/2565](https://togithub.com/bazelbuild/rules_rust/pull/2565) - Fixed genquery for rust targets by [@​UebelAndre](https://togithub.com/UebelAndre) in [https://github.com/bazelbuild/rules_rust/pull/2559](https://togithub.com/bazelbuild/rules_rust/pull/2559) - Fix cargo-bazel recompile for MODULE.bazel by [@​ericmcbride](https://togithub.com/ericmcbride) in [https://github.com/bazelbuild/rules_rust/pull/2570](https://togithub.com/bazelbuild/rules_rust/pull/2570) - Minor cleanup of bzl files by [@​UebelAndre](https://togithub.com/UebelAndre) in [https://github.com/bazelbuild/rules_rust/pull/2573](https://togithub.com/bazelbuild/rules_rust/pull/2573) - Added starlark unit tests for `rust_toolchain.opt_level` by [@​UebelAndre](https://togithub.com/UebelAndre) in [https://github.com/bazelbuild/rules_rust/pull/2578](https://togithub.com/bazelbuild/rules_rust/pull/2578) - Mark the bzlmod extension reproducible as appropriate by [@​dzbarsky](https://togithub.com/dzbarsky) in [https://github.com/bazelbuild/rules_rust/pull/2575](https://togithub.com/bazelbuild/rules_rust/pull/2575) - Release 0.41.0 by [@​UebelAndre](https://togithub.com/UebelAndre) in [https://github.com/bazelbuild/rules_rust/pull/2569](https://togithub.com/bazelbuild/rules_rust/pull/2569) #### New Contributors - [@​jun-sheaf](https://togithub.com/jun-sheaf) made their first contribution in [https://github.com/bazelbuild/rules_rust/pull/2551](https://togithub.com/bazelbuild/rules_rust/pull/2551) - [@​ReticentIris](https://togithub.com/ReticentIris) made their first contribution in [https://github.com/bazelbuild/rules_rust/pull/2553](https://togithub.com/bazelbuild/rules_rust/pull/2553) - [@​QuentinPerez](https://togithub.com/QuentinPerez) made their first contribution in [https://github.com/bazelbuild/rules_rust/pull/2545](https://togithub.com/bazelbuild/rules_rust/pull/2545) - [@​ericmcbride](https://togithub.com/ericmcbride) made their first contribution in [https://github.com/bazelbuild/rules_rust/pull/2570](https://togithub.com/bazelbuild/rules_rust/pull/2570) **Full Changelog**: bazelbuild/rules_rust@0.40.0...0.41.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/bazel-contrib/toolchains_llvm). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yNjkuMiIsInVwZGF0ZWRJblZlciI6IjM3LjI2OS4yIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIn0=--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
There is a bug/typo in
rust_register_toolchains
whererustfmt_version
would always overriderust_analyzer_version
(default or otherwise specified). This causes problems related to mismatched ABIs when rust-analyzer tries to expand proc macros if one were to use an older-than-default nightly toolchain without specifying a specificrustfmt_version
. This is becauserust-analyzer
will be set to use the defaultrustfmt_version
which isnightly/2024-02-08
:rules_rust/rust/private/common.bzl
Line 36 in 8b977b5
As a very basic example of what I mean:
Will result in rust-analyzer complaining with:
Using a workaround of setting
rustfmt_version
causes the ABI mismatch to be resolved:This PR fixes the issue so that rust-analyzer version selection actually works.