Skip to content

fix(code-splitting): avoid creating call-site-triggered entry facades - #10485

Merged
graphite-app[bot] merged 1 commit into
mainfrom
fix/strict-order-create-facade-collapse
Jul 28, 2026
Merged

graphite-app[bot] merged 1 commit into
mainfrom
fix/strict-order-create-facade-collapse

Conversation

@hyfdev

@hyfdev hyfdev commented Jul 27, 2026 •

Copy link
Copy Markdown
Member

With strict execution order, a dynamically imported entry can still emit a one-purpose facade file even when every live import can initialize it directly. This PR removes those redundant files in both strict modes while preserving the value and initialization observed by the importing promise.

// before: the import loads a separate file whose only effect is activation
await import("./page-b2.js");
// page-b2.js
import { t as init_page_b } from "./page-b.js";
init_page_b();

// after: the import activates the implementation directly
await import("./page-b.js").then((n) => (n.t(), n.n));
// page-b2.js is not emitted

Problem

Each affected dynamic entry adds one emitted chunk and an extra module load without adding user code. On LobeHub wrap-all, #10456 still emits 1577 chunks, 59 more than the non-strict build; 58 of those are these activation-only facades.

The extra file appears when strict execution order wraps a pure dynamic entry whose implementation still owns its entry chunk. It can happen in both wrap-all and on-demand modes; wrap-all reaches it more often because it wraps every eligible module.

Strict lowering has two ways for such a facade to survive. The restore pass (which revives a facade removed by chunk optimization) already uses the call-site trigger policy from #10456. The creation pass, create_order_wrap_entry_facades (which splits an inline entry initializer into its own file), still decides from chunk loading alone and never asks whether every live import() can carry that initializer. The same output shape therefore keeps or removes a facade depending on which pass produced it.

Collapsing the facade also means the implementation chunk must publish the namespace value that the facade used to return. That interface cannot be reconstructed from a stale retained-symbol set: aliases can widen it beyond the dynamic import's actual export usage, and a getter such as x: () => x can be rendered even when x is neither declared nor imported in the chunk. Reading or spreading that namespace then throws a ReferenceError.

Non-strict builds are unaffected. Strict builds still retain a real facade for user or emitted entries, entries without a live import() call site, two-argument import(), TLA-tainted targets, host namespaces that may expose callable then, entries whose direct or transitive export-star chain reaches an external module, and facades already restored because another collapse proof failed.

For the dynamic entries that do collapse, output-hook metadata changes with the file topology: the implementation is reported as a common chunk, so isDynamicEntry becomes false, facadeModuleId becomes null, and exports reports the common chunk's emitted linkage names instead of the facade's entry export list. Manifest and plugin consumers that key on entry metadata will therefore stop seeing a separate dynamic entry for exactly these removed facades; this is the same contract choice already made for optimizer-removed facades in #10456.

Fix

Use the same call-site proof when creating and restoring strict entry facades. When a pure dynamic entry has an initializer and every surviving import() can be rewritten safely, its implementation becomes a common chunk, each import points to that chunk and runs the initializer before resolving, and no separate facade is emitted.

Removing the facade also removes the namespace object it would have exported. Strict lowering now records the exact export names selected by DynamicImportExportsUsage and materializes that narrowed interface in the implementation chunk. Its synthetic statement references every non-inlined binding behind those getters, allowing normal cross-chunk linking to keep, export, and import each getter target after the entry becomes a common chunk. Smart inline constants omit that reference only when the individual binding is actually safe to inline. If the namespace also has a real semantic consumer, that complete interface overrides the narrowing. This keeps the ExportAll runtime demand without turning a synthetic narrow namespace into an opaque user namespace read or initializing unrelated re-exports.

Entry-level external stars are rendered on the facade chunk and keep that facade in every format. ESM would lose its chunk-level export * from "external" statement after reclassification. CJS-like formats would replace the facade's deduplicated Object.keys merge with one module-local __reExport per direct record; that differs for primitive module values and duplicate records, while a transitive external star is not available from the entry module's direct records at all. The provisional chunk's entry_level_external_module_idx covers both direct and transitive chains, so one format-independent guard preserves the complete interface and its existing merge behavior.

This deliberately takes the same ordering tradeoff as #10456: the initializer runs in the rewritten import's promise continuation, one microtask after the host chunk settles, instead of during facade-module evaluation. The importing promise still resolves only after initialization, but a microtask queued during host evaluation can observe the target before it runs. Keeping the facade would preserve that timing but keep all 58 files; using different timing solely based on which lowering pass produced the facade would be inconsistent.

Entries with no import() call site, including the remaining LobeHub HTML entry, are intentionally unchanged. LobeHub therefore moves from 1577 to 1519 chunks rather than to the 1518-chunk non-strict baseline.

