[pr-fix][shaders] Translate, shader-info: shaders are not saved into a source tree #73

Manually merged
TrustNo1 merged 1 commit from iboom72/shader-saves-outside-repo into main 2026-12-03 20:19:18 +00:00 AGit
Contributor

What it changes

Saved shaders come from the game, so rule #1 keeps them out of the repository (docs/asset-policy.md). darner translate refused a DARNER_EMIT_DUMP folder inside a source tree, but not the folders of DARNER_FAIL_DUMP and DARNER_DUMP_MATCH. darner shader-info never checked DARNER_SHADER_SAVE either. All three now go through darner_core::ensure_outside_repo before any work starts, as DARNER_EMIT_DUMP already did.

The test that refused DARNER_EMIT_DUMP inside the repo now goes through all four switches, one at a time. Without this change, three of the four end on the missing input folder instead of PolicyError::InsideRepo.

The switches that darner-gpu and darner-hle read during a run are not changed.

How it was tested

  • Tested revision: f4dbb344
  • Commands and results:
    • cargo test -p darner: unit tests 131 passed, 1 ignored; integration tests 2 + 2 + 8 passed. This includes translate::tests::dump_inside_repo_is_refused.
    • cargo clippy -p darner --all-targets -- -D warnings: no warnings.
  • Gameplay: not relevant (offline tools only).
  • Coverage gaps:
    • I ran the three workspace gates only for the darner package, without --locked.
    • The saves outside the repo were not exercised on real shaders.

Checklist

  • This PR contains one change based on main.
  • The diff follows docs/asset-policy.md.
  • I recorded this PR's dependencies below.
    • Depends on: none

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches.
  • Related PRs: none found
## What it changes Saved shaders come from the game, so rule #1 keeps them out of the repository (`docs/asset-policy.md`). `darner translate` refused a `DARNER_EMIT_DUMP` folder inside a source tree, but not the folders of `DARNER_FAIL_DUMP` and `DARNER_DUMP_MATCH`. `darner shader-info` never checked `DARNER_SHADER_SAVE` either. All three now go through `darner_core::ensure_outside_repo` before any work starts, as `DARNER_EMIT_DUMP` already did. The test that refused `DARNER_EMIT_DUMP` inside the repo now goes through all four switches, one at a time. Without this change, three of the four end on the missing input folder instead of `PolicyError::InsideRepo`. The switches that `darner-gpu` and `darner-hle` read during a run are not changed. ## How it was tested - Tested revision: f4dbb344 - Commands and results: - `cargo test -p darner`: unit tests 131 passed, 1 ignored; integration tests 2 + 2 + 8 passed. This includes `translate::tests::dump_inside_repo_is_refused`. - `cargo clippy -p darner --all-targets -- -D warnings`: no warnings. - Gameplay: not relevant (offline tools only). - Coverage gaps: - I ran the three workspace gates only for the `darner` package, without `--locked`. - The saves outside the repo were not exercised on real shaders. ## Checklist - [x] This PR contains one change based on `main`. - [x] The diff follows `docs/asset-policy.md`. - [x] I recorded this PR's dependencies below. - Depends on: none ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. - Related PRs: none found
Saved shaders are game-derived, and rule #1 keeps them out of the
repository. `translate` checked DARNER_EMIT_DUMP's folder, but not
those of DARNER_FAIL_DUMP and DARNER_DUMP_MATCH, and `shader-info` did
not check DARNER_SHADER_SAVE's. Each is now refused before any work, as
DARNER_EMIT_DUMP's is.

The test that refused DARNER_EMIT_DUMP inside the repo now goes through
all four switches, one at a time.

The switches darner-gpu and darner-hle read in a run are not changed.

Port of 0c50bf75 (2026-11-29) onto the new main.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
TrustNo1 manually merged commit aba7325497 into main 2026-12-03 20:19:18 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
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
TrustNo1/Darner!73
No description provided.