Merge rust-bitcoin/rust-bitcoin#4228: docs: Update README to replace use of mutagen with cargo-mutants

199f57849a Remove references to cfg(mutate) from lint allow - no longer allowed (AM)
a65d1d8b95 docs: Update README to replace use of mutagen with cargo-mutants (AM)

Pull request description:

  Hey there!

  I am just getting up to speed with the project and in following the README discovered that there are still references to the previous mutation testing tool `mutagen`. I updated the README to refer to the new tool, `cargo-mutation`.

  I'm suggesting the user use the same command, `cargo mutants --in-place --no-shuffle`, as is run in the weekly CI workflow.

  I noticed that there are still references to the old `mutate` attribute in the following files. I removed these as well as per [feedback](https://github.com/rust-bitcoin/rust-bitcoin/pull/4228#issuecomment-2709407253).

  `primitives/Cargo.toml`:
  ```
  [lints.rust]
  unexpected_cfgs = { level = "deny", check-cfg = ['cfg(mutate)'] }
  ```

  and

  `bitcoin/Cargo.toml`:
  ```
  unexpected_cfgs = { level = "deny", check-cfg = ['cfg(bench)', 'cfg(fuzzing)', 'cfg(kani)', 'cfg(mutate)'] }
  ```

  Update to PR: removed incorrect understanding of logic in PR description as per [feedback](https://github.com/rust-bitcoin/rust-bitcoin/pull/4228#issuecomment-2709408598) and removed `cfg(mutate)` from above 2 files.

ACKs for top commit:
  tcharding:
    ACK 199f57849a
  apoelstra:
    ACK 199f57849acd9845902a8090ad6490a61ee03d24; successfully ran local tests

Tree-SHA512: e154c504aa5283f1da05d0120ea8dda97d1159389e692b0d57d7d864032ecb2b48c496054ede5500477367bc732dc34b0870f2709b8bd6e7b3f5c18a10f7a29e
This commit is contained in:
merge-script 2025-03-11 14:00:59 +00:00
commit c23402c330
No known key found for this signature in database
GPG Key ID: C588D63CE41B97C1
3 changed files with 6 additions and 9 deletions

View File

@ -148,8 +148,8 @@ alias build-docs='RUSTDOCFLAGS="--cfg docsrs" cargo +nightly rustdoc --features=
Unit and integration tests are available for those interested, along with benchmarks. For project Unit and integration tests are available for those interested, along with benchmarks. For project
developers, especially new contributors looking for something to work on, we do: developers, especially new contributors looking for something to work on, we do:
- Fuzz testing with [`Hongfuzz`](https://github.com/rust-fuzz/honggfuzz-rs) - Fuzz testing with [`Honggfuzz`](https://github.com/rust-fuzz/honggfuzz-rs)
- Mutation testing with [`Mutagen`](https://github.com/llogiq/mutagen) - Mutation testing with [`cargo-mutants`](https://github.com/sourcefrog/cargo-mutants)
- Code verification with [`Kani`](https://github.com/model-checking/kani) - Code verification with [`Kani`](https://github.com/model-checking/kani)
There are always more tests to write and more bugs to find, contributions to our testing efforts There are always more tests to write and more bugs to find, contributions to our testing efforts
@ -167,9 +167,9 @@ bench marks use: `RUSTFLAGS='--cfg=bench' cargo +nightly bench`.
### Mutation tests ### Mutation tests
We have started doing mutation testing with [mutagen](https://github.com/llogiq/mutagen). To run We are doing mutation testing with [cargo-mutants](https://github.com/sourcefrog/cargo-mutants). To run
these tests first install the latest dev version with `cargo +nightly install --git https://github.com/llogiq/mutagen` these tests first install with `cargo install --locked cargo-mutants` then run with `cargo mutants --in-place --no-shuffle`.
then run with `RUSTFLAGS='--cfg=mutate' cargo +nightly mutagen`. Note that running these mutation tests will take on the order of 10's of minutes.
### Code verification ### Code verification

View File

@ -95,4 +95,4 @@ name = "io"
required-features = ["std"] required-features = ["std"]
[lints.rust] [lints.rust]
unexpected_cfgs = { level = "deny", check-cfg = ['cfg(bench)', 'cfg(fuzzing)', 'cfg(kani)', 'cfg(mutate)'] } unexpected_cfgs = { level = "deny", check-cfg = ['cfg(bench)', 'cfg(fuzzing)', 'cfg(kani)'] }

View File

@ -38,9 +38,6 @@ bincode = "1.3.1"
all-features = true all-features = true
rustdoc-args = ["--cfg", "docsrs"] rustdoc-args = ["--cfg", "docsrs"]
[lints.rust]
unexpected_cfgs = { level = "deny", check-cfg = ['cfg(mutate)'] }
[lints.clippy] [lints.clippy]
# Exclude lints we don't think are valuable. # Exclude lints we don't think are valuable.
needless_question_mark = "allow" # https://github.com/rust-bitcoin/rust-bitcoin/pull/2134 needless_question_mark = "allow" # https://github.com/rust-bitcoin/rust-bitcoin/pull/2134