Skip to content

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

Closed
tharun-37 wants to merge 1 commit into
Marvisak:mainfrom
tharun-37:fix/linux-build-view-format
Closed

tharun-37 wants to merge 1 commit into
Marvisak:mainfrom
tharun-37:fix/linux-build-view-format

Conversation

@tharun-37

Copy link
Copy Markdown

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

jeremygold02 commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Triage verdict — Candidate for a focused landing (4202096)

Evidence

Checks and limits

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

Next step

This verification was AI-assisted.

@catminou4 catminou4 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.

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.

Copy link
Copy Markdown
Owner

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

github-actions Bot added a commit to KevinPratap/VIctory that referenced this pull request Nov 25, 2026
@fuzeofficlal

Copy link
Copy Markdown
Contributor

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.

@tharun-37

Copy link
Copy Markdown
Author

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

@tharun-37 tharun-37 closed this Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants