CI: rustc warnings fail the build, except deprecations #275

Open
github-bot wants to merge 1 commit from github-bot/gh-275 into main AGit
Owner

@⁠sombraSoft on GitHub · 2026-11-23 22:16 UTC · original
sombraSoft:ci/deny-warnings → main · +5 −2 · 1 files · 1 commits · open

CI fails the build on any rustc warning except deprecations. The tree has no other rustc warnings today, so this keeps it that way. Only CI sets RUSTFLAGS: -D warnings -A deprecated; local builds are unaffected.

Deprecations stay warnings because CI installs the latest stable, which can deprecate an API at any time. Rust 1.100 deprecated AtomicU32::fetch_update (renamed to try_update), which is used in crates/xcl/src/hle/xgameruntime/mod.rs:547. With plain -D warnings that one line fails CI.

Part of #265

What is in it

  • .github/workflows/ci.yml: RUSTFLAGS: -D warnings -A deprecated in the windows job's env, and the header comment lists it among what CI checks.

CI time

  • 0 on its own: cold fork builds take the same time with and without the flag. Cache interaction: RUSTFLAGS is part of cargo's fingerprint, so dependencies cached without it are rebuilt, close to a cold build (~+60 s over today's warm 76 s). With the current actions/cache setup the cache is never saved again on an exact key hit, so that cost would repeat on every run until Cargo.lock changes. With #274 (rust-cache, which keys on RUSTFLAGS) it is paid once, on the first main run. Best merged after #274, or together with it.

Tested

  • Full suite on main (9ab7d76), RTX 3060 Ti (driver 621.24), Ryzen 9 5900X, Windows 11, rustc 1.97.1, debug: scripts/test.ps1 → 651 passed, 0 failed, 40 ignored; SKIPPED: 2 (no wave64). This PR changes only CI config, so the compiled code is the same.
  • RUSTFLAGS="-D warnings -A deprecated" cargo +1.100.0 build --workspace --all-targets: succeeds with 0 warnings.
  • The same flags in CI on rustc 1.100.0 (stable today) pass in a fork run: https://github.com/sombraSoft/xcl/actions/runs/45277146379
  • The first fork run, with plain -D warnings, failed on 1.100.0 on the fetch_update deprecation: https://github.com/sombraSoft/xcl/actions/runs/45276416928

Regression run

  • Not needed: no crates/xcl/src change.

Not tested

  • The fetch_update deprecation is left for a separate source PR, because that one needs a regression run.
  • A future rustc may report new warnings; with this PR they fail CI when they appear. That is the check working.

AI use

  • Claude Code (Claude Sonnet 5.5) wrote the change; Claude Code (Claude Opus 5.5) reviewed it and wrote this description; I read the diff.
**@⁠sombraSoft** on GitHub · 2026-11-23 22:16 UTC · [original](https://github.com/xcl-dev/xcl/pull/275) `sombraSoft:ci/deny-warnings` → `main` · +5 −2 · 1 files · 1 commits · open CI fails the build on any rustc warning except deprecations. The tree has no other rustc warnings today, so this keeps it that way. Only CI sets `RUSTFLAGS: -D warnings -A deprecated`; local builds are unaffected. Deprecations stay warnings because CI installs the latest stable, which can deprecate an API at any time. Rust 1.100 deprecated `AtomicU32::fetch_update` (renamed to `try_update`), which is used in `crates/xcl/src/hle/xgameruntime/mod.rs:547`. With plain `-D warnings` that one line fails CI. Part of #265 **What is in it** - `.github/workflows/ci.yml`: `RUSTFLAGS: -D warnings -A deprecated` in the windows job's `env`, and the header comment lists it among what CI checks. **CI time** - 0 on its own: cold fork builds take the same time with and without the flag. **Cache interaction:** `RUSTFLAGS` is part of cargo's fingerprint, so dependencies cached without it are rebuilt, close to a cold build (~+60 s over today's warm 76 s). With the current `actions/cache` setup the cache is never saved again on an exact key hit, so that cost would repeat on every run until `Cargo.lock` changes. With #274 (rust-cache, which keys on `RUSTFLAGS`) it is paid once, on the first `main` run. Best merged after #274, or together with it. **Tested** - Full suite on `main` (9ab7d76), RTX 3060 Ti (driver 621.24), Ryzen 9 5900X, Windows 11, rustc 1.97.1, debug: `scripts/test.ps1` → 651 passed, 0 failed, 40 ignored; SKIPPED: 2 (no wave64). This PR changes only CI config, so the compiled code is the same. - `RUSTFLAGS="-D warnings -A deprecated" cargo +1.100.0 build --workspace --all-targets`: succeeds with 0 warnings. - The same flags in CI on rustc 1.100.0 (stable today) pass in a fork run: https://github.com/sombraSoft/xcl/actions/runs/45277146379 - The first fork run, with plain `-D warnings`, failed on 1.100.0 on the `fetch_update` deprecation: https://github.com/sombraSoft/xcl/actions/runs/45276416928 **Regression run** - Not needed: no `crates/xcl/src` change. **Not tested** - The `fetch_update` deprecation is left for a separate source PR, because that one needs a regression run. - A future rustc may report new warnings; with this PR they fail CI when they appear. That is the check working. **AI use** - Claude Code (Claude Sonnet 5.5) wrote the change; Claude Code (Claude Opus 5.5) reviewed it and wrote this description; I read the diff.
The tree builds with 0 rustc warnings except one: Rust 1.100 deprecated
`AtomicU32::fetch_update` (renamed `try_update`), used in
crates/xcl/src/hle/xgameruntime/mod.rs. CI installs the latest stable, so a
new release can deprecate an API at any time and would turn CI red with
no change in the tree.

RUSTFLAGS=-D warnings -A deprecated on the windows job makes every other
rustc warning an error and leaves deprecations as warnings. Only CI sets
it, so local builds are unaffected.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:18:26 +00:00
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-25 15:14 UTC · original

Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)

Thanks!

**@⁠DavidM1911** on GitHub · 2026-11-25 15:14 UTC · [original](https://github.com/xcl-dev/xcl/pull/275#issuecomment-7166517878) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.) Thanks!
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/275/head:github-bot/gh-275'
git switch 'github-bot/gh-275'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-275'
git switch 'github-bot/gh-275'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-275'
git switch 'github-bot/gh-275'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-275'
git switch 'main'
git merge --squash 'github-bot/gh-275'
git switch 'main'
git merge --ff-only 'github-bot/gh-275'
git switch 'main'
git merge 'github-bot/gh-275'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.