Releases: sourcefrog/cargo-mutants
v24.4.0
-
New: Generate mutations that delete the
!
and-
unary operators. -
Changed: Baselines and mutants are now built with
cargo test --no-run
rather thancargo build --tests
as previously. This avoids wasted build effort if thedev
andtest
Cargo profiles are not the same, and may better distinguish build failures from test failures. With--test-tool=nextest
, the correspondingcargo 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
Download cargo-mutants 24.3.0
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.2.1
-
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 previouslyINSTA_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 |
v24.2.0
- New: Colored output can be enabled in CI or other noninteractive situations by passing
--colors=always
, or settingCARGO_TERM_COLOR=always
, orCLICOLOR_FORCE=1
. Colors can similarly be forced off with--colors=never
,CARGO_TERM_COLOR=never
, orNO_COLOR=1
.
Install cargo-mutants 24.2.0
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/sourcefrog/cargo-mutants/releases/download/v24.2.0/cargo-mutants-installer.sh | sh
Install prebuilt binaries via powershell script
irm https://github.com/sourcefrog/cargo-mutants/releases/download/v24.2.0/cargo-mutants-installer.ps1 | iex
Download cargo-mutants 24.2.0
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.1.2
- New:
--in-place
option tests mutations in the original source tree, without copying the tree. This is faster and uses less disk space, but it's incompatible with--jobs
, and you must be careful not to edit or commit the source tree while tests are running.
Install cargo-mutants 24.1.2
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/sourcefrog/cargo-mutants/releases/download/v24.1.2/cargo-mutants-installer.sh | sh
Install prebuilt binaries via powershell script
irm https://github.com/sourcefrog/cargo-mutants/releases/download/v24.1.2/cargo-mutants-installer.ps1 | iex
Download cargo-mutants 24.1.2
File | Platform | Checksum |
---|---|---|
cargo-mutants-aarch64-apple-darwin.tar.xz | macOS Apple Silicon | checksum |
cargo-mutants-x86_64-apple-darwin.tar.xz | macOS Intel | checksum |
cargo-mutants-x86_64-pc-windows-msvc.zip | Windows x64 | checksum |
cargo-mutants-x86_64-unknown-linux-gnu.tar.xz | Linux x64 | checksum |
v24.1.1
cargo-mutants 24.1.1
-
New: Mutate
+, -, *, /, %, &, ^, |, <<, >>
binary ops, and their corresponding assignment ops like+=
. -
New:
--baseline=skip
option to skip running tests in an unmutated tree, when they're already been checked externally. -
Changed: Stop generating mutations of
||
and&&
to!=
and||
, because it seems to raise too many low-value false positives that may be hard to test. -
Fixed: Colors in command-line help and error messages.
Install cargo-mutants 24.1.1
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/sourcefrog/cargo-mutants/releases/download/v24.1.1/cargo-mutants-installer.sh | sh
Install prebuilt binaries via powershell script
irm https://github.com/sourcefrog/cargo-mutants/releases/download/v24.1.1/cargo-mutants-installer.ps1 | iex
Download cargo-mutants 24.1.1
File | Platform | Checksum |
---|---|---|
cargo-mutants-aarch64-apple-darwin.tar.xz | macOS Apple Silicon | checksum |
cargo-mutants-x86_64-apple-darwin.tar.xz | macOS Intel | checksum |
cargo-mutants-x86_64-pc-windows-msvc.zip | Windows x64 | checksum |
cargo-mutants-x86_64-unknown-linux-gnu.tar.xz | Linux x64 | checksum |
v24.1.0
-
New!
cargo mutants --test-tool nextest
, ortest_tool = "nextest"
in.cargo/mutants.toml
runs tests under Nextest. Some trees have tests that only work under Nextest, and this allows them to be tested. In other cases Nextest may be significantly faster, because it will exit soon after the first test failure. -
Fixed: Fixed spurious "Patch input contains repeated filenames" error when
--in-diff
is given a patch that deletes multiple files.
Download through cargo install
, cargo binstall
or https://github.com/sourcefrog/cargo-mutants/releases/tag/v24.1.0
Install cargo-mutants 24.1.0
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/sourcefrog/cargo-mutants/releases/download/v24.1.0/cargo-mutants-installer.sh | sh
Install prebuilt binaries via powershell script
irm https://github.com/sourcefrog/cargo-mutants/releases/download/v24.1.0/cargo-mutants-installer.ps1 | iex
Download cargo-mutants 24.1.0
File | Platform | Checksum |
---|---|---|
cargo-mutants-aarch64-apple-darwin.tar.xz | macOS Apple Silicon | checksum |
cargo-mutants-x86_64-apple-darwin.tar.xz | macOS Intel | checksum |
cargo-mutants-x86_64-pc-windows-msvc.zip | Windows x64 | checksum |
cargo-mutants-x86_64-unknown-linux-gnu.tar.xz | Linux x64 | checksum |
v23.12.2
Install cargo-mutants 23.12.2
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/sourcefrog/cargo-mutants/releases/download/v23.12.2/cargo-mutants-installer.sh | sh
Install prebuilt binaries via powershell script
irm https://github.com/sourcefrog/cargo-mutants/releases/download/v23.12.2/cargo-mutants-installer.ps1 | iex
Download cargo-mutants 23.12.2
File | Platform | Checksum |
---|---|---|
cargo-mutants-aarch64-apple-darwin.tar.xz | macOS Apple Silicon | checksum |
cargo-mutants-x86_64-apple-darwin.tar.xz | macOS Intel | checksum |
cargo-mutants-x86_64-pc-windows-msvc.zip | Windows x64 | checksum |
cargo-mutants-x86_64-unknown-linux-gnu.tar.xz | Linux x64 | checksum |
23.12.1 tropical mutants
-
Improved progress bars and console output, including putting the outcome of each mutant on the left, and the overall progress bar at the bottom. Improved display of estimated remaining time, and other times.
-
Fixed: Correctly traverse
mod
statements within package top source files that are not namedlib.rs
ormain.rs
, by following thepath
setting of each target within the manifest. -
Improved: Don't generate function mutants that have the same AST as the code they're replacing.
cargo-mutants 23.12.0
An exciting step forward: cargo-mutants can now generate mutations smaller than a whole function. To start with, several binary operators are mutated.
Also, --in-diff
will no longer error out if no mutants are generated in the diff, making it much more reasonable for a CI check.
-
New: Mutate
==
to!=
and vice versa. -
New: Mutate
&&
to||
and vice versa, and mutate both of them to==
and!=
. -
New: Mutate
<
,<=
,>
,>=
. -
Changed: If no mutants are generated then
cargo mutants
now exits successfully, showing a warning. (Previously it would exit with an error.) This works better with--in-diff
in CI, where it's normal that some changes may not have any mutants. -
Changed: Include column numbers in text listings of mutants and output to disambiguate smaller-than-function mutants, for example if there are several operators that can be changed on one line. This also applies to the names used for regex matching, so may break some regexps that match the entire line (sorry). The new option
--line-col=false
turns them both off in--list
output. -
Changed: In the mutants.json format, replaced the
function
,line
, andreturn_type
fields with afunction
submessage (including the name and return type) and aspan
indicating the entire replaced region, to better handle smaller-than-function mutants. Also, thefunction
includes the line-column span of the entire function.