Skip to content

Releases: sourcefrog/cargo-mutants

cargo-mutants-1.1.0

31 Oct 13:56
cargo-mutants-1.1.0
Compare
Choose a tag to compare

Fearless concurrency!

  • cargo-mutants can now run multiple cargo build and test tasks in parallel, to make better use of machine resources and find mutants faster, controlled by --jobs.

  • The minimum Rust version to build cargo-mutants is now 1.63.0. It can still be used to test code under older toolchains.

cargo-mutants-1.0.3

29 Sep 21:22
cargo-mutants-1.0.3
Compare
Choose a tag to compare
  • cargo-mutants is now finds no uncaught mutants in itself! Various tests were added and improved, particularly around handling timeouts.

  • New: --re and --exclude-re options to filter by mutant name, including the path. The regexps match against the strings printed by --list.

cargo-mutants-1.0.2

24 Sep 15:40
cargo-mutants-1.0.2
Compare
Choose a tag to compare
  • New: cargo mutants --completions to generate shell completions using clap_complete.

  • Changed: carg-mutants no longer builds in the source directory, and no longer copies the target/ directory to the scratch directory. Since cargo-mutants now sets RUSTFLAGS to avoid false failures from warnings, it is unlikely to match the existing build products in the source directory target/, and in fact building there is just likely to cause rebuilds in the source. The behavior now is as if --no-copy-target was always passed. That option is still accepted, but it has no effect.

  • Changed: cargo-mutants finds all possible mutations before doing the baseline test, so that you can see earlier how many there will be.

  • New: Set INSTA_UPDATE=no so that tests that use the Insta library don't write updates back into the source directory, and so don't falsely pass.

cargo-mutants 1.0.1

12 Sep 14:38
cargo-mutants-1.0.1
Compare
Choose a tag to compare
  • Fixed: Don't try to mutate functions within test targets, e.g. within tests/**/*.rs.

  • New: missed.txt, caught.txt, timeout.txt and unviable.txt files are written in to the output directory to make results easier to review later.

  • New: --output creates the specified directory if it does not exist.

  • Internal: Switched from Argh to Clap for command-line parsing. There may be some small changes in CLI behavior and help formatting.

cargo-mutants 1.0.0

21 Aug 18:03
cargo-mutants-1.0.0
Compare
Choose a tag to compare

A 1.0 release to celebrate that with the addition of workspace handling, cargo-mutants gives useful results on many Rust projects.

  • New: Supports workspaces containing multiple packages. Mutants are generated for all relevant targets in all packages, and mutants are subject to the tests of their own package. cargo mutants --list-files --json and cargo mutants --list --json now includes package names for each file or mutant.

  • Improved: Generate mutations in cdylib, rlib, and ever other *lib target. For example, this correctly exercises Wasm projects.

  • Improved: Write mutants.out/outcomes.json after the source-tree build and baseline tests so that it can be observed earlier on.

  • Improved: mutants.out/outcomes.json includes the commands run.

cargo-mutants 0.2.11

21 Aug 00:00
cargo-mutants-0.2.11
Compare
Choose a tag to compare
  • New --exclude command line option to exclude source files from mutants generation, matching a glob.

  • New: CARGO_MUTANTS_MINIMUM_TEST_TIMEOUT sets a minimum timeout for cargo tests, in seconds. This can be used to allow more time on slow CI builders. If unset the default is still 20s.

  • Added: A new mutants.out/debug.log with internal debugging information.

  • Improved: The time for check, build, and test is now shown separately in progress bars and output, to give a better indication of which is taking more time in the tree under test. Also, times are show in seconds with one decimal place, and they are styled more consistently.

  • Improved: More consistent use of 'unviable' and other terms for outcomes in the UI.

cargo-mutants 0.2.10

08 Aug 04:33
cargo-mutants-0.2.10
Compare
Choose a tag to compare

cargo-mutants 0.2.10 comes with improved docs, and the new -C option can be used to pass options like --release or --all-features to cargo.

  • Added: --cargo-arg (or -C for short) allows passing arguments to cargo commands (check, build, and test), for example to set --release or --features.

  • Improved: Works properly if run from a subdirectory of a crate, or if -d points to a
    subdirectory of a crate.

  • Improved: Various docs.

  • Improved: Relative dependencies within the source tree are left as relative paths, and will be built within the scratch directory. Relative dependencies outside the source tree are still rewritten as absolute paths.

cargo-mutants 0.2.9

30 Jul 16:24
cargo-mutants-0.2.9
Compare
Choose a tag to compare
  • Faster: cargo mutants no longer runs cargo check before building, in cases where the build products are wanted or tests will be run. This saves a significant amount of work in build phases; in some trees cargo mutants is now 30% faster. (In trees where most of the time is spent running tests the effect will be less.)

  • Fixed: Open log files in append mode to fix messages from other processes occasionally being partly overwritten.

  • Improved: cargo mutants should now give useful results in packages that use #![deny(unused)] or other mechanisms to reject warnings. Mutated functions often ignore some parameters, which would previously be rejected by this configuration without proving anything interesting about test coverage. Now, --cap-lints=allow is passed in RUSTFLAGS while building mutants, so that they're not falsely rejected and the tests can be exercised.

  • Improved: The build dir name includes the root package name.

  • Improved: The progress bar shows more information.

  • Improved: The final message shows how many mutants were tested and how long it took.

cargo-mutants 0.2.8

18 Jul 21:33
cargo-mutants-0.2.8
Compare
Choose a tag to compare
  • New: Summarize the overall number of mutants generated, caught, missed, etc, at the end.

  • Fixed: Works properly with crates that have relative path dependencies in Cargo.toml or .cargo/config.toml, by rewriting them to absolute paths in the scratch directory.

cargo-mutants-0.2.7

12 Jul 04:00
Compare
Choose a tag to compare
  • New: You can skip functions by adding #[cfg_attr(test, mutants::skip), in which case the mutants crate can be only a dev-dependency.

  • Improved: Don't generate pointless mutations of functions with an empty body (ignoring comments.)

  • Improved: Remove extra whitespace from the display of function names and return types: the new formatting is closer to the spacing used in idiomatic Rust.

  • Improved: Show the last line of compiler/test output while running builds, so that it's more clear where time is being spent.

  • Docs: Instructions on how to check for missed mutants from CI.