The analogous external-star loss in the pre-existing non-strict chunk optimizer is not changed here. It already reproduces on main without strict execution order and is being fixed independently in #10492, rather than adding another dependency to this stack.

Validation

  • retained_star_renamed_cycle now spreads the emitted synthetic namespace at runtime and asserts its exact keys are ['_', 'common']. This fails on the reviewed revision because the namespace contains a dangling x getter and an alias-widened commonLeaf getter.
  • New retained_star_opaque_cycle spreads the source-level dynamic namespace and asserts the complete interface. Its snapshots pin the cross-chunk import that backs x, so a genuine semantic namespace consumer cannot be accidentally narrowed.
  • New retained_star_smart_constant_cycle pins the smart inline-constant boundary in both strict modes: a getter's backing reference is omitted only when that exact constant can actually be inlined.
  • The direct and transitive ESM external-star fixtures are red without the guard because the resolved import() namespace loses externalValue. With the guard, each snapshot retains a facade carrying export * from "external", and runtime assertions observe x === 1, externalValue === 42, and the expected initialization order.
  • New cjs_dynamic_entry_external_star_keeps_facade pins why direct CJS stars also keep the facade: a duplicated Proxy external is enumerated once, while a primitive external contributes its enumerable 0 and 1 keys. A collapsed module-local namespace would enumerate the Proxy twice and omit the primitive keys.
  • New cjs_dynamic_entry_transitive_external_star reproduces the reported target -> barrel -> external loss. It is red before the guard with undefined !== 42; the fixed snapshot retains the facade's chunk-level external merge and the runtime assertion observes externalValue === 42.
  • The related retained-star, fanout, namespace, and external-star fixtures pass, as do all 12 strict-order invariant tests.
  • LobeHub wrap-all emits 1518 .js files and one .mjs; all 1519 pass node --check. Expanding the external-star guard to every format does not change this ESM measurement, so all 58 chunk reductions remain. This measurement covers production output topology and syntax, not browser E2E behavior.
  • The output-hook metadata change is source-verified but is not pinned by a dedicated plugin or manifest fixture in this PR.
  • Targeted clippy for Rolldown, the all-features workspace check, Rust and repository formatting, filename lint, and git diff --check pass. Full-workspace clippy remains locally blocked by the pre-existing reasonless #[ignore] generated in the isolated-declaration test.

Part of #10294.

hyfdev commented Jul 27, 2026 •

Copy link
Copy Markdown
Member Author

How to use the Graphite Merge Queue

Add the label graphite: merge-when-ready to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@hyfdev

This comment was marked as resolved.

@hyfdev
hyfdev force-pushed the fix/strict-order-create-facade-collapse branch from f3a2057 to 089a0d6 Compare July 27, 2026 16:28
@hyfdev

This comment was marked as resolved.

@hyfdev
hyfdev marked this pull request as ready for review July 27, 2026 16:50
Copilot AI review requested due to automatic review settings July 27, 2026 16:50

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@codspeed

codspeed Bot commented Jul 27, 2026 •

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 7 untouched benchmarks
⏩ 10 skipped benchmarks1


Comparing fix/strict-order-create-facade-collapse (caf163a) with main (7166d9d)

Open in CodSpeed

Footnotes

  1. 10 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

@hyfdev
hyfdev force-pushed the fix/strict-order-create-facade-collapse branch from 089a0d6 to ddb298c Compare July 27, 2026 17:07
@graphite-app
graphite-app Bot changed the base branch from cross-chunk-dynamic-trigger-final to graphite-base/10485 July 27, 2026 17:19
@graphite-app
graphite-app Bot force-pushed the graphite-base/10485 branch from f3bea99 to c909488 Compare July 27, 2026 17:27
@graphite-app
graphite-app Bot force-pushed the fix/strict-order-create-facade-collapse branch from ddb298c to aa7f459 Compare July 27, 2026 17:27
@graphite-app
graphite-app Bot changed the base branch from graphite-base/10485 to main July 27, 2026 17:28
@graphite-app
graphite-app Bot force-pushed the fix/strict-order-create-facade-collapse branch from aa7f459 to 238ea61 Compare July 27, 2026 17:28
@netlify

netlify Bot commented Jul 27, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for rolldown-rs ready!

Name Link
🔨 Latest commit 17f5824
🔍 Latest deploy log https://app.netlify.com/projects/rolldown-rs/deploys/6a683d9d55ccc30008c1acbb
😎 Deploy Preview https://deploy-preview-10485--rolldown-rs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@IWANABETHATGUY

This comment was marked as resolved.

@hyfdev
hyfdev force-pushed the fix/strict-order-create-facade-collapse branch from 238ea61 to 52f840a Compare July 28, 2026 04:00
@IWANABETHATGUY

Copy link
Copy Markdown
Member

Went through the create-path collapse and most of it holds up, but I hit one correctness regression while checking the new snapshots: a collapsed entry's simulated namespace can emit getters over bindings that no longer exist in the output, so touching the namespace throws.

