Re:Leaving Neovim for Zed
by beginnings on Sunday August 18, 2024 @08:26PM
(#41286709)
Rust Rover is terrible, they made it free and I still dont use it, Zed is great for Rust.
> Turns out some of my types were 80k characters long,
I know Rust uses name/symbol mangling but what sort of type declaration in Rust ends up with that long names ?
A parser with Chumsky. There’s a lexer with logos too, but that’s simple and fast. Chumsy makes you create parsing functions which are chains of other parsing functions, and the types can become insanely long, if you don’t box some of them for erasure.
edit: to elaborate, it’s not that the type name was 80k characters, the type definition itself was, like TypeA<TypeB<TypeC, TypeD>>, TypeB<TypeE, TypeF<TypeG…>>>
I was seriously doubting the internal Rust engine (they don’t use rust-analyzer or LSP), so I switched to VSCode with the rust-analyzer extension, and the same happened there too, although no freezing. Turns out some of my types were 80k characters long, and ‘cargo clippy’ was taking ~900 seconds of one core pegged at 100% for rustc. Oops.
Now I know what they mean when complaining about super long compile times on Rust, and I wasn’t even doing async :)