./x.py test does not rebuild properly
This is a minor issue, but if I do the following steps:
- Start with a working build of prusti, passes tests with
./x.py test --all. - Make a change in the codebase, in my case in
prusti-specs/src/specifications/preparser.rs - Run the tests again with
./x.py test --all.
The last step seems to build some things (including prusti-specs), but after the build is complete and the tests run, they fail with can't find crate for prusti_contracts_internal which prusti_contracts depends on. If I do a proper rebuild ./x.py build --all, and then test again, it's fine.
Maybe there is something wrong with the crate dependencies?
What happens is that prusti-test uses the binaries of prusti-launch and prusti, but there is no cargo dependency between them because there is no code dependency. (In the old Makefile there was a cargo build before each cargo test to fix this).
I wonder what happens if we declare a dependency without actually using it. Maybe it's enough to make cargo recompile the dependencies (prusti, prusti-launch...) when ./x.py test --all is executed.
Relevant cargo issue: https://github.com/rust-lang/cargo/issues/4316
Pending on https://github.com/rust-lang/cargo/issues/9096