Skip to content

Use CARGO_BUILD_WARNINGS instead of RUSTFLAGS/RUSTDOCFLAGS in CI#822

Merged
magicant merged 1 commit into
masterfrom
cargo_build_warnings
Jul 9, 2026
Merged

Use CARGO_BUILD_WARNINGS instead of RUSTFLAGS/RUSTDOCFLAGS in CI#822
magicant merged 1 commit into
masterfrom
cargo_build_warnings

Conversation

@magicant

@magicant magicant commented Jul 9, 2026

Copy link
Copy Markdown
Owner

Rust 1.97.0 adds CARGO_BUILD_WARNINGS, a Cargo-level setting that denies build and doc warnings without relying on
RUSTFLAGS/RUSTDOCFLAGS. Switch the check, extra, and release-build jobs to it, replacing the separate RUSTFLAGS and RUSTDOCFLAGS entries.

Also set CARGO_BUILD_WARNINGS: deny on the windows job, which previously had no warnings-as-errors setting at all.

See: https://blog.rust-lang.org/2026/07/09/Rust-1.97.0/

Summary by CodeRabbit

  • Chores
    • Updated the build and validation workflow to use a more consistent warnings-as-errors setting across CI jobs.
    • Improved Windows job configuration to match the rest of the pipeline.

Rust 1.97.0 adds CARGO_BUILD_WARNINGS, a Cargo-level setting that
denies build and doc warnings without relying on
RUSTFLAGS/RUSTDOCFLAGS. Switch the check, extra, and release-build
jobs to it, replacing the separate RUSTFLAGS and RUSTDOCFLAGS
entries.

Also set CARGO_BUILD_WARNINGS: deny on the windows job, which
previously had no warnings-as-errors setting at all.

See: https://blog.rust-lang.org/2026/07/09/Rust-1.97.0/
@magicant magicant self-assigned this Jul 9, 2026
@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The CI workflow file was updated to replace RUSTFLAGS: -D warnings with CARGO_BUILD_WARNINGS: deny in the check, extra, and release-build job environments, and a new env block setting CARGO_BUILD_WARNINGS: deny was added to the windows job.

Changes

CI Workflow Warning Configuration

Layer / File(s) Summary
Warning enforcement setting across CI jobs
.github/workflows/ci.yml
Switches from RUSTFLAGS: -D warnings to CARGO_BUILD_WARNINGS: deny in check, extra, and release-build jobs, and adds this setting to the windows job's new env block.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Poem

A rabbit hops through YAML fields,
Swapping flags for cargo shields,
Deny those warnings, jobs align,
Windows too now toes the line,
Hop hop hooray, the build is fine! 🐇

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the change, but it omits the template checklist section and its required items. Add the checklist section with the required items, and mark each item as done, not applicable, or explain any omissions.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and accurately summarizes the CI warnings-setting change.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cargo_build_warnings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/ci.yml:
- Line 17: The CI workflow currently switches from RUSTFLAGS: -D warnings to
CARGO_BUILD_WARNINGS: deny, which does not enforce the same warning scope.
Update the affected job(s) in the workflow to preserve full warning-as-error
behavior by keeping RUSTFLAGS with -D warnings or adding an explicit -D warnings
setting alongside CARGO_BUILD_WARNINGS, so the existing Rust build and clippy
enforcement remains intact.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 1706e539-22fe-46c3-8571-082603215bf6

📥 Commits

Reviewing files that changed from the base of the PR and between 7eb26e2 and 64fcf51.

📒 Files selected for processing (1)
  • .github/workflows/ci.yml

Comment thread .github/workflows/ci.yml
@magicant
magicant merged commit f28380f into master Jul 9, 2026
14 checks passed
@magicant
magicant deleted the cargo_build_warnings branch July 9, 2026 15:28
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