StrictMode: dev double-invoke out of production artifacts (M1-T16, closes #24) - #104
Merged
Conversation
- ReactNode::StrictMode (transparent wrapper) + RuntimeTemplate.strict_mode flag (serde default false - absent in production JSON) - lower() production STRIPS StrictMode nodes (test: serialized artifact contains no 'StrictMode'); lower_dev() keeps the node and sets the flag; compile_source_dev for dev builds - Runtime: dev artifacts double-invoke layout AND passive effects (setup -> cleanup -> setup, log-verified) via run_effects/run_layout effects strict flag 4 tests in tests/strict_mode.rs; suite 153 green; clippy/fmt/audit clean. Records: M1 16/18 in progress, 52/106. Closes#24
Uh oh!
There was an error while loading. Please reload this page.
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 freeto 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.
What
Closes#24. React's dev-only StrictMode double-invocation, with the "kept out of production artifacts" requirement made structural:
ReactNode::StrictMode— transparent wrapper node;RuntimeTemplate.strict_modeflag (serde default false — production JSON simply omits it).lower()STRIPS StrictMode nodes into fragments — the test asserts the serialized artifact contains no"StrictMode"; devlower_dev()keeps the node and sets the flag (compile_source_dev).run_effects/run_layout_effectsrun setup → extract the body's value-position cleanup → run it → setup again. Log-verified (setup, cleanup, setup; production:setuponce).Verification
4 tests in
tests/strict_mode.rs: dev double-invoke vs production single, production artifact JSON has no marker/flag, dev artifact retains the marker. Suite 153 green; clippy-D warningsclean; fmt clean; audit green. Records: M1 16/18, overall 52/106.