Skip to content

Releases: sourcefrog/cargo-mutants

cargo-mutants 24.11.2

24 Nov 18:14
005fde4
Compare
Choose a tag to compare
  • Changed: .gitignore (and other git ignore files) are only consulted when copying the tree if it is contained within a directory with a .git directory.

  • Fixed: .gitignore files above the git root directory are no longer read. In particular this fixes the problem where .gitignore * in the home directory would prevent copying any source trees.

v24.11.1

23 Nov 02:02
v24.11.1
e3ddd9e
Compare
Choose a tag to compare
  • Changed: The arguments of calls to functions or methods named with_capacity are not mutated by default. This can be turned off with --skip-calls-defaults=false on the command line or skip_calls_defaults = false in .cargo/mutants.toml.

  • New: --skip-calls=NAME,NAME on the command line or skip_calls = [NAMES..] in .cargo/mutants.toml allows configuring other functions whose calls should never be mutated.

Download cargo-mutants 24.11.1

File Platform Checksum
cargo-mutants-aarch64-apple-darwin.tar.xz Apple Silicon macOS checksum
cargo-mutants-x86_64-apple-darwin.tar.xz Intel macOS checksum
cargo-mutants-x86_64-pc-windows-msvc.zip x64 Windows checksum
cargo-mutants-x86_64-unknown-linux-gnu.tar.xz x64 Linux checksum

v24.11.0

11 Nov 16:48
v24.11.0
a992111
Compare
Choose a tag to compare

24.11.0

  • New: --test-workspace and --test-package arguments and config options support projects whose tests live in a different package.

  • New: Mutate proc_macro targets and functions.

  • New: Write diffs to dedicated files under mutants.out/diff/. The filename is included in the mutant json output.

  • New: The package tarball on crates.io now includes all the test data, so that the tests can be run on the unpacked tarball. This may be helpful for people packaging cargo-mutants for distributions, and keeps an accurate record of the whole tree separate from the git history.

v24.9.0

30 Sep 14:15
v24.9.0
2ee007e
Compare
Choose a tag to compare

24.9.0

  • Fixed: Avoid generating empty string elements in ENCODED_RUSTFLAGS when --cap-lints is set. In some situations these could cause a compiler error complaining about the empty argument.

  • New: --profile option allows selecting a Cargo profile. In particular, it's recommended that you can use --profile=mutants and configure a custom profile in your Cargo.toml to optimize the build for mutants, by turning off debug symbols.

  • New: --iterate option skips mutants that were previously caught or unviable.

  • New: cargo-mutants starts a GNU jobserver, shared across all children, so that running multiple --jobs does not spawn an excessive number of compiler processes. The jobserver is on by default and can be turned off with --jobserver false.

  • Fixed: Don't error on diffs containing a "Binary files differ" message.

v24.7.1

25 Jul 14:39
v24.7.1
2de1a92
Compare
Choose a tag to compare
  • Changed: No build timeouts by default. Previously, cargo-mutants set a default build timeout based on the baseline build, but experience showed that this would sometimes make builds flaky, because build times can be quite variable. If mutants cause builds to hang, then you can still set a timeout using --build-timeout or --build-timeout-multiplier.

  • Fixed: Don't error if the --in-diff file is empty.

  • Changed: cargo-mutants no longer passes --cap-lints=allow to rustc. This was previously done so that mutants would not unnecessarily be unviable due to triggering compiler warnings in trees configured to deny some lints, but it had the undesirable effect of disabling rustc's detection of long running const evaluations. If your tree treats some lints as errors then the previous behavior can be restored with --cap-lints=true (or the equivalent config option), or you can use cfg_attr and a feature flag to accept those warnings when testing under cargo-mutants.

Download cargo-mutants 24.7.1

File Platform Checksum
cargo-mutants-aarch64-apple-darwin.tar.xz Apple Silicon macOS checksum
cargo-mutants-x86_64-apple-darwin.tar.xz Intel macOS checksum
cargo-mutants-x86_64-pc-windows-msvc.zip x64 Windows checksum
cargo-mutants-x86_64-unknown-linux-gnu.tar.xz x64 Linux checksum

v24.7.0

05 Jul 14:10
v24.7.0
824cd8e
Compare
Choose a tag to compare

v24.5.0

14 May 19:47
v24.5.0
7a25bb6
Compare
Choose a tag to compare
  • Fixed: Follow path attributes on mod statements.

  • New: --build-timeout and --build-timeout-multiplier options for setting timeouts for the build and check cargo phases.

  • Changed: --timeout-multiplier now overrides timeout_multiplier from .cargo/mutants.toml.

  • Changed: --timeout and --timeout-multiplier are now conflicting options.

v24.4.0

22 Apr 01:46
v24.4.0
5ca256a
Compare
Choose a tag to compare
  • New: Generate mutations that delete the ! and - unary operators.

  • Changed: Baselines and mutants are now built with cargo test --no-run rather than cargo build --tests as previously. This avoids wasted build effort if the dev and test Cargo profiles are not the same, and may better distinguish build failures from test failures. With --test-tool=nextest, the corresponding cargo nextest run --no-run is used.

  • Fixed: .ignore files can no longer affect source tree copying, so test files listed in a .ignore (e.g. *.snap for Insta snapshots) are now correctly copied into temporary build directories.

  • Fixed: Don't visit files marked with #![cfg(test)] (or other inner attributes that generally cause code to be skipped.)

  • Fixed: Paths to module files nested within mod blocks are now correctly resolved.

  • Added: Document stability policy in the manual.

v24.3.0

24 Mar 17:16
v24.3.0
f32fd98
Compare
Choose a tag to compare

v24.2.1

25 Feb 20:42
v24.2.1
c9959fd
Compare
Choose a tag to compare
  • New: --features, --no-default-features and --all-features options are passed through to Cargo.

  • Changed: Minimum Rust version (to build cargo-mutants, not to use it) increased to 1.73.

  • New: Warn if nextest returns an exit code indicating some failure other than test failure, such as an internal error in nextest.

  • New: json output includes the exit code of subprocesses, and the signal if it was killed by a signal.

  • Changed: Set INSTA_FORCE_PASS=0 (in addition to previously INSTA_UPDATE=no) when running tests, so that tests that use the Insta library don't write updates back into the source directory, and so don't falsely pass.

  • New: --timeout-multiplier option allows setting the timeout for mutants to be a multiple of the baseline timeout, rather than a fixed time.

Install cargo-mutants 24.2.1

Install prebuilt binaries via shell script

curl --proto '=https' --tlsv1.2 -LsSf https://github.com/sourcefrog/cargo-mutants/releases/download/v24.2.1/cargo-mutants-installer.sh | sh

Install prebuilt binaries via powershell script

irm https://github.com/sourcefrog/cargo-mutants/releases/download/v24.2.1/cargo-mutants-installer.ps1 | iex

Download cargo-mutants 24.2.1

File Platform Checksum
cargo-mutants-aarch64-apple-darwin.tar.xz Apple Silicon macOS checksum
cargo-mutants-x86_64-apple-darwin.tar.xz Intel macOS checksum
cargo-mutants-x86_64-pc-windows-msvc.zip x64 Windows checksum
cargo-mutants-x86_64-unknown-linux-gnu.tar.xz x64 Linux checksum