Discover shaders and pipeline packs through file symlinks #2474
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2476"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from Marvisak/VIctory. Originally posted by DoubleD17 on 2026-11-25T14:20:41Z.
On Marvisak main,
translate,translate --cache, and pipeline pack discovery skip symbolic links to files before reading them. This adapts fxceless/victory-fork #971 to the original CLI. The shared filter accepts a link when its target is a regular file of at most 2 GiB. It preserves directory traversal and each mode's metadata handling for regular files. Synthetic tests on Windows x64 withdiagnosticscompared main940d32fand candidate9d0656c. Both translation and cache warm-up found 1/0/0 on main and 1/1/1 on the candidate across the direct file, explicit symlink, and directory containing the file symlink. Cache checks also verified persisted entries. Broken links, nested directory links, and oversized targets stayed excluded. An explicit directory link worked on both revisions. In key-listing mode, both revisions found a direct synthetic empty pack. The candidate also found it through both file-link inputs. Pack selection happened on the CPU before WARP initialization, and the test created and loaded zero pipelines.AI-assisted.
Imported from Marvisak/VIctory. Originally posted by DenRakEiw on 2026-11-25T14:34:26Z.
Review: APPROVED
Verified against
origin/main(940d32f):victorytests.cargo test -p victory: 12/12 passed.cargo clippy -p victory --all-targets -- -D warnings: 0 warnings.cargo xtask policy: 183 files ok.AI-assisted (Gemini 4 Neon).
Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-25T14:57:40Z.
Review: COMMENTED
Discover shaders and pipeline packs through symlinks (apps/victory). Small refactor of shader_files; can't test the apps crate on macOS until #2334 merges. Static review: the dedup-by-canonical-path logic looks right.
Imported from Marvisak/VIctory. Originally posted by cloph-dsp on 2026-11-25T15:42:40Z.
Independent local validation for PR #2476 (Windows, Rust 1.100.0/MSVC, head
73ef2eb, no game data):cargo test --locked -p victory --bins-> 10 tests passed, 0 failed, exit 0. CPU-only regression run; synthetic symlink discovery scenario not replayed. AI-assisted (Hy4 flash). GPU/driver N/A (CPU tooling).Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T15:54:30Z.
Automated triage for the maintainers.
This moves the four copies of the input walk in
apps/victory(shader::run,translate::run,translate::warm,prebuild::run) into oneshader_filesfilter that also accepts a symlink whose target is a regular file of at mostMAX_FILE, so linked shader files and packs are no longer skipped. By reading, each caller keeps its old metadata policy (the three CLI modes still accept an entry whose metadata cannot be read, prebuild still rejects it,shader::runstill prints "skipping large file"), and links to directories are still not traversed. CI: passing.Generated by Claude Code
Imported from Marvisak/VIctory. Originally posted by kotekompotek on 2026-11-25T16:54:00Z.
Semantics preserved correctly: for regular files the same
is_file && len <= MAX_FILEtest; for symlinksfs::metadatafollows the link so a symlink to a file is now included wherefile_type().is_file()used to drop it — that's the advertised change.allow_missing_metadatakeeps each caller's old policy (translate/warm/shader-info included them, prebuild skipped). Large-file notice only where it was before.One gap: a symlink to a directory is still skipped —
metadata.is_file()fails and WalkDir doesn't follow dir links, sogame_dirtrees assembled via directory junctions still aren't scanned. If that's the actual layout motivation,follow_links(true)(plus cycle protection) is the real fix; file-level symlinks alone may be enough for the reported case — worth stating which scenario prompted this.Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-26T02:05:47Z.
Review: COMMENTED
Reviewed and verified against
main(63bcca43) on Windows 11 — clean consolidation and ready to merge:shader_files/scan_shader_files(apps/victory/src/shader.rs:18-52) keepsWalkDirwithfollow_links(false)(avoiding directory symlink loops) while resolving file symlinks viastd::fs::metadata(target.is_file() && target.len() <= MAX_FILE), safely skipping broken symlinks.> MAX_FILEare filtered silently without callingon_large_fileunlike regular files atshader.rs:37-38, and no symlink-specific unit test is included.)Local verification:
cargo test --locked -p victory: 18/18 passed (14unit +census+census_unreadable+translate)cargo clippy --locked -p victory --tests -- -D warnings(default &--all-features): 0 warningscargo xtask policy: 191 files okView command line instructions
Checkout
From your project repository, check out a new branch and test the changes.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.