Hacker News new | ask | show | jobs
by amenhotep 849 days ago
> changes in the Rust backend can take minutes to compile, and rust-analyzer is damn slow.

Do you find that if you run cargo build, then trigger RA - without even making any changes - then run cargo build again, it recompiles a bunch of dependencies?

If so, you might find that pinning anyhow to =1.0.77 fixes this! There's a bug somewhere in the interaction between RA, cargo and some crates including afaict mostly dtolnay's which leads to RA runs causing the crate build script to think that RUSTC_BOOTSTRAP is set and they should invalidate the fingerprint and recompile.

Perhaps totally unrelated :) but I ask because I just spent days chasing this down only to find, once in the possession of the important keywords, that some helpful fellow had already filed a PR with rust-analyzer that purports to fix it and so my efforts were probably pointless. But if I can save some random guy a few minutes of compile time before the fix is released then it's worth it, right?

1 comments

(also thiserror =1.0.52!)