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

Closed
sombraSoft wants to merge 1 commit from upstream-pr/275 into main
sombraSoft commented 2026-11-23 22:16:58 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by sombraSoft on 2026-11-23T22:16:58Z.


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.
<!-- greyfinch-sync:ivall/xcl:issue:5462181075 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/275). Originally posted by [sombraSoft](https://github.com/sombraSoft) on 2026-11-23T22:16:58Z. --- 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.
DavidM1911 commented 2026-11-25 16:12:03 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T15:14:12Z.


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!

<!-- greyfinch-sync:ivall/xcl:comment:7166517878 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/275#issuecomment-7166517878). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T15:14:12Z. --- 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!
github-actions[bot] commented 2026-11-29 20:42:43 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-29T20:42:43Z.


Nothing has happened on this PR for 3 days, so it is marked stale and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto main if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.

<!-- greyfinch-sync:ivall/xcl:comment:7262297176 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/275#issuecomment-7262297176). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-29T20:42:43Z. --- Nothing has happened on this PR for 3 days, so it is marked `stale` and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto `main` if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.
Foniass commented 2026-12-01 03:03:00 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T03:03:00Z.


Triage (#1607) – head 190cc0d

No open or merged PR makes the same change; main's ci.yml sets no RUSTFLAGS.
No problems found in the diff. The warning-free claim was measured on main 9ab7d76 (2026-11-23); many PRs have merged since, so the current main should be built once with -D warnings -A deprecated before merging, or every PR goes red on an existing warning. As the description says, it is best merged after #274 so the RUSTFLAGS change does not rebuild dependencies on every run.
Recommendation: keep open.

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

<!-- greyfinch-sync:ivall/xcl:comment:7299267275 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/275#issuecomment-7299267275). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T03:03:00Z. --- **Triage (#1607)** – head 190cc0d No open or merged PR makes the same change; main's `ci.yml` sets no `RUSTFLAGS`. No problems found in the diff. The warning-free claim was measured on main 9ab7d76 (2026-11-23); many PRs have merged since, so the current main should be built once with `-D warnings -A deprecated` before merging, or every PR goes red on an existing warning. As the description says, it is best merged after #274 so the RUSTFLAGS change does not rebuild dependencies on every run. Recommendation: keep open. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
xcl-dev/xcl!272
No description provided.