Suppose I have a hierarchy of modules:
M1 imports M2 imports M3
Now I want to refactor M3. I run
cargo watch, and change types of some
M3. What I get is a get millions of error messages for errors in
M2 and maybe even
M1 (depending on whether
M3 stuff was re-exported etc.).
If I had a REPL what I’d do is: I’d just load
M3, refactor it until no
errors are generated, then load
I’m wondering if something like this is possible with rust and cargo today.
What I’m currently doing is I comment out code is
M2 until those
don’t generate any errors. Then I refactor
M3, gradually enable code in
etc. this is too much work compared to the REPL approach of refactoring.
Any ideas/ thoughts?