Skip to content

test(treeshake): reduce manual-pure fixture to a minimal smoke test, move matrix to unit tests#10436

Merged
graphite-app[bot] merged 1 commit into
mainfrom
test/manual-pure-fixture-to-unit
Jul 25, 2026
Merged

test(treeshake): reduce manual-pure fixture to a minimal smoke test, move matrix to unit tests#10436
graphite-app[bot] merged 1 commit into
mainfrom
test/manual-pure-fixture-to-unit

Conversation

@IWANABETHATGUY

@IWANABETHATGUY IWANABETHATGUY commented Jul 24, 2026

Copy link
Copy Markdown
Member

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.

@netlify

netlify Bot commented Jul 24, 2026

Copy link
Copy Markdown

Deploy Preview for rolldown-rs canceled.

Name Link
🔨 Latest commit 87b0239
🔍 Latest deploy log https://app.netlify.com/projects/rolldown-rs/deploys/6a642c1a62396b000851fdad

@IWANABETHATGUY
IWANABETHATGUY force-pushed the test/manual-pure-fixture-to-unit branch from 9471f7b to 90723a9 Compare July 24, 2026 16:08
@IWANABETHATGUY IWANABETHATGUY changed the title test(treeshake): reduce manual-pure fixture to a smoke test, move matrix to unit tests test(treeshake): reduce manual-pure fixture to a minimal smoke test, move matrix to unit tests Jul 24, 2026
@IWANABETHATGUY
IWANABETHATGUY force-pushed the test/manual-pure-fixture-to-unit branch from 90723a9 to ce19888 Compare July 24, 2026 16:17

hyfdev commented Jul 24, 2026

Copy link
Copy Markdown
Member

Merge activity

  • Jul 24, 4:18 PM UTC: The merge label 'graphite: merge-when-ready' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Jul 25, 3:22 AM UTC: hyfdev added this pull request to the Graphite merge queue.
  • Jul 25, 3:28 AM UTC: Merged by the Graphite merge queue.

@hyfdev
hyfdev force-pushed the test/manual-pure-fixture-to-unit branch from ce19888 to 38548b8 Compare July 25, 2026 03:18
…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
graphite-app Bot force-pushed the test/manual-pure-fixture-to-unit branch from 38548b8 to 87b0239 Compare July 25, 2026 03:23
@graphite-app
graphite-app Bot merged commit 87b0239 into main Jul 25, 2026
34 of 35 checks passed
@graphite-app
graphite-app Bot deleted the test/manual-pure-fixture-to-unit branch July 25, 2026 03:28
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.

3 participants