prusti-dev icon indicating copy to clipboard operation
prusti-dev copied to clipboard

./x.py test does not rebuild properly

Open Aurel300 opened this issue 5 years ago • 3 comments

This is a minor issue, but if I do the following steps:

  1. Start with a working build of prusti, passes tests with ./x.py test --all.
  2. Make a change in the codebase, in my case in prusti-specs/src/specifications/preparser.rs
  3. 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?

Aurel300 avatar Oct 14 '20 13:10 Aurel300

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.

fpoli avatar Oct 14 '20 14:10 fpoli

Relevant cargo issue: https://github.com/rust-lang/cargo/issues/4316

fpoli avatar Jan 06 '21 14:01 fpoli

Pending on https://github.com/rust-lang/cargo/issues/9096

fpoli avatar Mar 15 '22 09:03 fpoli