Closed SamChou19815 closed 1 week ago
Sounds reasonable to me.
Do incremental builds actually work?
$ cargo llvm-cov show-env
...
CARGO_INCREMENTAL="0"
...
Im curious why it has to be disabled?
@TroyKomodo --no-clean is unrelated to the incremental compilation of rustc itself, but improves the performance of successive builds, since the cleanup to prevent false positives in several situations that occur before the build and the rebuilds triggered by the cleanup are no longer performed.
CARGO_INCREMENTAL=0 was needed at some point in the past, but may no longer be needed with the cleanup in 0.1.5.
Could this be added as a builtin flag so I don't have to write a custom script to do this?
I'm considering implementing this. What should an invocation look like?
What should an invocation look like?
I have no strong opinion about this, but I thought something like --no-clean=\
I have no strong opinion about this, but I thought something like --no-clean=
An argument I would make against that is the following. To me, --no-clean=<option>
suggests <option>
specifies what should not be cleaned. If a user wants to keep everything except profraw files, <option>
could be a long list. Also, it could hinder forward compatibility if new file types are stored in the llvm-cov-target
directory.
An alternative I would propose is to add an option to cargo llvm-cov clean
, perhaps --profraw-only
.
Needless to say, I'll go with whatever you prefer, @taiki-e. :)
I agree with adding an option to clean
subcommand is more reasonable.
I really like the
--no-clean
flag since it makes incremental re-run of tests much faster. However, it eventually gets slower and slower since there are tons of profraw files generated.In practice, I found that running
rm -f target/llvm-cov-target/*.profraw
before allvm-cov
run with--no-clean
flag has the best of both world: thetarget/llvm-cov-target
won't blow up in size, and we still get all the incremental runs' benefit.Could this be added as a builtin flag so I don't have to write a custom script to do this?