Releases: sourcefrog/cargo-mutants
cargo-mutants 23.6.0
An exciting release that adds a lot more power to generate viable mutations of functions returning more complex types.
-
Generate
Box::leak(Box::new(...))as a mutation of functions returning&mut. -
Add a concept of mutant "genre", which is included in the json listing of mutants. The only genre today is
FnValue, in which a function body is replaced by a value. This will in future allow filtering by genre. -
Recurse into return types, so that for example
Result<bool>can generateOk(true)andOk(false), andSome<T>generatesNoneand every generated value ofT. Similarly forBox<T>, andVec<T>. -
Generate specific values for integers:
[0, 1]for unsigned integers,[0, 1, -1]for signed integers;[1]for NonZero unsigned integers and[1, -1]for NonZero signed integers. -
Generate specific values for floats:
[0.0, 1.0, -1.0]. -
Generate (fixed-length) array values, like
[0; 256], [1; 256]using every recursively generated value for the element type.
cargo-mutants 23.5.0
"Pickled crab"
-
cargo mutantscan now successfully test packages that transitively depend on a different version of themselves, such asitertools. Previously, cargo-mutants used the cargo--packageoption, which is ambiguous in this case, and now it uses--manifest-pathinstead. #117 -
Mutate functions returning
&'_ str(whether a lifetime is named or not) to return"xyzzy"and"". -
Switch to CalVer numbering.
cargo-mutants 1.2.3
-
New
--erroroption, to cause functions returningResultto be mutated to return the specified error. -
New
--no-configoption, to disable reading.cargo/mutants.toml. -
Mutate functions returning
StringtoString::new()rather than"".into(): same result but a bit more idiomatic. -
New
--leak-dirsoption, for debugging cargo-mutants. -
Update to syn 2.0, adding support for new Rust syntax.
-
Minimum supported Rust version increased to 1.65 due to changes in dependencies.
cargo-mutants-1.2.2
-
Don't mutate
unsafefns. -
Don't mutate functions that never return (i.e.
-> !). -
Minimum supported Rust version increased to 1.64 due to changes in dependencies.
-
Some command-line options can now also be configured through environment variables:
CARGO_MUTANTS_JOBS,CARGO_MUTANTS_TRACE_LEVEL. -
New command line option
--minimum-test-timeoutand config file variableminimum_test_timeoutjoin existing environment variableCARGO_MUTANTS_MINIMUM_TEST_TIMEOUT, to allow boosting the minimum, especially for test environments with poor or uneven throughput. -
Changed: Renamed fields in
outcomes.jsonfromcargo_resulttoprocess_statusand fromcommandtoargv. -
Warn if no mutants were generated or if all mutants were unviable.
cargo-mutants-1.2.1
-
Converted most of the docs to a book available at https://mutants.rs/.
-
Fixed: Correctly find submodules that don't use
mod.rsnaming, e.g. when descending fromsrc/foo.rstosrc/foo/bar.rs. Also handle module names that are raw identifiers usingr#. (Thanks to @kpreid for the report.)
cargo-mutants 1.2.0
Thankful mutants!
-
Fixed: Files that are excluded by filters are also excluded from
--list-files. -
Fixed:
--exclude-reand--recan match against the return type as shown in--list. -
New: A
.cargo/mutants.tomlfile can be used to configure standard filters and cargo args for a project.
cargo-mutants 1.1.1
Spooky mutants!
-
Fixed support for the Mold linker, or for other options passed via
RUSTFLAGSorCARGO_ENCODED_RUSTFLAGS. (See the instructions in README.md). -
Source trees are walked by following
modstatements rather than globbing the directory. This is more correct if there are files that are not referenced bymodstatements. Once attributes on modules are stable in Rust (rust-lang/rust#54727) this opens a path to skip mods using attributes.
cargo-mutants-1.1.0
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
-
cargo-mutants is now finds no uncaught mutants in itself! Various tests were added and improved, particularly around handling timeouts.
-
New:
--reand--exclude-reoptions to filter by mutant name, including the path. The regexps match against the strings printed by--list.
cargo-mutants-1.0.2
-
New:
cargo mutants --completionsto generate shell completions usingclap_complete. -
Changed:
carg-mutantsno longer builds in the source directory, and no longer copies thetarget/directory to the scratch directory. Sincecargo-mutantsnow setsRUSTFLAGSto avoid false failures from warnings, it is unlikely to match the existing build products in the source directorytarget/, and in fact building there is just likely to cause rebuilds in the source. The behavior now is as if--no-copy-targetwas always passed. That option is still accepted, but it has no effect. -
Changed:
cargo-mutantsfinds all possible mutations before doing the baseline test, so that you can see earlier how many there will be. -
New: Set
INSTA_UPDATE=noso that tests that use the Insta library don't write updates back into the source directory, and so don't falsely pass.