CLI: report missing input paths in shader translation commands #4233

Closed
github-bot wants to merge 1 commit from github-bot/gh-4232 into main AGit
Owner

@⁠RanoGames on GitHub · 2026-11-30 17:39 UTC · original
RanoGames:fix/translate-missing-scan-root → main · +60 −7 · 2 files · 1 commits · closed without merging

## What it changes

victory translate, translate --warm all, and shaders can exit successfully when a supplied input path does not exist. For example, passing an empty directory followed by a mistyped path produces a successful zero-shader summary. Scripts and preload rely on the exit status to detect a failed scan.

Propagate the root traversal error and include the offending path in the diagnostic. An existing empty directory is still a successful scan.

How it was tested

  • GPU and profile — Windows CLI integration tests with temporary directories. No GPU or game data required.
  • Before — a missing input alongside an existing directory produced a successful exit.
  • After — all three commands return an error naming the missing input. Each also accepts an existing empty directory.
  • cargo test --locked -p victory passed.

Checked for overlap

  • Searched open and closed PRs for input scan failures and reviewed open changes to the translation commands. #2785 covers scan errors in shader-info. #2799 covers shader dump destinations.
**@⁠RanoGames** on GitHub · 2026-11-30 17:39 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4232) `RanoGames:fix/translate-missing-scan-root` → `main` · +60 −7 · 2 files · 1 commits · closed without merging ## What it changes `victory translate`, `translate --warm all`, and `shaders` can exit successfully when a supplied input path does not exist. For example, passing an empty directory followed by a mistyped path produces a successful zero-shader summary. Scripts and `preload` rely on the exit status to detect a failed scan. Propagate the root traversal error and include the offending path in the diagnostic. An existing empty directory is still a successful scan. ## How it was tested - GPU and profile — Windows CLI integration tests with temporary directories. No GPU or game data required. - Before — a missing input alongside an existing directory produced a successful exit. - After — all three commands return an error naming the missing input. Each also accepts an existing empty directory. - `cargo test --locked -p victory` passed. ## Checked for overlap - [x] Searched open and closed PRs for input scan failures and reviewed open changes to the translation commands. #2785 covers scan errors in `shader-info`. #2799 covers shader dump destinations.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-30 18:09:11 +00:00
Author
Owner

@⁠andrewpozdnakov7-jpg on GitHub · 2026-12-01 10:01 UTC · original

I cherry-picked c7aacf5 onto current main 5fabb46 as dae84bc. The Git author and patch ID match. The comparison contains the changes to translate.rs and the CLI integration tests, with the unrelated base history removed.

The pre-change Windows launcher returned exit code 0 for a valid empty directory followed by a missing one on all three commands. On the rebase, cargo test --locked -p victory --test translation_inputs --jobs 2 passed both tests. translate, translate --warm all and shaders each rejected the missing root and named it in the error. The same commands accepted an existing empty directory. No game inputs or game run were involved.

The rebased branch is ready to use in this PR.

**@⁠andrewpozdnakov7-jpg** on GitHub · 2026-12-01 10:01 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4232#issuecomment-7307562839) I cherry-picked `c7aacf5` onto current `main` `5fabb46` as [`dae84bc`](https://github.com/andrewpozdnakov7-jpg/VIctory-NVIDIA/commit/dae84bcfd1467bf209241804e41d3b9e5d0cb53c). The Git author and patch ID match. The comparison contains the changes to `translate.rs` and the CLI integration tests, with the unrelated base history removed. The pre-change Windows launcher returned exit code 0 for a valid empty directory followed by a missing one on all three commands. On the rebase, `cargo test --locked -p victory --test translation_inputs --jobs 2` passed both tests. `translate`, `translate --warm all` and `shaders` each rejected the missing root and named it in the error. The same commands accepted an existing empty directory. No game inputs or game run were involved. The rebased branch is ready to use in this PR.
github-bot force-pushed github-bot/gh-4232 from c7aacf5e5f to c9e474d3c9 2026-12-01 16:23:37 +00:00 Compare
github-bot closed this pull request 2026-12-01 18:50:23 +00:00
Author
Owner

@⁠trustno1-coder on GitHub · 2026-12-01 18:45 UTC · original

Closing this as part of moving main to the texture and video-memory rework (v2026.12.01.01-test). A lot of the code changed, and this pull request no longer applies cleanly to it; it would need to be rewritten against the new main rather than rebased. Thank you for the work. If the change is still needed, please open a new pull request based on the current main.

**@⁠trustno1-coder** on GitHub · 2026-12-01 18:45 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4232#issuecomment-7321473944) Closing this as part of moving main to the texture and video-memory rework (v2026.12.01.01-test). A lot of the code changed, and this pull request no longer applies cleanly to it; it would need to be rewritten against the new main rather than rebased. Thank you for the work. If the change is still needed, please open a new pull request based on the current main.

Pull request closed

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/trustno1-coder--VIctory-NVIDIA!4233
No description provided.