This PR's own updated retained_star_renamed_cycle/artifacts.snap pins it. page-a.js now emits:

var page_a_exports = /* @__PURE__ */ __exportAll({
	_: () => _,
	common: () => common,
	commonLeaf: () => common,
	x: () => x
});

There is no x in that chunk — not declared, not imported. It comes from bridge.js, which sits in the page-b chunk, and in the new output its declaration is gone from there as well (the old output still carried function x() { return 1; } in page-b.js).

I ran the emitted chunk from the snapshot as-is:

const ns = (await import('./page-a.js')).n;
ns.x;       // ReferenceError: x is not defined
({ ...ns }); // ReferenceError: x is not defined

So any consumer that reads .x — or just spreads/enumerates the resolved namespace, which is a pretty ordinary thing to do — throws. On the base branch this was undefined (the page-a2.js facade exported only _ and common). CI stays green because the fixture's _test.mjs only touches pageA.common / pageA._.

What I believe is happening: the getter map is built from canonical_exports filtered by retained_export_symbols (module_finalizers/mod.rs:770-787), a link-time set. Before this PR, the liveness backing those getters ran through the facade — a real EntryPoint chunk computes entry-signature exports (compute_cross_chunk_links.rs:962-1033), which created the cross-chunk demand that kept the star-re-exported x alive and exported from the page-b chunk. After the collapse the chunk is Common, so that branch never runs; the absorbed-facade branch only publishes the namespace ref and init_* (compute_cross_chunk_links.rs:1048-1074), and the synthetic statement is registered with referenced_symbols: vec![] (order_wrap_state.rs:259-265). Nothing imports x into the page-a chunk or keeps its declaration alive in page-b, yet the finalizer still renders the getter from the stale retained set.

Worth noting the gate never consults DynamicImportExportsUsage, so source code that does { ...await import('./page-a.js') } still takes the collapse and still throws — this isn't limited to exotic consumers.

Smaller observation, same mechanism: the map includes commonLeaf but silently drops underscoreLeaf, even though both canonically resolve to retained symbols (common / _). Membership depends on whether the export's own symbol_ref (rather than its canonical form) happens to be in retained_export_symbols, so the emitted interface is neither the old facade's list (_, common) nor the complete one.

I guess it should be fixed in #10492 (comment), but it is not stacked on the current branch

@hyfdev

hyfdev commented Jul 28, 2026 •

Copy link
Copy Markdown
Member Author

@IWANABETHATGUY Fixed in this PR already. I'll check what #10492 needs to be done separately.

---edited

#10492 fixes a separate optimizer issue. No need to connect to this PR.

@IWANABETHATGUY

Copy link
Copy Markdown
Member

Found a second silent-loss case while poking at the collapse: in CJS output, a collapsed dynamic entry that reaches an external star only transitively (target → export * from './barrel.js' → export * from 'external') loses the external's exports from the resolved import() namespace.

The ESM guard at order_wrapping.rs:429-430 is format-scoped, so CJS collapses unconditionally — which is fine for the direct case, because the simulated namespace compensates via __reExport(target_exports, require("external")). But that compensation (the helper check at order_wrapping.rs:442-448 and the CJS arm of the namespace renderer in module_finalizers/mod.rs) only iterates the entry's own star_exports_from_external_modules. The transitive fact lives in the chunk-level entry_level_external_module_idx, and in CJS that is only rendered by the ChunkKind::EntryPoint branch of render_chunk_exports.rs — the Object.keys(require("external")).forEach(...) merge the facade used to carry. The collapse turns the chunk into Common, so that render disappears, and the barrel chain can't step in either: pass 1 of find_entry_level_external_module already re-propagated has_dynamic_exports = false on the contract that the entry chunk file would carry the star, so the barrel's namespace is never included. Net result: require("external") appears nowhere in the output.

On this branch the namespace comes out as __exportAll({ x: () => 1 }) and namespace.externalValue is undefined; on the merge-base the same graph keeps the facade with the chunk-level external merge and resolves 42. The restore path has no equivalent condition either, though that half predates this PR.

Here's the repro as a ready-to-drop-in integration fixture — the CJS twin of this PR's own esm_dynamic_entry_transitive_external_star_keeps_facade. It currently fails with undefined !== 42 and passes on the merge-base. I deliberately left out artifacts.snap, since its shape depends on which way the fix goes (facade retention vs. reconstructing the interface):

crates/rolldown/tests/rolldown/function/experimental/strict_execution_order/cjs_dynamic_entry_transitive_external_star/

Fixture files

_config.json

