commit | a6ddf5fb804f8f8cdde8682ab61d889387118004 | [log] [tgz] |
---|---|---|
author | bors <bors@rust-lang.org> | Mon Apr 01 10:43:06 2024 +0000 |
committer | bors <bors@rust-lang.org> | Mon Apr 01 10:43:06 2024 +0000 |
tree | 09ad39d9a3a618705dce315ee22bf3af7b766582 | |
parent | 26786608802b53dd8b3bfb48cd84f36f7e6d992f [diff] | |
parent | 0f72ab1dd34715b36586c89568db80c68d364b01 [diff] |
Auto merge of #16961 - Wilfred:fix_crate_ids, r=Veykril Fix crate IDs when multiple workspaces are loaded Previously, we assumed that the crate numbers in a `rust-project.json` always matched the `CrateId` values in the crate graph. This isn't true when there are multiple workspaces, because the crate graphs are merged and the `CrateId` values in the merged graph are different. This broke flycheck (see first commit), because we were unable to find the workspace when a file changed, so we every single flycheck, producing duplicate compilation errors. Instead, use the crate root module path to look up the relevant flycheck. This makes `ProjectWorkspace::Json` consistenet with `ProjectWorkspace::Cargo`. Also, define a separate JSON crate number type, to prevent bugs like this happening again.
rust-analyzer is a modular compiler frontend for the Rust language. It is a part of a larger rls-2.0 effort to create excellent IDE support for Rust.
https://rust-analyzer.github.io/manual.html#installation
If you want to contribute to rust-analyzer or are just curious about how things work under the hood, check the ./docs/dev folder.
If you want to use rust-analyzer's language server with your editor of choice, check the manual folder. It also contains some tips & tricks to help you be more productive when using rust-analyzer.
See the corresponding sections of the manual.
For usage and troubleshooting requests, please use “IDEs and Editors” category of the Rust forum:
https://users.rust-lang.org/c/ide/14
For questions about development and implementation, join rust-analyzer working group on Zulip:
https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Frust-analyzer
rust-analyzer is primarily distributed under the terms of both the MIT license and the Apache License (Version 2.0).
See LICENSE-APACHE and LICENSE-MIT for details.