dillon1000/react
Commit
Browse files Add validation against instructions not part of their scope
Adds an internal compiler assertion pass which checks that all the instructions which are necessary for constructing a given scope correctly end up within the corresponding ReactiveScopeBlock. All known cases where this can occur are fixed earlier in the stack, but this assertion will help us catch any other cases we haven't thought of. See docblock comment for more info. ## Test Plan I manually reverted the fixes from the previous PRs while keeping the new fixtures, and verified that this new assertion pass flags the fixtures as invalid.
Changed paths4 files
First-parent comparisoncompiler/packages/babel-plugin-react-forget/src/Entrypoint/Pipeline.ts ModifiedM compiler/packages/babel-plugin-react-forget/src/ReactiveScopes/AlignReactiveScopesToBlockScopes.ts ModifiedA compiler/packages/babel-plugin-react-forget/src/ReactiveScopes/AssertScopeInstructionsWithinScope.ts AddedM compiler/packages/babel-plugin-react-forget/src/ReactiveScopes/index.ts ModifiedPatch
Files changed
Rendering syntax-highlighted changes…