rust/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
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
ide-completion Auto merge of #16805 - dfireBird:lifetime_lowering, r=Veykril 2024-03-26 07:58:43 +00:00
ide-db
ide-diagnostics Make use of ThinArc in RawAttrs 2024-03-21 11:49:09 +01:00
ide-ssr
intern
limit
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
profile
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
sourcegen
span Move Edition into span crate 2024-03-21 10:21:44 +01:00
stdx
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
text-edit
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