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

Open
github-bot wants to merge 1 commit from github-bot/gh-2018 into main AGit
Owner

@⁠Gruzzberry on GitHub · 2026-11-25 03:12 UTC · original
Gruzzberry:gz/docs-shader-cache-link → main · +1 −1 · 1 files · 1 commits · open

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

  • RTX 4070 12 GB, Windows 11, rustc 1.98.1.
  • RUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-deps --locked --keep-going: fails on main with the error above, builds all crates on the branch.
  • cargo clippy --workspace --all-targets --locked -- -D warnings and the --all-features variant: clean.
  • Tests: the change is a comment, so I did not rerun them on the branch; cargo test --workspace --locked on main passes except two victory-gpu tests that need a card with a 2^21-descriptor view heap (dynamic_slots_are_held_until_released, lists_share_a_table_and_copies_keep_their_views; on NVIDIA's 1,000,000 cap, covered by #1770/#1744). A hosted runner has no card and skips them.

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

**@⁠Gruzzberry** on GitHub · 2026-11-25 03:12 UTC · [original](https://github.com/Marvisak/VIctory/pull/2018) `Gruzzberry:gz/docs-shader-cache-link` → `main` · +1 −1 · 1 files · 1 commits · open 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** - RTX 4070 12 GB, Windows 11, rustc 1.98.1. - `RUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-deps --locked --keep-going`: fails on main with the error above, builds all crates on the branch. - `cargo clippy --workspace --all-targets --locked -- -D warnings` and the `--all-features` variant: clean. - Tests: the change is a comment, so I did not rerun them on the branch; `cargo test --workspace --locked` on main passes except two victory-gpu tests that need a card with a 2^21-descriptor view heap (`dynamic_slots_are_held_until_released`, `lists_share_a_table_and_copies_keep_their_views`; on NVIDIA's 1,000,000 cap, covered by #1770/#1744). A hosted runner has no card and skips them. **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](https://claude.com/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)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:51:45 +00:00
Author
Owner

@⁠jeremygold02 on GitHub · 2026-11-25 03:24 UTC · original

Triage verdict — Ready for maintainer decision (e9cc9f0)

Evidence

  • Current main still links to the private build item from public module docs. The one-line change keeps the explanation and removes the invalid link. This is the same fix pattern as merged #675, applied to a different link.

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.

**@⁠jeremygold02** on GitHub · 2026-11-25 03:24 UTC · [original](https://github.com/Marvisak/VIctory/pull/2018#issuecomment-7151879459) **Triage verdict — Ready for maintainer decision** (`e9cc9f0`) **Evidence** - [Current `main`](https://github.com/Marvisak/VIctory/blob/940d32f69b22265690a0b5a15d6ded572ba33baf/crates/victory-gpu/src/shader_cache.rs#L1-L5) still links to the private `build` item from public module docs. The one-line change keeps the explanation and removes the invalid link. This is the same fix pattern as merged #675, applied to a different link. **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](https://github.com/Marvisak/VIctory/actions/runs/45538376908/job/138950513445) 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.
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 09:19 UTC · original

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

**@⁠Marvisak** on GitHub · 2026-11-25 09:19 UTC · [original](https://github.com/Marvisak/VIctory/pull/2018#issuecomment-7158179787) <!-- victory-triage v1 head=e9cc9f001da76e9ced3a9d6c48fd9d6e13f32f49 verdict=merge-candidate at=2026-11-25T09:19:03Z --> 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](https://claude.ai/code)_
Author
Owner

@⁠cloph-dsp on GitHub · 2026-11-25 11:09 UTC · original

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.

**@⁠cloph-dsp** on GitHub · 2026-11-25 11:09 UTC · [original](https://github.com/Marvisak/VIctory/pull/2018#issuecomment-7160663979) 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.
Author
Owner

@⁠fuzeofficlal on GitHub · 2026-11-26 01:13 UTC · original

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.

**@⁠fuzeofficlal** on GitHub · 2026-11-26 01:13 UTC · [original](https://github.com/Marvisak/VIctory/pull/2018#issuecomment-7179551848) 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.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2018/head:github-bot/gh-2018'
git switch 'github-bot/gh-2018'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2018'
git switch 'github-bot/gh-2018'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2018'
git switch 'github-bot/gh-2018'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2018'
git switch 'main'
git merge --squash 'github-bot/gh-2018'
git switch 'main'
git merge --ff-only 'github-bot/gh-2018'
git switch 'main'
git merge 'github-bot/gh-2018'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
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/Marvisak--VIctory!2018
No description provided.