11281: ide: parallel prime caches r=jonas-schievink a=jhgg
cache priming goes brrrr... the successor to #10149
---
this PR implements a parallel cache priming strategy that uses a topological work queue to feed a pool of worker threads the crates to index in parallel.
## todo
- [x] should we keep the old prime caches?
- [x] we should use num_cpus to detect how many cpus to use to prime caches. should we also expose a config for # of worker CPU threads to use?
- [x] something is wonky with cancellation, need to figure it out before this can merge.
Co-authored-by: Jake Heinz <jh@discordapp.com>
11334: fix: don't panic in semantics due to `cfg_attr` disrupting offsets r=Veykril a=Veykril
Reduces the panic in https://github.com/rust-analyzer/rust-analyzer/issues/11298 to an early return, that means we won't resolve these cases again for now, but this is better than constantly panicking in highlighting and hovering.
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
11327: internal: Remove redundant `Option` from eager macro fns r=jonas-schievink a=jonas-schievink
This isn't needed since `tt::Subtree` already implements `Default`, and an empty expansion is the appropriate default here.
bors r+
Co-authored-by: Jonas Schievink <jonas.schievink@ferrous-systems.com>
11314: fix: Don't load auxiliary crates outside the workspace r=jonas-schievink a=jonas-schievink
I'm a bit unsure about this change since this might have unanticipated consequences, but this does fix https://github.com/rust-analyzer/rust-analyzer/issues/11300.
Co-authored-by: Jonas Schievink <jonas.schievink@ferrous-systems.com>
11311: fix: insert auto-imports after header comments r=repnop a=repnop
Fixes#8607.
This commit changes the auto-import functionality and causes it to add imports after any leading comments, which are commonly license headers. This does not affect comments on items as they're considered part of the item itself and not separate.
Co-authored-by: Wesley Norris <repnop@outlook.com>
Fixes#8607.
This commit changes the auto-import functionality and causes it to add
imports after any leading comments, which are commonly license headers.
This does not affect comments on items as they're considered part of the
item itself and not separate.
11308: fix: status: output all crates a file belongs to r=jonas-schievink a=jonas-schievink
While investigating https://github.com/rust-analyzer/rust-analyzer/issues/11300 I noticed that we only output the first crate, which masks the reason for that issue – the file in question is the root of multiple crates, and one is missing dependencies.
This PR makes "Rust Analyzer: Status" include *every* crate a file is part of.
bors r+
Co-authored-by: Jonas Schievink <jonas.schievink@ferrous-systems.com>
11307: fix: Allow macros to expand to or-patterns r=jonas-schievink a=jonas-schievink
Fixes https://github.com/rust-analyzer/rust-analyzer/issues/11097
Also simplifies the diagnostic slightly.
bors r+
Co-authored-by: Jonas Schievink <jonas.schievink@ferrous-systems.com>
11286: internal: Clean up assoc item collection a bit r=jonas-schievink a=jonas-schievink
Introduce an `AssocItemCollector` instead of passing a lot of parameters around.
bors r+
Co-authored-by: Jonas Schievink <jonas.schievink@ferrous-systems.com>
11284: internal: Remove redundant recursion limit r=jonas-schievink a=jonas-schievink
`Expander` already does this, so we don't have to track the depth when collecting associated items.
bors r+
Co-authored-by: Jonas Schievink <jonas.schievink@ferrous-systems.com>