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

Open
Gruzzberry wants to merge 1 commit from upstream-pr/2018 into main
Gruzzberry commented 2026-11-25 03:12:36 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Gruzzberry on 2026-11-25T03:12:36Z.


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

<!-- greyfinch-sync:Marvisak/VIctory:issue:6596333619 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2018). Originally posted by [Gruzzberry](https://github.com/Gruzzberry) on 2026-11-25T03:12:36Z. --- 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)
catminou4 commented 2026-11-25 04:06:30 +00:00 (Migrated from github.com)

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

Review: COMMENTED


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.

<!-- greyfinch-sync:Marvisak/VIctory:review:6051461611 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2018#pullrequestreview-6051461611). Originally posted by [catminou4](https://github.com/catminou4) on 2026-11-25T03:33:14Z. **Review:** COMMENTED --- 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.
jeremygold02 commented 2026-11-25 04:06:51 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by jeremygold02 on 2026-11-25T03:24:05Z.


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.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7151879459 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2018#issuecomment-7151879459). Originally posted by [jeremygold02](https://github.com/jeremygold02) on 2026-11-25T03:24:05Z. --- **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.
Marvisak commented 2026-11-25 10:07:39 +00:00 (Migrated from github.com)

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


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

<!-- greyfinch-sync:Marvisak/VIctory:comment:7158179787 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2018#issuecomment-7158179787). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T09:19:35Z. --- <!-- 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)_
cloph-dsp commented 2026-11-25 12:03:38 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by cloph-dsp on 2026-11-25T11:09:14Z.


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.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7160663979 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2018#issuecomment-7160663979). Originally posted by [cloph-dsp](https://github.com/cloph-dsp) on 2026-11-25T11:09:14Z. --- 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.
fuzeofficlal commented 2026-11-26 02:06:56 +00:00 (Migrated from github.com)

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


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.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7179551848 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2018#issuecomment-7179551848). Originally posted by [fuzeofficlal](https://github.com/fuzeofficlal) on 2026-11-26T01:13:08Z. --- 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 cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/2018:upstream-pr/2018'
git switch 'upstream-pr/2018'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/2018'
git switch 'upstream-pr/2018'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/2018'
git switch 'upstream-pr/2018'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/2018'
git switch 'main'
git merge --squash 'upstream-pr/2018'
git switch 'main'
git merge --ff-only 'upstream-pr/2018'
git switch 'main'
git merge 'upstream-pr/2018'
git push origin 'main'
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!2016
No description provided.