Skip to content

Have ci check #[cfg(fuzzing)] code for errors#23

Open
Techcable wants to merge 1 commit into
ZelAnton:mainfrom
Techcable:fix/ci-check-cfg-fuzzing
Open

Have ci check #[cfg(fuzzing)] code for errors#23
Techcable wants to merge 1 commit into
ZelAnton:mainfrom
Techcable:fix/ci-check-cfg-fuzzing

Conversation

@Techcable

Copy link
Copy Markdown

What & why

Before this commit, problems with #[cfg(fuzzing)]cod would go unnoticed until fuzz.yml CI tier,
which only runs on a daily schedule.

This adds a CI job to type check the #[cfg(fuzzing)] code without
actually running cargo-fuzz or needing a nightly toolchain.

It also adds a similar job to the Justfile that checks the same thing.

Checklist

  • cargo fmt --all
  • cargo clippy --all-targets --all-features -- -D warnings is clean
  • cargo test passes (and cargo test --all-features -- --ignored if you
    touched spawn / containment / streaming paths)
  • (N/A) CHANGELOG.md [Unreleased] updated when the change is user-facing
    (Added / Changed / Fixed)
  • (N/A) Docs updated (rustdoc and the docs/ guide set) if behavior or API changed
  • (N/A) New dependencies carry a "why" comment in Cargo.toml (see CONTRIBUTING.md)

Notes for reviewers

I came across this while working on PR #22

Type checks the #[cfg(fuzzing)] code without
actually running cargo-fuzz or needing a nightly toolchain.
Ordinary cargo check/clippy/test never set that cfg,
so type errors would go unnoticed until fuzz.yml CI tier,
which only runs on a daily schedule.

Also adds a fuzz-check task to the Justfile,
which is run as part of the 'check' and 'ci' jobs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant