34
you are viewing a single comment's thread
view the rest of the comments
[-] livingcoder@programming.dev 2 points 2 years ago

Every so often rust-analyzer in VS Code doesn't use the latest code after a cargo update and the only way I've found to fix it is a cargo clean. This means that I have to wait 5 minutes for the next build, painful. Just because of one project update. I would LOVE a faster build.

Extra info: the updates come from my dependencies that utilize my private repositories via a git = "[path]". The rust-analyzer is pulling from a cache or older version for some reason and I don't know where it is or why.

[-] Vorpal@programming.dev 5 points 2 years ago

Two tips that work for me:

  • After cargo add I have to sometimes run the "restart rust-analyzer" command from the vscode command pallette (exact wording may be off, I'm on my phone as of writing this comment). Much faster than cargo build.
  • Consider using sccache to speed up rebuilds. It helps a lot, though uses a bit of disk space. But disk space is cheap nowadays (as long as you aren't stuck with a laptop with soldered SSD, in which case you know what not to buy next time).
[-] livingcoder@programming.dev 1 points 2 years ago

Thanks for the suggestions. I appreciate it.

[-] Miaou@jlai.lu 1 points 2 years ago

Having 30min+ incremental compile times here (C++), I envy your situation ahah

this post was submitted on 26 Jan 2024
34 points (94.7% liked)

Rust

8252 readers
30 users here now

Welcome to the Rust community! This is a place to discuss about the Rust programming language.

Wormhole

!performance@programming.dev

Credits

  • The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)

founded 3 years ago
MODERATORS