-
Notifications
You must be signed in to change notification settings - Fork 492
[Doc] Improve rust analyzer section, distinguishing bzlmod and WORKSPACE #3365
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
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. |
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.
Thanks! Just one question
docs/rust_analyzer.vm
Outdated
@@ -8,23 +8,46 @@ such a file. | |||
|
|||
### Setup | |||
|
|||
#### Bzlmod | |||
|
|||
First, ensure `rules_rust` is setup in your workspace. By default, `rust_register_toolchains` will |
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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? |
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.
Sorry this fell off my radar, back to you!
docs/rust_analyzer.vm
Outdated
@@ -8,23 +8,46 @@ such a file. | |||
|
|||
### Setup | |||
|
|||
#### Bzlmod | |||
|
|||
First, ensure `rules_rust` is setup in your workspace. By default, `rust_register_toolchains` will |
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
The documentation for the
rust-analyzer
section 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