Repository navigation
Port upstream #664: translate refuses a VIPORT_EMIT_DUMP directory inside the repo - #42
Merged
DesertGamer merged 1 commit intoNov 25, 2026
Conversation
translate writes emitted DXIL and validator reports to the VICTORY_EMIT_DUMP directory. Both are derived from the game's shaders, but the directory was never checked against the source tree. With VICTORY_EMIT_DUMP=. run from the checkout, the .txt reports land in the repo, and git and cargo xtask policy both let them through. Check the directory once at the start of translate::run, as Config already does for the cache and data directories. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 988fd9a)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this changes
This ports Marvisak/VIctory#664 by LF2000 Builder. It is cherry-picked with
-x, so the commit keeps their authorship. It is on the list in #12 ("in our history but not in the tree").viport translatewrites emitted DXIL and validator reports into theVIPORT_EMIT_DUMPdirectory (apps/viport/src/translate.rs, around lines 674 and 730 onmain). Both are derived from the game's shaders, but the directory is never checked against the source tree. WithVIPORT_EMIT_DUMP=.run from the checkout, the reports land in the repository. Rule #1 forbids that, and.txtfiles pass both git andcargo xtask policy.The fix calls
viport_core::ensure_outside_repoon the directory once at the start oftranslate::run, asConfigalready does for the cache and data directories. #664's test comes with it.The only conflict was in the test module. VIPort's
validator_reasonand listing tests are kept, and #664's test is added after them, with the names renamed (VIPORT_EMIT_DUMP,viport_core).Checked
docs/asset-policy.mdbuild.rs, git hook,.cargoconfig, CI change or script (or an issue explains why)cargo test --workspacepasses (not run, see below)cargo clippy --workspace --all-targets --locked -- -D warningspasses (for theviportapp, with CI: clear the clippy errors that keep main red since a3e7f17 #21 merged in locally)rustfmt; I did not reformat lines I did not changeWhat I ran
cargo clippy -p viport --all-targets --locked --target x86_64-pc-windows-msvc -- -D warnings, cross-checked from Linux with CI: clear the clippy errors that keep main red since a3e7f17 #21 merged in: clean, so the new test type-checks.cargo test -p viport-core --lockedon Linux: passes. That crate holdsensure_outside_repoand itsInsideRepoerror, which the new test expects.Not run:
cargo test -p viport(the app builds only for Windows). The new testemit_dump_inside_repo_is_refusedsets an environment variable, as upstream's did. CI runs the tests with--test-threads=1, and no other test in this binary touches the environment.Overlaps
None. No open PR touches
apps/viport/src/translate.rs.🤖 Generated with Claude Code