Reject unknown kit collection names - #2
Open
kvnloo wants to merge 1 commit into
Open
Conversation
Kit.count returned 1 for a missing collection (|| 1), so a typo compiled to COL[typo][0] and dropped at instance time. Throw instead, and pin generator COL/OBJ names against kit_manifest.json.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Kit.countusedchildren.length || 1for missing collections. A typo'd mesh name (e.g.ground side wallvs the live Blender spellinggroud side wall) compiled toCOL[typo][0]and vanished at instance time with only a console warning.This throws on unknown/empty collection names, parses
COL[name][index]/OBJ[name], and pins everyCOL()/OBJ()ingenerator.tsagainstpublic/assets/kit_manifest.json.Not the facade-lights port (fork PR #1 / PER-361). README 18-slider claim untouched.
Verify:
npx tsc --noEmitandnpx tsx --test tools/kitNames.test.ts.