Audit and clean up dead-code and unused warnings in victory-gpu #12

Open
opened 2026-12-06 00:20:08 +00:00 by github-bot · 0 comments
Owner

@⁠VictoryX-dev on GitHub · 2026-12-03 02:57 UTC · original

Problem

Several internal modules in victory-gpu carry pre-existing dead-code or unused-item warnings (often across default vs --features diagnostics feature-gate combinations). Cleaning these up reduces compiler noise and makes real regressions easier to spot during review.

Known Evidence

  • Observed directly in source modules:
    • Unused / #[cfg(feature = "diagnostics")]-mismatched items have accumulated in victory-gpu modules including descriptor.rs, host.rs, shadow.rs, texture.rs, capture.rs and membreak.rs.
    • CI builds both default features and --all-features (runtime/.github/workflows/ci.yml), so any fix must stay warning-free under both feature sets.
  • Synthetic / Local verification: Verified locally via cargo check and cargo clippy under both feature combinations (no title files required).

Approaches That Did Not Work

  • Blanket #![allow(dead_code)] attributes: Hiding warnings at module level obscures truly stale code and makes feature-gate bugs harder to detect.

Relevant Source Modules

  • runtime/crates/victory-gpu/src/descriptor.rs
  • runtime/crates/victory-gpu/src/host.rs
  • runtime/crates/victory-gpu/src/shadow.rs
  • runtime/crates/victory-gpu/src/texture.rs
  • runtime/crates/victory-gpu/src/capture.rs
  • runtime/crates/victory-gpu/src/membreak.rs

Expected Contribution

  • Run cargo check --workspace --all-targets --locked and cargo check --workspace --all-targets --all-features --locked (as well as cargo test --no-run) to collect dead-code / unused warnings.
  • For each warning, either:
    • gate diagnostics-only helpers properly behind #[cfg(feature = "diagnostics")] or #[cfg(test)], or
    • remove genuinely obsolete helpers that are no longer referenced anywhere (confirming via workspace grep).
  • Keep the pull request focused on dead-code cleanup with no behavioral changes.

Acceptance Criteria

  • Zero new or remaining dead-code warnings under both default features and --all-features (including test targets).
  • cargo clippy --workspace --all-targets --locked -- -D warnings and --all-features pass cleanly.
  • cargo test --workspace --locked passes with zero regressions.
**@⁠VictoryX-dev** on GitHub · 2026-12-03 02:57 UTC · [original](https://github.com/VictoryX-dev/VictoryX/issues/12) ## Problem Several internal modules in `victory-gpu` carry pre-existing dead-code or unused-item warnings (often across default vs `--features diagnostics` feature-gate combinations). Cleaning these up reduces compiler noise and makes real regressions easier to spot during review. ## Known Evidence - **Observed directly in source modules:** - Unused / `#[cfg(feature = "diagnostics")]`-mismatched items have accumulated in `victory-gpu` modules including `descriptor.rs`, `host.rs`, `shadow.rs`, `texture.rs`, `capture.rs` and `membreak.rs`. - CI builds both default features and `--all-features` (`runtime/.github/workflows/ci.yml`), so any fix must stay warning-free under both feature sets. - **Synthetic / Local verification:** Verified locally via `cargo check` and `cargo clippy` under both feature combinations (no title files required). ## Approaches That Did Not Work - **Blanket `#![allow(dead_code)]` attributes:** Hiding warnings at module level obscures truly stale code and makes feature-gate bugs harder to detect. ## Relevant Source Modules - `runtime/crates/victory-gpu/src/descriptor.rs` - `runtime/crates/victory-gpu/src/host.rs` - `runtime/crates/victory-gpu/src/shadow.rs` - `runtime/crates/victory-gpu/src/texture.rs` - `runtime/crates/victory-gpu/src/capture.rs` - `runtime/crates/victory-gpu/src/membreak.rs` ## Expected Contribution - Run `cargo check --workspace --all-targets --locked` and `cargo check --workspace --all-targets --all-features --locked` (as well as `cargo test --no-run`) to collect dead-code / unused warnings. - For each warning, either: - gate diagnostics-only helpers properly behind `#[cfg(feature = "diagnostics")]` or `#[cfg(test)]`, or - remove genuinely obsolete helpers that are no longer referenced anywhere (confirming via workspace grep). - Keep the pull request focused on dead-code cleanup with no behavioral changes. ## Acceptance Criteria - [ ] Zero new or remaining dead-code warnings under both default features and `--all-features` (including test targets). - [ ] `cargo clippy --workspace --all-targets --locked -- -D warnings` and `--all-features` pass cleanly. - [ ] `cargo test --workspace --locked` passes with zero regressions.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-06 00:20:09 +00:00
This discussion has been locked. Commenting is limited to contributors.
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.

Dependencies

No dependencies set

Reference
github/VictoryX-dev--VictoryX#12
No description provided.