5 ms·
Make sure you're not using `cargo build` to check your project. `cargo check` (the thing that makes your squiggles red) has never once taken me a minute to comp
by jkelleyrtp 5y ago
Make sure you're not using `cargo build` to check your project. `cargo check` (the thing that makes your squiggles red) has never once taken me a minute to complete. RLS (the default LSP for rust uses `cargo build` - definitely switch to Rust-Analyzer (the soon-to-be default). I just ran `cargo check` on my workspace (10 crates, about 5k LoC) and it took 3 seconds.
- rattray 5y agoMy mistake! Replacing RLS with Rust-Analyzer, it now takes 20-30s to incrementally check a trivial change to some core model code (compared to ~90s with RLS), though now rust-analyzer gives me an unrelated error which I assume may be the result of using a different rustup/cargo binary or something – so I'm back to RLS. Oh well. It looks like RLS and Rust-Analyzer are working on unifying their code, so I'm sure this will get better in the not-too-distant future.
- jkelleyrtp 5y agoHmmmm RA has been good with me, unless I’m doing something with Arrayfire or PyTorch which are both sensitive to $PATH. RA is seriously the real deal, so I suggest wrenching around until it works. I had to modify my $PATH in VSCode to fix the issue - do you know what library you’re using that causes the issue?
- rattray 5y agoAh, thanks for the nudge. Looks like I had run into https://github.com/rust-analyzer/rust-analyzer/issues/6835 https://github.com/rust-analyzer/rust-analyzer/issues/6835, had to bump the patch version of a library to fix.