{
  "_comment": "A wrapped CJS dynamic entry can reach an external star only transitively (target -> export * barrel -> export * external). The exports of that external must stay observable on the resolved import() namespace: the entry-level external fact covers the whole chain, while the simulated-namespace merge only sees the entry's direct records, so collapsing the facade must not drop the transitive external interface.",
  "configName": "wrap-all",
  "config": {
    "external": ["external"],
    "format": "cjs",
    "preserveEntrySignatures": "allow-extension",
    "strictExecutionOrder": true,
    "codeSplitting": {
      "includeDependenciesRecursively": false,
      "groups": [
        {
          "name": "reader",
          "test": "[\\\\/]reader\\.js$"
        }
      ]
    },
    "experimental": {
      "attachDebugInfo": "full"
    }
  },
  "hiddenRuntimeModule": false
}

main.js

export const loaded = import('./target.js').then((namespace) => namespace);

target.js

import { read } from './reader.js';

globalThis.__externalStarLog.push('target');

export const x = 1;
read();

export * from './barrel.js';

barrel.js

export * from 'external';

reader.js

import { x } from './target.js';

export function read() {
  globalThis.__externalStarLog.push(`reader:${x}`);
}

node_modules/external/package.json

{
  "name": "external",
  "main": "./index.js"
}

node_modules/external/index.js

module.exports = { externalValue: 42 };

_test.mjs

import assert from 'node:assert';
import { createRequire } from 'node:module';

const require = createRequire(import.meta.url);

globalThis.__externalStarLog = [];

const main = require('./dist/main.js');
const namespace = await main.loaded;
assert.strictEqual(namespace.x, 1);
assert.strictEqual(
  namespace.externalValue,
  42,
  'transitive external star exports must survive on the resolved dynamic-import namespace',
);
assert.deepStrictEqual(globalThis.__externalStarLog, ['target', 'reader:1']);

delete globalThis.__externalStarLog;

Run with cargo test -p rolldown --test integration cjs_dynamic_entry_transitive_external_star.

One thing I checked so it doesn't get assumed away: #10492 does not cover this. I merged it onto this branch locally and the fixture still fails — its mark_simulated_facade_export_star_chain / entry_level_external_star_keeps_dynamic_exports machinery is only invoked from the chunk optimizer's elimination loop, and the create-path collapse here never sets SimulateFacadeChunk on the chain. Same result with #10488 stacked on top as well.

Unrelated heads-up from that experiment: #10488 and this PR merge cleanly but don't compile together — #10488 removes OrderSyntheticStmt.owner while insert_simulated_facade_namespace here constructs it (E0560 at order_wrap_state.rs:330).

@hyfdev

hyfdev commented Jul 28, 2026

Copy link
Copy Markdown
Member Author

#10488 is for another situation. let's focus on this one and see how to integrate #10488 after #10485.

@hyfdev
hyfdev force-pushed the fix/strict-order-create-facade-collapse branch from 52f840a to 21c6ff0 Compare July 28, 2026 04:29
@hyfdev
hyfdev force-pushed the fix/strict-order-create-facade-collapse branch from 21c6ff0 to caf163a Compare July 28, 2026 04:31

hyfdev commented Jul 28, 2026 •

Copy link
Copy Markdown
Member Author

Merge activity

  • Jul 28, 5:19 AM 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 28, 5:19 AM UTC: hyfdev added this pull request to the Graphite merge queue.
  • Jul 28, 5:33 AM UTC: Merged by the Graphite merge queue.

…#10485)

With strict execution order, a dynamically imported entry can still emit a one-purpose facade file even when every live import can initialize it directly. This PR removes those redundant files in both strict modes while preserving the value and initialization observed by the importing promise.

```js
// before: the import loads a separate file whose only effect is activation
await import("./page-b2.js");
// page-b2.js
import { t as init_page_b } from "./page-b.js";
init_page_b();

// after: the import activates the implementation directly
await import("./page-b.js").then((n) => (n.t(), n.n));
// page-b2.js is not emitted
```

## Problem

Each affected dynamic entry adds one emitted chunk and an extra module load without adding user code. On LobeHub wrap-all, #10456 still emits 1577 chunks, 59 more than the non-strict build; 58 of those are these activation-only facades.

The extra file appears when strict execution order wraps a pure dynamic entry whose implementation still owns its entry chunk. It can happen in both wrap-all and on-demand modes; wrap-all reaches it more often because it wraps every eligible module.

Strict lowering has two ways for such a facade to survive. The restore pass (which revives a facade removed by chunk optimization) already uses the call-site trigger policy from #10456. The creation pass, `create_order_wrap_entry_facades` (which splits an inline entry initializer into its own file), still decides from chunk loading alone and never asks whether every live `import()` can carry that initializer. The same output shape therefore keeps or removes a facade depending on which pass produced it.

Collapsing the facade also means the implementation chunk must publish the namespace value that the facade used to return. That interface cannot be reconstructed from a stale retained-symbol set: aliases can widen it beyond the dynamic import's actual export usage, and a getter such as `x: () => x` can be rendered even when `x` is neither declared nor imported in the chunk. Reading or spreading that namespace then throws a `ReferenceError`.

Non-strict builds are unaffected. Strict builds still retain a real facade for user or emitted entries, entries without a live `import()` call site, two-argument `import()`, TLA-tainted targets, host namespaces that may expose callable `then`, entries whose direct or transitive export-star chain reaches an external module, and facades already restored because another collapse proof failed.

For the dynamic entries that do collapse, output-hook metadata changes with the file topology: the implementation is reported as a common chunk, so `isDynamicEntry` becomes `false`, `facadeModuleId` becomes `null`, and `exports` reports the common chunk's emitted linkage names instead of the facade's entry export list. Manifest and plugin consumers that key on entry metadata will therefore stop seeing a separate dynamic entry for exactly these removed facades; this is the same contract choice already made for optimizer-removed facades in #10456.

## Fix

Use the same call-site proof when creating and restoring strict entry facades. When a pure dynamic entry has an initializer and every surviving `import()` can be rewritten safely, its implementation becomes a common chunk, each import points to that chunk and runs the initializer before resolving, and no separate facade is emitted.

Removing the facade also removes the namespace object it would have exported. Strict lowering now records the exact export names selected by `DynamicImportExportsUsage` and materializes that narrowed interface in the implementation chunk. Its synthetic statement references every non-inlined binding behind those getters, allowing normal cross-chunk linking to keep, export, and import each getter target after the entry becomes a common chunk. Smart inline constants omit that reference only when the individual binding is actually safe to inline. If the namespace also has a real semantic consumer, that complete interface overrides the narrowing. This keeps the `ExportAll` runtime demand without turning a synthetic narrow namespace into an opaque user namespace read or initializing unrelated re-exports.

Entry-level external stars are rendered on the facade chunk and keep that facade in every format. ESM would lose its chunk-level `export * from "external"` statement after reclassification. CJS-like formats would replace the facade's deduplicated `Object.keys` merge with one module-local `__reExport` per direct record; that differs for primitive module values and duplicate records, while a transitive external star is not available from the entry module's direct records at all. The provisional chunk's `entry_level_external_module_idx` covers both direct and transitive chains, so one format-independent guard preserves the complete interface and its existing merge behavior.

This deliberately takes the same ordering tradeoff as #10456: the initializer runs in the rewritten import's promise continuation, one microtask after the host chunk settles, instead of during facade-module evaluation. The importing promise still resolves only after initialization, but a microtask queued during host evaluation can observe the target before it runs. Keeping the facade would preserve that timing but keep all 58 files; using different timing solely based on which lowering pass produced the facade would be inconsistent.

Entries with no `import()` call site, including the remaining LobeHub HTML entry, are intentionally unchanged. LobeHub therefore moves from 1577 to 1519 chunks rather than to the 1518-chunk non-strict baseline.

The analogous external-star loss in the pre-existing non-strict chunk optimizer is not changed here. It already reproduces on `main` without strict execution order and is being fixed independently in #10492, rather than adding another dependency to this stack.

## Validation

- `retained_star_renamed_cycle` now spreads the emitted synthetic namespace at runtime and asserts its exact keys are `['_', 'common']`. This fails on the reviewed revision because the namespace contains a dangling `x` getter and an alias-widened `commonLeaf` getter.
- New `retained_star_opaque_cycle` spreads the source-level dynamic namespace and asserts the complete interface. Its snapshots pin the cross-chunk import that backs `x`, so a genuine semantic namespace consumer cannot be accidentally narrowed.
- New `retained_star_smart_constant_cycle` pins the smart inline-constant boundary in both strict modes: a getter's backing reference is omitted only when that exact constant can actually be inlined.
- The direct and transitive ESM external-star fixtures are red without the guard because the resolved `import()` namespace loses `externalValue`. With the guard, each snapshot retains a facade carrying `export * from "external"`, and runtime assertions observe `x === 1`, `externalValue === 42`, and the expected initialization order.
- New `cjs_dynamic_entry_external_star_keeps_facade` pins why direct CJS stars also keep the facade: a duplicated Proxy external is enumerated once, while a primitive external contributes its enumerable `0` and `1` keys. A collapsed module-local namespace would enumerate the Proxy twice and omit the primitive keys.
- New `cjs_dynamic_entry_transitive_external_star` reproduces the reported `target -> barrel -> external` loss. It is red before the guard with `undefined !== 42`; the fixed snapshot retains the facade's chunk-level external merge and the runtime assertion observes `externalValue === 42`.
- The related retained-star, fanout, namespace, and external-star fixtures pass, as do all 12 strict-order invariant tests.
- LobeHub wrap-all emits 1518 `.js` files and one `.mjs`; all 1519 pass `node --check`. Expanding the external-star guard to every format does not change this ESM measurement, so all 58 chunk reductions remain. This measurement covers production output topology and syntax, not browser E2E behavior.
- The output-hook metadata change is source-verified but is not pinned by a dedicated plugin or manifest fixture in this PR.
- Targeted clippy for Rolldown, the all-features workspace check, Rust and repository formatting, filename lint, and `git diff --check` pass. Full-workspace clippy remains locally blocked by the pre-existing reasonless `#[ignore]` generated in the isolated-declaration test.

Part of #10294.
@graphite-app
graphite-app Bot force-pushed the fix/strict-order-create-facade-collapse branch from caf163a to 17f5824 Compare July 28, 2026 05:26
@graphite-app
graphite-app Bot merged commit 17f5824 into main Jul 28, 2026
35 checks passed
@graphite-app
graphite-app Bot deleted the fix/strict-order-create-facade-collapse branch July 28, 2026 05:33
@rolldown-guard rolldown-guard Bot mentioned this pull request Jul 29, 2026
shulaoda added a commit that referenced this pull request Jul 29, 2026
## [1.2.1] - 2026-07-29

### 🚀 Features

- dev: support `hotUpdate` hook (#10305) by @h-a-n-a
- dev: expose `disableWatcher` through the dev engine bindings (#10474) by @shulaoda
- plugin: surface output-option callbacks in [PLUGIN_TIMINGS] (#10411) by @IWANABETHATGUY
- `import.meta.ROLLDOWN_FILE_URL_<referenceId>_<urlId>` support to pass context to `resolveFileUrl` hook (#10297) by @sapphi-red
- dev: skip the HMR update when a module's rebuilt output is unchanged (#10333) by @h-a-n-a
- code-splitting: wrap strict execution order modules on demand (#10104) by @hyfdev
- support `import.meta.ROLLDOWN_FILE_URL_*` (#10296) by @sapphi-red
- implement `resolveFileUrl` plugin hook (#10291) by @sapphi-red
- magic-string: support storeName on overwrite/update (#10312) by @IWANABETHATGUY

### 🐛 Bug Fixes

- external: keep `__toESM` when the importing module is tree-shaken (#10516) by @IWANABETHATGUY
- dev: resolve re-exports from externals through a real import (#10489) by @tbvjaos510
- code-splitting: route CJS barrel initialization per consumer (#10488) by @hyfdev
- error: align filename-pattern diagnostics with Rollup's wording (#10501) by @IWANABETHATGUY
- plugin: validate emitted prebuilt-chunk file names (#10399) by @IWANABETHATGUY
- code-splitting: point a two-argument dynamic import at the chunk that holds the module (#10479) by @hyfdev
- common: align is_path_fragment with Rollup's isPathFragment (#10398) by @IWANABETHATGUY
- code-splitting: never name an internal chunk export `then` (#10480) by @hyfdev
- code-splitting: avoid creating call-site-triggered entry facades (#10485) by @hyfdev
- code-splitting: collect top-level eager order reasons in every strict build (#10463) by @hyfdev
- code-splitting: let a cross-chunk dynamic importer carry the order trigger (#10456) by @hyfdev
- code-splitting: avoid the dynamic-entry facade when the same-chunk collapse carries the trigger (#10433) by @hyfdev
- binding: forward resolveId options.kind to callable builtin plugins (#10440) by @martijnwalraven
- dev: keep the export name of `export * as ns from` (#10476) by @tbvjaos510
- code-splitting: only split an entry facade when something else can load its chunk (#10441) by @hyfdev
- code-splitting: fold the runtime chunk back after order lowering (#10414) by @hyfdev
- runtime: don't leave default undefined for cjs that fakes __esModule (#10453) by @IWANABETHATGUY
- import-glob: escape generated string literals (#10438) by @shantanuraj
- preserve-modules: don't assume every chunk mirrors a module (#10442) by @hyfdev
- filter: treat missing hook inputs as non-matches, not panics (#10443) by @IWANABETHATGUY
- code-splitting: keep CommonJS modules wrapped under strict execution order (#10405) by @hyfdev
- code-splitting: align dynamicImports metadata with the rewritten import() specifier (#10430) by @hyfdev
- dev: skip user plugin hooks for ?rolldown-lazy proxy modules (#10426) by @unknownjedi
- treeshake: preserve side-effect-free spread arguments in manual-pure chains (#10432) by @IWANABETHATGUY
- treeshake: preserve eagerly evaluated child effects of manual pure chains (#10427) by @Nic-Polumeyv
- code-splitting: initialize pure definers behind star re-export barrels under strict execution order (#10409) by @hyfdev
- resolveId: reject string `id` filters (must be a RegExp) (#10412) by @IWANABETHATGUY
- code-splitting: collect eager order reasons for on-demand wrapping (#10387) by @hyfdev
- rolldown: apply output.paths to CJS export-star of external modules (#10406) by @IWANABETHATGUY
- dev: sourcemaps of lazily compiled chunks (#10386) by @tbvjaos510
- plugin: validate emitted file names at emitFile time (#10377) by @Nic-Polumeyv
- guarantee tokio runtime release when close rejects (#10381) by @shulaoda
- code-splitting: make strict transitive init registration deterministic and constant-time (#10320) by @hyfdev
- pair tokio runtime acquire and release on wasm to prevent premature shutdown (#10363) by @shulaoda
- don't body-demand modules from simulated facade chunk includes (#10351) by @IWANABETHATGUY
- tracing: invalid RD_LOG filter and RD_LOG_OUTPUT=json no longer panic (#10343) by @Brooooooklyn
- code-splitting: treat class definition-time global reads as order-sensitive (#10322) by @hyfdev
- code-splitting: deconflict force-included runtime helper statements (#10336) by @hyfdev
- binding: forward all missing parallel JS plugin hooks (#10345) by @Brooooooklyn
- code-splitting: re-derive chunk exec order after the runtime sweep (#10334) by @hyfdev
- types: add undefined to ExistingRawSourceMap optional properties (#10355) by @ocavue
- magic-string: validate relocate ranges before rewiring (#10327) by @IWANABETHATGUY
- add EMPTY_IMPORT_META warning for non-node CJS output (#10222) by @sapphi-red
- call `resolveFileUrl` in a deterministic order (#10330) by @sapphi-red
- magic-string: refuse repeated sendMagicString on a consumed instance (#10331) by @IWANABETHATGUY
- magic-string: refuse to use a MagicString after sendMagicString consumed it (#10326) by @IWANABETHATGUY
- magic-string: reject non-contiguous moves before rewiring the chunk list (#10311) by @IWANABETHATGUY
- handle `./foo/bar` glob pattern the same as `foo/bar` (#10313) by @sapphi-red
- magic-string: throw instead of panicking when append/prepend splits an edited chunk (#10301) by @IWANABETHATGUY
- output: skip separator for empty hoisted functions (#10310) by @hyfdev
- magic-string: don't report a change when edits cancel out (#10299) by @IWANABETHATGUY
- sourcemap: map wrapped imported callees (#10288) by @hyfdev
- magic-string: count positional inserts at index 0 on an empty source (#10306) by @IWANABETHATGUY
- magic-string: return UTF-16 code units from length() (#10295) by @IWANABETHATGUY
- output: skip separator for empty import prelude (#10289) by @hyfdev

### 🚜 Refactor

- dev: make it easier to customize the runtime (#10338) by @sapphi-red
- code-splitting: declare CJS carrier namespaces initializer-free (#10513) by @hyfdev
- rollup-tests: avoid relying on `NODE_PATH` env var resolution (#10496) by @sapphi-red
- code-splitting: derive symbol chunk ownership as pass-local link data (#10449) by @hyfdev
- plugin: share asset emission helpers between copy_module and asset_module (#10450) by @Nic-Polumeyv
- plugin: dedupe hook binding boilerplate (#10428) by @Nic-Polumeyv
- plugin: share the oxc parse preamble between import-glob and dynamic-import-vars (#10452) by @Nic-Polumeyv
- implement `GetAstBuilder` on visitor/pass types (#10424) by @overlookmotel
- pass arrays to AST builder methods (#10419) by @overlookmotel
- shorten AST builder code (#10418) by @overlookmotel
- centralize final ESM init metadata (#10376) by @hyfdev
- descriptor-based parallel-plugin detection (getParallelPluginInfo) (#10349) by @Brooooooklyn
- remove AstFactory in favor of new_* construction traits (#10353) by @Boshen
- enable oxc_ast's `disable_old_builder` feature (#10316) by @Boshen

### 📚 Documentation

- development-guide: update config.json link line reference (#10523) by @dogledogle
- clarify slash normalization for id hook filter (#10511) by @sapphi-red
- code-splitting: record the thenable-namespace rule (#10502) by @hyfdev
- clarify that `esmExternalRequirePlugin` must own its externals (#10439) by @TheAlexLichter
- add troubleshooting entry for the @rolldown/binding-... resolution error (#10390) by @Nic-Polumeyv
- add Code Splitting API reference category (#10382) by @vittorioexp

### ⚡ Performance

- use VisitJsMut in JavaScript-only AST passes (#10507) by @Boshen
- cache the resolved glob matcher for Id/ImporterId filters (#10410) by @IWANABETHATGUY
- scope_hoisting: remove `alloc` field from `ScopeHoistingFinalizer` (#10425) by @overlookmotel
- reduce string allocations (#10423) by @overlookmotel
- hmr: remove unnecessary string allocations (#10422) by @overlookmotel
- avoid allocating static strings via custom builder methods (#10421) by @overlookmotel
- pass string literals to AST builder methods (#10420) by @overlookmotel
- use VisitJs in JavaScript-only AST passes (#10396) by @Boshen
- plugin: shrink erased plugin debug vtables (#10370) by @Boshen
- reuse normalized path buffers (#10315) by @hyfdev

### 🧪 Testing

- code-splitting: pin CJS barrel fallback triggers and flag-off equivalence (#10514) by @hyfdev
- plugin: cover chunk fileName, absolute chunk name, and Windows drive names (#10400) by @IWANABETHATGUY
- code-splitting: cover a single-chunk dynamic import of a wrapped module (#10505) by @hyfdev
- file: remove the unused .dynamic_import fixture (#10481) by @hyfdev
- treeshake: reduce manual-pure fixture to a minimal smoke test, move matrix to unit tests (#10436) by @IWANABETHATGUY
- dev: run vite playgrounds under bundled dev (test-serve-bundled) (#10434) by @h-a-n-a
- stop snapshots from silently hiding user code inside the runtime region (#10431) by @hyfdev
- wasi: add tokio runtime lifecycle regression test (#10379) by @shulaoda
- dev: expect preserved hot.data in hmr-whole-chain-dispose (#10380) by @h-a-n-a
- code-splitting: pin flag-off wrapped-esm init emission (#10324) by @hyfdev
- sourcemap: fix Windows-only failures in composition fixtures (#10368) by @shulaoda
- generated-code: mark assert external in symbols_ns2 for deterministic output (#10339) by @hyfdev
- code-splitting: cover entries-aware strict init cycle (#10307) by @hyfdev
- make `just setup-vite` the only entry point that touches `vite/` (#10332) by @shulaoda
- vite-tests: reuse the shared root vite checkout (#10325) by @shulaoda
- test-dev-server: drop the vite submodule, track rolldown-canary (#10319) by @shulaoda
- vite-tests: track the latest rolldown-canary rebased onto vite main (#10318) by @shulaoda
- unify Vite in vite-test and test-dev-server (#10293) by @h-a-n-a

### ⚙️ Miscellaneous Tasks

- scope the binding artifact download to `bindings-*` (#10525) by @shulaoda
- deps: update napi (#10506) by @renovate[bot]
- deps: update rollup submodule for tests to v4.62.3 (#10494) by @rolldown-guard[bot]
- deps: upgrade oxc to 0.142.0 (#10497) by @shulaoda
- deps: update test262 submodule for tests (#10495) by @rolldown-guard[bot]
- deps: update github actions (#10460) by @renovate[bot]
- deps: update rust crates (#10462) by @renovate[bot]
- deps: update npm packages (#10461) by @renovate[bot]
- metric: alert Discord when the metric workflow fails (#10447) by @IWANABETHATGUY
- metric: mint a short-lived GitHub App token instead of a PAT (#10446) by @IWANABETHATGUY
- repo: repair dangling CLAUDE.md symlink (#10451) by @hanayashiki
- publint/package-metadata fixes and small correctness fixes (#10344) by @Brooooooklyn
- deps: update dependency vite-plus to v0.2.6 (#10404) by @renovate[bot]
- add Semgrep scan workflow (#10395) by @Boshen
- enable Windows CI with a PR label (#10375) by @hyfdev
- deps: upgrade oxc to 0.141.0 (#10373) by @camc314
- deps: update napi (#10369) by @renovate[bot]
- deps: update test262 submodule for tests (#10367) by @rolldown-guard[bot]
- deps: update taiki-e/install-action action to v2.83.3 (#10358) by @renovate[bot]
- deps: update rust crates (#10357) by @renovate[bot]
- deps: update npm packages (#10359) by @renovate[bot]
- deps: update rust crate syn to v3 (#10362) by @renovate[bot]
- deps: update rust crate oxc_sourcemap to v8.1.2 (#10356) by @renovate[bot]
- deps: update dependency vite-plus to v0.2.5 (#10329) by @renovate[bot]
- docs: migrate Netlify redirects to Void config (#10282) by @tux-tn
- deps: update dependency rust to v1.97.1 (#10317) by @renovate[bot]
- runtime: remove unused `runtime/index.js` (#10302) by @IWANABETHATGUY

### ❤️ New Contributors

* @dogledogle made their first contribution in [#10523](#10523)
* @tbvjaos510 made their first contribution in [#10489](#10489)
* @martijnwalraven made their first contribution in [#10440](#10440)
* @shantanuraj made their first contribution in [#10438](#10438)
* @Nic-Polumeyv made their first contribution in [#10450](#10450)
* @hanayashiki made their first contribution in [#10451](#10451)
* @unknownjedi made their first contribution in [#10426](#10426)
* @vittorioexp made their first contribution in [#10382](#10382)
* @tux-tn made their first contribution in [#10282](#10282)

Co-authored-by: shulaoda <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants