test(treeshake): reduce manual-pure fixture to a minimal smoke test, move matrix to unit tests#10436
Merged
Merged
Conversation
✅ Deploy Preview for rolldown-rs canceled.
|
shulaoda
approved these changes
Jul 24, 2026
IWANABETHATGUY
force-pushed
the
test/manual-pure-fixture-to-unit
branch
from
July 24, 2026 16:08
9471f7b to
90723a9
Compare
IWANABETHATGUY
force-pushed
the
test/manual-pure-fixture-to-unit
branch
from
July 24, 2026 16:17
90723a9 to
ce19888
Compare
Member
Merge activity
|
hyfdev
force-pushed
the
test/manual-pure-fixture-to-unit
branch
from
July 25, 2026 03:18
ce19888 to
38548b8
Compare
…move matrix to unit tests (#10436) Follow-up to #10427 / #10432 (both merged). There's exactly one JS-side `manualPureFunctions` test — the `manual-pure-functions` fixture (added in #10427). It re-tested the retain/remove behavior matrix that the Rust `stmt_eval_analyzer` unit tests already own. A JS fixture only needs to smoke-test that the option is wired through the pipeline; the exhaustive behavior belongs in fast, precise Rust unit tests. ## Changes - **Fixture → minimal smoke test.** `main.js` is now a single case: a listed function's call (`` styled.div`...` ``) is dropped, leaving just `import "styled-components";`. That alone proves the `manualPureFunctions` option reaches the pipeline — without it, the call would be retained. Snapshot regenerated against a fresh debug build. - **Rust unit test.** `test_manual_pure_chains_without_eager_children_are_side_effect_free` covers the removed shapes (`make.div`, `` make.div`x` ``, `make?.div()`, `make()()`, `make().div()`) that previously had end-to-end-only coverage. The retained-child and spread matrices were already unit-tested (`test_manual_pure_chains_keep_eager_child_side_effects`, `test_manual_pure_chains_drop_side_effect_free_spreads`). Test-only; no behavior change.
graphite-app
Bot
force-pushed
the
test/manual-pure-fixture-to-unit
branch
from
July 25, 2026 03:23
38548b8 to
87b0239
Compare
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.
Follow-up to #10427 / #10432 (both merged).
There's exactly one JS-side
manualPureFunctionstest — themanual-pure-functionsfixture (added in #10427). It re-tested the retain/remove behavior matrix that the Ruststmt_eval_analyzerunit tests already own. A JS fixture only needs to smoke-test that the option is wired through the pipeline; the exhaustive behavior belongs in fast, precise Rust unit tests.Changes
main.jsis now a single case: a listed function's call (styled.div`...`) is dropped, leaving justimport "styled-components";. That alone proves themanualPureFunctionsoption reaches the pipeline — without it, the call would be retained. Snapshot regenerated against a fresh debug build.test_manual_pure_chains_without_eager_children_are_side_effect_freecovers the removed shapes (make.div,make.div`x`,make?.div(),make()(),make().div()) that previously had end-to-end-only coverage. The retained-child and spread matrices were already unit-tested (test_manual_pure_chains_keep_eager_child_side_effects,test_manual_pure_chains_drop_side_effect_free_spreads).Test-only; no behavior change.