Skip to content

Optimizing Speed in Shards for Cargo Mutants through Caching #209

Answered by sourcefrog
ASuciuX asked this question in Q&A
Discussion options

You must be logged in to vote

Proposed Change: Run cargo build and cargo test only once and use the resulting artifacts across all shards.

The difficulty here is that the mutated code is by definition different for each mutant, just as if you were editing it yourself.

Changing the code requires a new build to reflect the changes. (It is a new incremental build, so some information is cached.)

Similarly, when we change the code, we expect different results, that's the whole point, so we have to run the tests again.

If you want to look at it as a cache, then:

  • A cache of build products (as in Bazel) has a key that includes the source hash, and therefore will be invalidated when the source is mutated
  • A cache of test re…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ASuciuX
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants