Skip to content

fix(turbopack): evaluate pure constructor callees - #100588

Merged
mischnic merged 1 commit into
canaryfrom
fleet/side-effects-constructor-callee
Oct 22, 2026
Merged

mischnic merged 1 commit into
canaryfrom
fleet/side-effects-constructor-callee

Conversation

@mischnic

@mischnic mischnic commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

Summary

Preserve effects from evaluating a constructor callee even when construction is PURE-annotated. For example, /*#__PURE__*/ new (getConstructor())() must account for calling getConstructor().

Visit the callee before arguments, matching pure call handling. Add analyzer and execution regressions while preserving upstream PURE callback handling from #100577.

Independent of the callback stack (#100586 / #100587); rebase whichever lands later if their Expr::New edits overlap.

Verification

  • Full turbopack-ecmascript library: 609 tests passed.
  • Constructor-callee execution regression passed.
  • Rustfmt and diff checks passed. Full monorepo suite not run locally.

@github-actions github-actions Bot added created-by: Turbopack team PRs by the Turbopack team. Turbopack Related to Turbopack with Next.js. labels Oct 22, 2026
@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Tests Passed

Commit: e078dfc

Co-authored-by: Niklas Mischkulnig <4586894+mischnic@users.noreply.github.com>
@mischnic
mischnic force-pushed the fleet/side-effects-constructor-callee branch from a630a99 to e078dfc Compare October 22, 2026 14:37
@mischnic
mischnic requested a review from lukesandberg October 22, 2026 15:19
@mischnic
mischnic marked this pull request as ready for review October 22, 2026 15:19
@mischnic
mischnic merged commit 10cdcda into canary Oct 22, 2026
103 checks passed
@mischnic
mischnic deleted the fleet/side-effects-constructor-callee branch October 22, 2026 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

created-by: Turbopack team PRs by the Turbopack team. Turbopack Related to Turbopack with Next.js.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants