Skip to content

fix: preserve script objects in to-zen containers - #70

Open
mvanhorn wants to merge 2 commits into
trumank:masterfrom
mvanhorn:fix/50-preserve-script-objects
Open

fix: preserve script objects in to-zen containers#70
mvanhorn wants to merge 2 commits into
trumank:masterfrom
mvanhorn:fix/50-preserve-script-objects

Conversation

@mvanhorn

Copy link
Copy Markdown

Keep the existing to-zen discovery and deserialization of scriptobjects.bin, then serialize the parsed ZenScriptObjects into the generated container with IoStoreWriter::write_chunk and the global ScriptObjects chunk ID before finalization. Reuse the serialization and chunk-writing pattern already used by gen-script-objects, factoring only a small production helper if that makes the behavior directly testable from the existing inline test module. to-zen accepts a legacy input containing scriptobjects.bin and deserializes it so asset imports can be validated during conversion. The command does not add that metadata to the generated IoStore container, even though newer containers expect it in the global ScriptObjects chunk.

Convert or exercise the writer path with a valid scriptobjects.bin, reopen the generated container, and verify the global ScriptObjects chunk exists and deserializes successfully; Verify the preserved metadata retains the source script-object entries rather than writing an empty or example-specific chunk.

Fixes #50

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

to-legacy error

2 participants