[Doc] Improve rust analyzer section, distinguishing bzlmod and WORKSPACE#3365
[Doc] Improve rust analyzer section, distinguishing bzlmod and WORKSPACE#3365UebelAndre merged 4 commits intobazelbuild:mainfrom
Conversation
|
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. |
UebelAndre
left a comment
There was a problem hiding this comment.
Thanks! Just one question
docs/rust_analyzer.vm
Outdated
|
|
||
| #### Bzlmod | ||
|
|
||
| First, ensure `rules_rust` is setup in your workspace. By default, `rust_register_toolchains` will |
There was a problem hiding this comment.
Is this accurate for bzlmod? I thought all the toolchains were registered by default for @rules_rust//tools/rust_analyzer:gen_rust_project (excluding the rust toolchain itself)
There was a problem hiding this comment.
i'm not sure i understood correctly (i'm not so experienced with bazel), but commenting the line register_toolchains("@rust_toolchains//:all") from MODULE.bazel made the project still build
There was a problem hiding this comment.
In other words, what should users expect to put in their MODULE.bazel files after reading this? Can you add a snippet for that?
There was a problem hiding this comment.
Thanks, i tried reducing the MODULE file as possible with the new features, now the only required part is one line, i pushed
|
just to know, is there something i can do? |
UebelAndre
left a comment
There was a problem hiding this comment.
Sorry this fell off my radar, back to you!
docs/rust_analyzer.vm
Outdated
|
|
||
| #### Bzlmod | ||
|
|
||
| First, ensure `rules_rust` is setup in your workspace. By default, `rust_register_toolchains` will |
There was a problem hiding this comment.
In other words, what should users expect to put in their MODULE.bazel files after reading this? Can you add a snippet for that?
The documentation for the
rust-analyzersection is outdated, and realtive to the WORKSPACE approach. i tried improving it slightly, distinguishing the bzlmod approach. Right now, callingrust_analyzer_dependencies()when using bzlmod seems to throw an error. References issue #2997