rust/crates
bors 773b4a5ac7 Auto merge of #17019 - Wilfred:source_root_prefixes, r=Veykril
fix: VFS should not confuse paths with source roots that have the same prefix

Previously, the VFS would assign paths to the source root that had the longest string prefix match. This would break when we had source roots in subdirectories:

```
/foo
/foo/bar
```

Given a file `/foo/bar_baz.rs`, we would attribute it to the `/foo/bar` source root, which is wrong.

As a result, we would attribute paths to the wrong crate when a crate was in a subdirectory of another one. This is more common in larger monorepos, but could occur in any Rust project.

Fix this in the VFS, and add a test.
2024-04-13 20:30:08 +00:00
..
base-db Arc CrateData::cfg_options 2024-04-06 13:55:10 +02:00
cfg
flycheck Run cargo test per workspace in the test explorer 2024-04-13 06:22:58 +03:30
hir Cleanup util::Generics method names 2024-04-06 14:29:40 +02:00
hir-def Cleanup util::Generics method names 2024-04-06 14:29:40 +02:00
hir-expand Fix some cfg censoring bugs 2024-04-03 16:43:08 +02:00
hir-ty Bump chalk 2024-04-08 11:03:19 +02:00
ide Arc CrateData::cfg_options 2024-04-06 13:55:10 +02:00
ide-assists Auto merge of #17030 - Veykril:bump-chalk, r=Veykril 2024-04-13 18:54:17 +00:00
ide-completion Auto merge of #17054 - roife:fix-issue-17036, r=Veykril 2024-04-13 19:34:45 +00:00
ide-db
ide-diagnostics Make use of ThinArc in RawAttrs 2024-03-21 11:49:09 +01:00
ide-ssr
intern Fix new clippy lints 2024-04-01 17:55:56 +02:00
limit Simplify 2024-04-06 13:12:07 +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 Consider ADT generic parameter defaults for unsubstituted layout calculations 2024-04-03 09:01:27 +02:00
proc-macro-srv Rename ProcMacroKind::FuncLike to Bang 2024-03-22 11:20:56 +01:00
proc-macro-srv-cli
profile
project-model Arc CrateData::cfg_options 2024-04-06 13:55:10 +02:00
rust-analyzer Run cargo test per workspace in the test explorer 2024-04-13 06:22:58 +03:30
salsa Fix new clippy lints 2024-04-01 17:55:56 +02:00
sourcegen Fix new clippy lints 2024-04-01 17:55:56 +02:00
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 Arc CrateData::cfg_options 2024-04-06 13:55:10 +02:00
test-utils Fix new clippy lints 2024-04-01 17:55:56 +02:00
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 [vfs] Don't confuse paths with source roots that have the same prefix 2024-04-08 15:48:04 -07:00
vfs-notify fix: Don't assert paths being utf8 when filtering them in the watcher 2024-03-22 08:04:50 +01:00