Skip to content

Ignore AppleDouble metadata in external shader inputs - #898

Open
thehobbit85 wants to merge 2 commits into
seedds:mainfrom
thehobbit85:codex/shader-appledouble
Open

thehobbit85 wants to merge 2 commits into
seedds:mainfrom
thehobbit85:codex/shader-appledouble

Conversation

@thehobbit85

@thehobbit85 thehobbit85 commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

macOS AppleDouble files such as ._ShaderArchive.ushaderbytecode keep the shader extension but contain metadata. The external shader directory scan passed them to the decoder and aborted with not a version 2 shader code archive; captured ._*.glslc files similarly failed with no GLSLC output.

Exclude only the ._ prefix in both listings, including environment overrides. Genuine dot-prefixed shader files remain inputs, and malformed real shader files still fail normally. The parsers and generated shader contents are unchanged.

Addresses the external-drive follow-up in #229, reported by 0tunguyen0. Refs #229, without closing it: the commenter used a different unnamed game, and the original Metroid Prime 4 reader/port has separate existing PRs.

Revision 65a311b48e3b6da18dfb1b4b91078ad00128d0d5 includes main 65501fbbaf8526f7aab0a1edd028135888590f8e. The external shader listings still admit AppleDouble sidecars on main.

Validation on 65a311b48e3b. python3 -m unittest dm.tools.tests.test_docs dm.tools.tests.test_split_appledouble — 13 tests passed.

GitHub checks for this revision

Earlier local validation on 420e716cf85a. python3 -m unittest dm.tools.tests.test_docs dm.tools.tests.test_nsp_chain dm.tools.tests.test_split_appledouble dm.tools.tests.test_split_gzip dm.tools.tests.test_nsp_incremental. All 87 tests passed. The fixtures exercise both external listings and upstream gzip discovery. They cover genuine hidden shaders, malformed real inputs and byte-identical outputs with sidecar files present.

Historical author validation: 32 focused tests, 840 tool tests with 16 optional skips and 177 graphics tests with 9 optional skips; all executed cases passed. The original negative checks failed on main before the fix. These broader unchanged suites were not repeated.

The affected game paths are external GLSLC capture files such as Fire Emblem: Three Houses, and decoded Unreal shader archives such as Octopath Traveler 0. Neither title was available for local validation.

@thehobbit85
thehobbit85 force-pushed the codex/shader-appledouble branch 5 times, most recently from d629271 to 1ba58e4 Compare November 2, 2026 15:49
Skip ._ metadata files in captured GLSLC and decoded Unreal archive
listings, including environment-selected directories. Preserve ordinary
hidden inputs and parser errors for malformed shader data.

Add complete CLI regressions using synthetic NSO and shader containers.
The four sidecar scenarios fail before this change and preserve all output
bytes afterwards. Malformed real inputs still fail.

Addresses the external-drive follow-up by 0tunguyen0:
seedds#229 (comment)
This does not resolve the original Metroid Prime 4 port request.
@thehobbit85
thehobbit85 force-pushed the codex/shader-appledouble branch from 1ba58e4 to 65a311b Compare November 2, 2026 17:44
@github-actions github-actions Bot added packing Building an IPA or a Mac app: the NSP script, extraction, the shader split, the packers tools Tools and scripts (dm/tools, scripts) docs Documentation labels Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation packing Building an IPA or a Mac app: the NSP script, extraction, the shader split, the packers tools Tools and scripts (dm/tools, scripts)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants