I'm ve started hacking on a bigger multicrate Rust project (GitHub - prisma/prisma-engines: 🚂 Engine components of Prisma 2+). The whole project compiles about 6 minutes for me, from scratch. That's expected and I don't complain.
I added a new file with a top-level, public, unused enum to one of the subcrates without making any other changes.
If I recompile that crate alone in its subdirectory, it takes 0.4 second. As expected.
If I recompile the whole project by cargo build in its root directory, it takes whopping 30 seconds and shows recompiling some dependant crates. But why, if I added stuff that's unused? Is it expected behavior or is it a limitation of current incremental algorithms? Is maybe something broken?
The same happens if I change the number of variants in that unused enum.
I'm using recent 1.60 beta, so incremental compilation should be fixed, is it correct?