rust-analyzer/crates
bors a6ddf5fb80 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.
2024-04-01 10:43:06 +00:00
..
base-db Rename ProcMacroKind::FuncLike to Bang 2024-03-22 11:20:56 +01:00
cfg Review Updates and added tests. 2024-03-11 11:05:59 -04:00
flycheck internal: Enforce utf8 paths 2024-03-19 15:39:00 +01:00
hir implement len and is_empty method in generic_params 2024-03-29 18:26:46 +05:30
hir-def implement len and is_empty method in generic_params 2024-03-29 18:26:46 +05:30
hir-expand Rename ProcMacroKind::FuncLike to Bang 2024-03-22 11:20:56 +01:00
hir-ty implement len and is_empty method in generic_params 2024-03-29 18:26:46 +05:30
ide Auto merge of #16971 - HKalbasi:test-explorer, r=HKalbasi 2024-03-29 02:06:22 +00:00
ide-assists fix make HirDisplay format lifetimes first 2024-03-18 17:18:08 +05:30
ide-completion Auto merge of #16805 - dfireBird:lifetime_lowering, r=Veykril 2024-03-26 07:58:43 +00:00
ide-db Split SymbolKind::Function into Function and Method 2024-03-17 11:07:22 +01:00
ide-diagnostics Make use of ThinArc in RawAttrs 2024-03-21 11:49:09 +01:00
ide-ssr internal: Improve rooted upmapping 2024-03-12 13:46:58 +01:00
intern Use Cargo's [workspace.lints.*] to config clippy 2023-12-29 23:51:32 +09:00
limit Merge commit 'ddf105b646c6749a2de2451c9a499a354eec79c2' into sync-from-ra 2024-02-11 08:40:19 +02:00
load-cargo Rename ProcMacroKind::FuncLike to Bang 2024-03-22 11:20:56 +01:00
mbe internal: Remove span trait 2024-03-21 20:08:30 +01:00
parser fix: Improve error recovery for match arms 2024-03-19 10:55:47 +01:00
paths fix: Don't assert paths being utf8 when filtering them in the watcher 2024-03-22 08:04:50 +01:00
proc-macro-api fix: Rename func_like to FuncLike 2024-03-22 23:03:44 +01:00
proc-macro-srv Rename ProcMacroKind::FuncLike to Bang 2024-03-22 11:20:56 +01:00
proc-macro-srv-cli Lint debug prints and disallowed types with clippy 2024-02-01 17:57:27 +01:00
profile Merge commit '574e23ec508064613783cba3d1833a95fd9a5080' into sync-from-ra 2024-03-10 08:47:38 +02:00
project-model Auto merge of #16961 - Wilfred:fix_crate_ids, r=Veykril 2024-04-01 10:43:06 +00:00
rust-analyzer Auto merge of #16961 - Wilfred:fix_crate_ids, r=Veykril 2024-04-01 10:43:06 +00:00
salsa Add tracing spans to macro generated database 2024-03-06 20:19:36 +01:00
sourcegen Merge commit 'ddf105b646c6749a2de2451c9a499a354eec79c2' into sync-from-ra 2024-02-11 08:40:19 +02:00
span Move Edition into span crate 2024-03-21 10:21:44 +01:00
stdx Remove dead test code 2024-03-14 16:24:51 +01:00
syntax internal: Move grammar codegen into xtask 2024-03-19 10:57:53 +01:00
test-fixture Rename ProcMacroKind::FuncLike to Bang 2024-03-22 11:20:56 +01:00
test-utils fix: Split toolchain and datalayout out of CrateData 2024-02-16 14:48:25 +01:00
text-edit text-edit: Fix warnings about clippy str_to_string rule 2024-02-10 01:00:41 +09:00
toolchain internal: Enforce utf8 paths 2024-03-19 15:39:00 +01:00
tt internal: Remove span trait 2024-03-21 20:08:30 +01:00
vfs fix: Some file watching related vfs fixes 2024-03-21 21:22:19 +01:00
vfs-notify fix: Don't assert paths being utf8 when filtering them in the watcher 2024-03-22 08:04:50 +01:00