Fix #90: gate view_format with cfg(windows) so victory-gpu builds on Linux #2006

Closed
tharun-37 wants to merge 1 commit from upstream-pr/2008 into main
tharun-37 commented 2026-11-25 02:49:29 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by tharun-37 on 2026-11-25T02:49:29Z.


host_resource is already cfg(windows); view_format called it on every target, breaking the Linux build (E0425). Gate view_format the same way since its only caller (host_desc) is also cfg(windows).

<!-- greyfinch-sync:Marvisak/VIctory:issue:6596060990 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2008). Originally posted by [tharun-37](https://github.com/tharun-37) on 2026-11-25T02:49:29Z. --- host_resource is already cfg(windows); view_format called it on every target, breaking the Linux build (E0425). Gate view_format the same way since its only caller (host_desc) is also cfg(windows).
jeremygold02 commented 2026-11-25 03:03:42 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by jeremygold02 on 2026-11-25T02:59:56Z.


Triage verdict — Candidate for a focused landing (4202096)

Evidence

  • The one-line #[cfg(windows)] is the right boundary for the first #90 error: main’s view_format calls the Windows-only host_resource. #1017 at d5de72b already contains the identical gate alongside the remaining Linux build fixes.

Checks and limits

  • The green check on 4202096 runs on Windows, so it does not establish that the Linux workspace now builds.

Next step

  • I’d treat this as a separable first-blocker fix. If #1017 lands first, this hunk is covered. If maintainers want to take this independently, keep #90 open until cargo check --workspace --all-targets --locked passes natively on Linux, and drop the repeated hunk when rebasing #1017.

This verification was AI-assisted.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7151482059 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2008#issuecomment-7151482059). Originally posted by [jeremygold02](https://github.com/jeremygold02) on 2026-11-25T02:59:56Z. --- **Triage verdict — Candidate for a focused landing** (`4202096`) **Evidence** - The one-line `#[cfg(windows)]` is the right boundary for the first #90 error: [main’s `view_format`](https://github.com/Marvisak/VIctory/blob/940d32f69b22265690a0b5a15d6ded572ba33baf/crates/victory-gpu/src/resource.rs#L279-L287) calls the Windows-only [`host_resource`](https://github.com/Marvisak/VIctory/blob/940d32f69b22265690a0b5a15d6ded572ba33baf/crates/victory-gpu/src/resource.rs#L975-L982). #1017 at `d5de72b` already contains the identical gate alongside the remaining Linux build fixes. **Checks and limits** - The green [check on `4202096`](https://github.com/Marvisak/VIctory/actions/runs/45535684112/job/138941580992) runs on Windows, so it does not establish that the Linux workspace now builds. **Next step** - I’d treat this as a separable first-blocker fix. If #1017 lands first, this hunk is covered. If maintainers want to take this independently, keep #90 open until `cargo check --workspace --all-targets --locked` passes natively on Linux, and drop the repeated hunk when rebasing #1017. This verification was AI-assisted.
catminou4 commented 2026-11-25 04:06:26 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-25T03:33:11Z.

Review: COMMENTED


Static review only: victory-gpu is Windows-only (D3D12/windows_sys) — nothing compiles or runs on macOS; source review of the diff.

view_format gated with cfg(windows) so victory-gpu builds on Linux — portability fix; welcome if CI covers the Linux build, otherwise untested territory.

<!-- greyfinch-sync:Marvisak/VIctory:review:6051461256 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2008#pullrequestreview-6051461256). Originally posted by [catminou4](https://github.com/catminou4) on 2026-11-25T03:33:11Z. **Review:** COMMENTED --- Static review only: victory-gpu is Windows-only (D3D12/windows_sys) — nothing compiles or runs on macOS; source review of the diff. view_format gated with cfg(windows) so victory-gpu builds on Linux — portability fix; welcome if CI covers the Linux build, otherwise untested territory.
Marvisak commented 2026-11-25 10:07:38 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T09:19:22Z.


Automated triage for the maintainers.
Merge candidate.

crates/victory-gpu/src/resource.rs, view_format: adds #[cfg(windows)]. The function calls host_resource, which is already cfg(windows). Its only callers, descriptor.rs host_desc and descriptor/host.rs (the module itself is cfg(windows)), are Windows-only, so nothing changes on Windows and a non-Windows cargo check no longer fails with E0425. The same hunk appears in many larger open PRs (#1017, #39, #523, #1241 and others). This is the only PR that contains just that hunk, so it is the easiest to land first. Whichever of those PRs lands later then drops the hunk on rebase.

CI: passing (check, Windows only; it does not show that the Linux build succeeds).

Recommending a look, not approving.


Generated by Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:comment:7158175094 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2008#issuecomment-7158175094). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T09:19:22Z. --- <!-- victory-triage v1 head=4202096cd0382a19447ecbe955b709fb5092d07e verdict=merge-candidate at=2026-11-25T09:19:03Z --> Automated triage for the maintainers. **Merge candidate.** `crates/victory-gpu/src/resource.rs`, `view_format`: adds `#[cfg(windows)]`. The function calls `host_resource`, which is already `cfg(windows)`. Its only callers, `descriptor.rs` `host_desc` and `descriptor/host.rs` (the module itself is `cfg(windows)`), are Windows-only, so nothing changes on Windows and a non-Windows `cargo check` no longer fails with E0425. The same hunk appears in many larger open PRs (#1017, #39, #523, #1241 and others). This is the only PR that contains just that hunk, so it is the easiest to land first. Whichever of those PRs lands later then drops the hunk on rebase. CI: passing (`check`, Windows only; it does not show that the Linux build succeeds). Recommending a look, not approving. --- _Generated by [Claude Code](https://claude.ai/code)_
fuzeofficlal commented 2026-11-26 02:07:12 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-26T01:37:17Z.


Code review and Windows 11 check at head 4202096cd038 merged cleanly onto main (63bcca43c6a0):

  • Code review (crates/victory-gpu/src/resource.rs:287):
    • Adding #[cfg(windows)] on view_format is still valid on current main (host_resource is #[cfg(windows)]) and merges cleanly with #2890.
    • Note for maintainers: on its own, this 1-line gate is no longer sufficient to make victory-gpu compile on Linux — #2890 already includes this exact #[cfg(windows)] gate along with the remaining 25-file non-Windows gates across resource.rs and 8 other victory-gpu modules.
  • Verified (Windows 11, Rust 1.98.1):
    • cargo xtask policy: 191 files ok; cargo clippy --locked -p victory-gpu --tests -- -D warnings (default + --features diagnostics): 0 warnings.
<!-- greyfinch-sync:Marvisak/VIctory:comment:7179956502 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2008#issuecomment-7179956502). Originally posted by [fuzeofficlal](https://github.com/fuzeofficlal) on 2026-11-26T01:37:17Z. --- Code review and Windows 11 check at head `4202096cd038` merged cleanly onto `main` (`63bcca43c6a0`): - **Code review (`crates/victory-gpu/src/resource.rs:287`)**: - Adding `#[cfg(windows)]` on `view_format` is still valid on current `main` (`host_resource` is `#[cfg(windows)]`) and merges cleanly with `#2890`. - Note for maintainers: on its own, this 1-line gate is no longer sufficient to make `victory-gpu` compile on Linux — `#2890` already includes this exact `#[cfg(windows)]` gate along with the remaining 25-file non-Windows gates across `resource.rs` and 8 other `victory-gpu` modules. - **Verified (Windows 11, Rust 1.98.1)**: - `cargo xtask policy`: `191 files ok`; `cargo clippy --locked -p victory-gpu --tests -- -D warnings` (default + `--features diagnostics`): 0 warnings.
upstream-sync closed this pull request 2026-11-26 04:05:02 +00:00
tharun-37 commented 2026-11-26 04:06:21 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by tharun-37 on 2026-11-26T03:26:27Z.


Closing to re-scope: taking on better-scoped issues instead.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7181721502 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2008#issuecomment-7181721502). Originally posted by [tharun-37](https://github.com/tharun-37) on 2026-11-26T03:26:27Z. --- Closing to re-scope: taking on better-scoped issues instead.

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
Marvisak/VIctory!2006
No description provided.