Skip to content

Docs: rustdoc builds the GPU crate again (shader_cache's private link) - #2018

Open
Gruzzberry wants to merge 1 commit into
Marvisak:mainfrom
Gruzzberry:gz/docs-shader-cache-link
Open

Gruzzberry wants to merge 1 commit into
Marvisak:mainfrom
Gruzzberry:gz/docs-shader-cache-link

Conversation

@Gruzzberry

Copy link
Copy Markdown

On main (70564ae), RUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-deps --locked stops at victory-gpu:

error: public documentation for `shader_cache` links to private item `build`
 --> crates\victory-gpu\src\shader_cache.rs:3:31

#675 made rustdoc clean for the loader, GPU and shader crates; the link came back with the translator-keyed shader cache. The fix writes build as code, the way #675 did for its siblings. One line of documentation, no code change.

What is in it

  • crates/victory-gpu/src/shader_cache.rs: [`build`] becomes `build` in the module docs.

Tested

Not tested

  • No test: rustdoc is not part of CI. If you want it to stay clean, cargo doc with -D warnings could be a CI step; I left that to you.
  • Note: shader_cache.rs's text is hashed into the translation cache key (ENCODING), so any edit to this file, this one included, makes existing cached shaders translate again once.

AI use
Claude Code with Claude Sonnet 5.5 found, wrote and tested this; the user reviewed and opened it.

🤖 Generated with Claude Code

The module documentation of victory-gpu's shader_cache links to build(),
which is private, so RUSTDOCFLAGS='-D warnings' cargo doc --workspace
--no-deps fails with rustdoc::private_intra_doc_links. Commit 5864aab
fixed the same page's other link; this one arrived with the shader cache
keyed by the translator. It is written as code, as the other private
items are.

cargo doc --workspace --no-deps --locked with -D warnings now builds all
eleven crates.

Assisted-by: Claude Code (Claude Sonnet 5.5)
@jeremygold02

Copy link
Copy Markdown
Contributor

Triage verdict — Ready for maintainer decision (e9cc9f0)

Evidence

Checks and limits

  • The author reports a strict workspace rustdoc failure before the change and a pass with the patch. The exact-head Windows job also passed, but it covers Clippy and tests rather than strict rustdoc. I checked the source and CI; I did not rerun rustdoc.

Next step

  • Consider landing the focused fix. Keep the strict cargo doc --workspace --no-deps --locked result with the PR, since that is the check that catches this regression.

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.

rustdoc builds the GPU crate again (shader_cache private link) — docs fix; nice that GPU rustdoc is maintained.

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

Copy link
Copy Markdown
Owner

Automated triage for the maintainers.
Merge candidate.

crates/victory-gpu/src/shader_cache.rs, module docs: [`build`] becomes `build`. build() is a private fn, and shader_cache is pub mod in lib.rs, so rustdoc reports private_intra_doc_links here. With -D warnings that stops cargo doc. This is the same kind of fix as the merged #675. No other open PR fixes this alone; #2257 includes it in a 117-file bundle. The PR notes that this file's text feeds the shader cache key, so existing cached translations rebuild once. That cost is small but real.

CI: passing (check; rustdoc is not part of CI).

Recommending a look, not approving.


Generated by Claude Code

@cloph-dsp

Copy link
Copy Markdown

Independent local validation (Windows, Rust 1.100.0/MSVC, head e9cc9f0, no game data): with $env:RUSTDOCFLAGS='-D warnings', plain cargo doc --locked --workspace --no-deps exits 0 (50s). The +1.100.0 override does not work with the Scoop toolchain (no rustup), so plain cargo is the right check here. Deprecation warnings about fetch_update remain but do not fail rustdoc. Since the file text is hashed into the shader cache key, one retranslation is expected. AI-assisted (Hy4 flash). GPU/driver: N/A (docs/rustdoc only). No game data used.

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 rustdoc verification at head e9cc9f001da7 merged cleanly onto main (63bcca43c6a0):

  • Code review (crates/victory-gpu/src/shader_cache.rs:3):
    • Changing [`build`] to `build` removes the rustdoc::private_intra_doc_links warning on the private fn build at line 57. (Minor expected side effect: since ENCODING hashes include_bytes!("shader_cache.rs"), local shader disk cache keys rotate once on merge, which is safe.)
  • Verified (Windows 11, Rust 1.98.1):
    • cargo xtask policy: 191 files ok
    • RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --locked -p victory-gpu: 0 warnings (both default and --features diagnostics).

LGTM.

github-actions Bot added a commit to KevinPratap/VIctory that referenced this pull request 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.

6 participants