Skip to content

fix: set order for callable plugins#8815

Merged
graphite-app[bot] merged 1 commit intomainfrom
03-20-fix_set_order_for_callable_plugins
Mar 20, 2026
Merged

fix: set order for callable plugins#8815
graphite-app[bot] merged 1 commit intomainfrom
03-20-fix_set_order_for_callable_plugins

Conversation

@sapphi-red
Copy link
Copy Markdown
Member

@sapphi-red sapphi-red commented Mar 20, 2026

This PR fixes the following failure:

 FAIL  packages/vite/src/node/ssr/runtime/__tests__/server-runtime.spec.ts > module runner initialization > oxc runtime helpers are loadable
ReferenceError: module is not defined
 ❯ eval ../../../node_modules/.pnpm/@oxc-project+runtime@0.121.0/node_modules/@oxc-project/runtime/src/helpers/taggedTemplateLiteral.js:10:1
 ❯ ESModulesEvaluator.runInlinedModule packages/vite/src/module-runner/esmEvaluator.ts:35:11
     33|     )
     34|
     35|     await initModule(
       |           ^
     36|       context[ssrModuleExportsKey],
     37|       context[ssrImportMetaKey],
 ❯ ModuleRunner.directRequest packages/vite/src/module-runner/runner.ts:430:26
 ❯ ModuleRunner.cachedRequest packages/vite/src/module-runner/runner.ts:222:33

https://github.com/rolldown/rolldown/actions/runs/23327388763/job/67851374703#step:7:473

This error was happening only in this repo because, in this repo, @oxc-project/runtime is a dependency and was resolvable from vite-tests directory. The internal resolver plugin is placed before the oxcRuntimePlugin in Vite, and because the order property was not set for callable plugins, the internal resolver plugin resolved @oxc-project/runtime.
This PR fixes that by adding order property for callable plugins.

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.

@netlify
Copy link
Copy Markdown

netlify bot commented Mar 20, 2026

Deploy Preview for rolldown-rs canceled.

Name Link
🔨 Latest commit fabccdd
🔍 Latest deploy log https://app.netlify.com/projects/rolldown-rs/deploys/69bd07fe428ff60008e7ec96

@sapphi-red sapphi-red requested a review from shulaoda March 20, 2026 08:02
@sapphi-red sapphi-red marked this pull request as ready for review March 20, 2026 08:02
@sapphi-red sapphi-red marked this pull request as draft March 20, 2026 08:02
@github-actions
Copy link
Copy Markdown
Contributor

Benchmarks Rust

  • target: main(943fe8d)
  • pr: 03-20-fix_set_order_for_callable_plugins(c069763)
group                                                        pr                                     target
-----                                                        --                                     ------
bundle/bundle@multi-duplicated-top-level-symbol              1.00     68.4±2.14ms        ? ?/sec    1.02     69.5±1.35ms        ? ?/sec
bundle/bundle@multi-duplicated-top-level-symbol-sourcemap    1.00     72.9±1.26ms        ? ?/sec    1.05     76.9±1.46ms        ? ?/sec
bundle/bundle@rome_ts                                        1.00    147.1±6.68ms        ? ?/sec    1.03    151.2±2.68ms        ? ?/sec
bundle/bundle@rome_ts-sourcemap                              1.00    168.3±3.32ms        ? ?/sec    1.02    171.7±2.65ms        ? ?/sec
bundle/bundle@threejs                                        1.00     60.9±1.66ms        ? ?/sec    1.03     62.5±1.31ms        ? ?/sec
bundle/bundle@threejs-sourcemap                              1.00     73.0±2.70ms        ? ?/sec    1.01     73.3±2.06ms        ? ?/sec
bundle/bundle@threejs10x                                     1.00    716.7±5.51ms        ? ?/sec    1.00    719.5±5.65ms        ? ?/sec
bundle/bundle@threejs10x-sourcemap                           1.00    811.7±9.77ms        ? ?/sec    1.01    818.2±5.39ms        ? ?/sec

@sapphi-red sapphi-red force-pushed the 03-20-fix_set_order_for_callable_plugins branch from c069763 to d3169aa Compare March 20, 2026 08:18
@sapphi-red sapphi-red marked this pull request as ready for review March 20, 2026 08:25
@sapphi-red sapphi-red added test: vite-tests Trigger Vite tests workflow on this PR and removed test: vite-tests Trigger Vite tests workflow on this PR labels Mar 20, 2026
@sapphi-red sapphi-red force-pushed the 03-20-fix_set_order_for_callable_plugins branch from d3169aa to ebc76d5 Compare March 20, 2026 08:35
Copy link
Copy Markdown
Member Author

sapphi-red commented Mar 20, 2026

Merge activity

  • Mar 20, 8:36 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.
  • Mar 20, 8:39 AM UTC: sapphi-red added this pull request to the Graphite merge queue.
  • Mar 20, 8:45 AM UTC: Merged by the Graphite merge queue.

This PR fixes the following failure:
```
 FAIL  packages/vite/src/node/ssr/runtime/__tests__/server-runtime.spec.ts > module runner initialization > oxc runtime helpers are loadable
ReferenceError: module is not defined
 ❯ eval ../../../node_modules/.pnpm/@oxc-project+runtime@0.121.0/node_modules/@oxc-project/runtime/src/helpers/taggedTemplateLiteral.js:10:1
 ❯ ESModulesEvaluator.runInlinedModule packages/vite/src/module-runner/esmEvaluator.ts:35:11
     33|     )
     34|
     35|     await initModule(
       |           ^
     36|       context[ssrModuleExportsKey],
     37|       context[ssrImportMetaKey],
 ❯ ModuleRunner.directRequest packages/vite/src/module-runner/runner.ts:430:26
 ❯ ModuleRunner.cachedRequest packages/vite/src/module-runner/runner.ts:222:33
```
https://github.com/rolldown/rolldown/actions/runs/23327388763/job/67851374703#step:7:473

This error was happening only in this repo because, in this repo, `@oxc-project/runtime` is a dependency and was resolvable from `vite-tests` directory. The internal resolver plugin is placed before the `oxcRuntimePlugin` in Vite, and because the `order` property was not set for callable plugins, the internal resolver plugin resolved `@oxc-project/runtime`.
This PR fixes that by adding `order` property for callable plugins.
@graphite-app graphite-app bot force-pushed the 03-20-fix_set_order_for_callable_plugins branch from ebc76d5 to fabccdd Compare March 20, 2026 08:40
@graphite-app graphite-app bot merged commit fabccdd into main Mar 20, 2026
32 of 33 checks passed
@graphite-app graphite-app bot deleted the 03-20-fix_set_order_for_callable_plugins branch March 20, 2026 08:45
@github-actions github-actions bot mentioned this pull request Mar 23, 2026
shulaoda added a commit that referenced this pull request Mar 23, 2026
## [1.0.0-rc.11] - 2026-03-23

### 🚀 Features

- magicString replace with regex (#8802) by @IWANABETHATGUY
- support `output.sourcemapExcludeSources` option (#8828) by @sapphi-red
- support `getIndentString` in MagicString (#8775) by @IWANABETHATGUY
- MagicString ignoreList support (#8773) by @IWANABETHATGUY

### 🐛 Bug Fixes

- types: remove `pluginName` from `MinimalPluginContext` (#8864) by @sapphi-red
- do not report eval?.() as direct eval (#8860) by @IWANABETHATGUY
- handle negative indices, overlapping ranges, and moved content in MagicString remove (#8829) by @IWANABETHATGUY
- enable arbitrary_precision for serde_json to fix JSON float parsing (#8848) by @elderapo
- resolve TypeScript lint errors (#8841) by @Boshen
- avoid panic on multi-byte UTF-8 chars in hash placeholder iterator (#8790) by @shulaoda
- ci: skip failing vite build watch raw query test (#8840) by @Boshen
- ci: use step-level env override to unset VITE_PLUS_CLI_BIN in vite tests (#8838) by @Boshen
- ci: move vite tests into CI workflow by @Boshen
- ci: unset all VITE_PLUS_* env vars in vite-tests workflow (#8837) by @Boshen
- test: skip watch CLI tests on Windows (#8830) by @Boshen
- ci: unset VITE_PLUS_CLI_BIN in vite-tests workflow (#8832) by @Boshen
- remove redundant bare side-effect imports in entry/facade chunks (#8804) by @h-a-n-a
- magicString prepend issues (#8797) by @IWANABETHATGUY
- ci: use `vpx` instead of `vp exec` for `pkg-pr-new` (#8827) by @Boshen
- set `order` for callable plugins (#8815) by @sapphi-red
- handle reversed slice ranges with moved content (#8750) by @IWANABETHATGUY
- update emnapi to latest to avoid version mismatch (#8781) by @sapphi-red
- external.md on Windows OS (#8780) by @bddjr
- align MagicString length/isEmpty with reference magic-string (#8776) by @IWANABETHATGUY

### 🚜 Refactor

- extract canonical_ref_resolving_namespace helper (#8836) by @Boshen

### 📚 Documentation

- improve external examples for cross-platform correctness (#8786) by @hyf0-agent
- update reference to transform function in plugin API documentation (#8778) by @zOadT

### ⚡ Performance

- reduce timing of `dervie_entries_aware_chunk_name` (#8847) by @AliceLanniste
- bench: remove redundant sourcemap benchmark cases (#8825) by @Boshen
- reduce intermediate allocations in `collapse_sourcemaps` (#8821) by @Boshen
- enable parallel AST cloning on macOS (#8814) by @Boshen

### 🧪 Testing

- watch: use polling watcher and retry for watch error test (#8772) by @sapphi-red

### ⚙️ Miscellaneous Tasks

- justfile: skip setup-vite-plus if vp is already installed (#8862) by @Boshen
- add expectWarning option to test config (#8861) by @IWANABETHATGUY
- justfile: support windows for `just setup` (#8846) by @AliceLanniste
- deps: update rust crates (#8852) by @renovate[bot]
- deps: update endbug/version-check action to v3 (#8855) by @renovate[bot]
- deps: update github-actions (#8853) by @renovate[bot]
- deps: update dependency vitepress to v2.0.0-alpha.17 (#8854) by @renovate[bot]
- deps: update npm packages (#8851) by @renovate[bot]
- bench: use mimalloc as global allocator in bench crate (#8844) by @IWANABETHATGUY
- reuse native build artifact in node-validation job (#8826) by @Boshen
- speed up CodSpeed benchmark build by disabling LTO (#8824) by @Boshen
- remove redundant critcmp benchmark job (#8823) by @Boshen
- deps: update rust crate oxc_sourcemap to v6.1.0 (#8785) by @renovate[bot]
- node: migrate oxlint and oxfmt to Vite+ (#8813) by @Boshen
- revert namespace runners for release build jobs (#8820) by @Boshen
- migrate runners to namespace (#8819) by @Boshen
- test: relax test utils path assertion to support git worktrees (#8816) by @younggglcy
- rename `examples/lazy` to `examples/lazy-compilation` (#8789) by @shulaoda
- improve "needs reproduction" wording by @Boshen
- deps: update dependency oxlint-tsgolint to v0.17.1 (#8807) by @renovate[bot]
- enable 7 previously-skipped MagicString tests (#8771) by @IWANABETHATGUY
- upgrade oxc to 0.121.0 (#8784) by @shulaoda
- increase Windows dev drive size from 12GB to 20GB (#8779) by @Copilot

### ❤️ New Contributors

* @elderapo made their first contribution in [#8848](#8848)
* @younggglcy made their first contribution in [#8816](#8816)
* @bddjr made their first contribution in [#8780](#8780)
* @zOadT made their first contribution in [#8778](#8778)

Co-authored-by: shulaoda <165626830+shulaoda@users.noreply.github.com>
This was referenced Mar 23, 2026
shulaoda added a commit that referenced this pull request Mar 23, 2026
## [1.0.0-rc.11] - 2026-03-23

### 🚀 Features

- magicString replace with regex (#8802) by @IWANABETHATGUY
- support `output.sourcemapExcludeSources` option (#8828) by @sapphi-red
- support `getIndentString` in MagicString (#8775) by @IWANABETHATGUY
- MagicString ignoreList support (#8773) by @IWANABETHATGUY

### 🐛 Bug Fixes

- forward test filters through vp run (#8870) by @younggglcy
- types: remove `pluginName` from `MinimalPluginContext` (#8864) by @sapphi-red
- do not report eval?.() as direct eval (#8860) by @IWANABETHATGUY
- handle negative indices, overlapping ranges, and moved content in MagicString remove (#8829) by @IWANABETHATGUY
- enable arbitrary_precision for serde_json to fix JSON float parsing (#8848) by @elderapo
- resolve TypeScript lint errors (#8841) by @Boshen
- avoid panic on multi-byte UTF-8 chars in hash placeholder iterator (#8790) by @shulaoda
- ci: skip failing vite build watch raw query test (#8840) by @Boshen
- ci: use step-level env override to unset VITE_PLUS_CLI_BIN in vite tests (#8838) by @Boshen
- ci: move vite tests into CI workflow by @Boshen
- ci: unset all VITE_PLUS_* env vars in vite-tests workflow (#8837) by @Boshen
- test: skip watch CLI tests on Windows (#8830) by @Boshen
- ci: unset VITE_PLUS_CLI_BIN in vite-tests workflow (#8832) by @Boshen
- remove redundant bare side-effect imports in entry/facade chunks (#8804) by @h-a-n-a
- magicString prepend issues (#8797) by @IWANABETHATGUY
- ci: use `vpx` instead of `vp exec` for `pkg-pr-new` (#8827) by @Boshen
- set `order` for callable plugins (#8815) by @sapphi-red
- handle reversed slice ranges with moved content (#8750) by @IWANABETHATGUY
- update emnapi to latest to avoid version mismatch (#8781) by @sapphi-red
- external.md on Windows OS (#8780) by @bddjr
- align MagicString length/isEmpty with reference magic-string (#8776) by @IWANABETHATGUY

### 🚜 Refactor

- extract canonical_ref_resolving_namespace helper (#8836) by @Boshen

### 📚 Documentation

- improve external examples for cross-platform correctness (#8786) by @hyf0-agent
- update reference to transform function in plugin API documentation (#8778) by @zOadT

### ⚡ Performance

- reduce timing of `dervie_entries_aware_chunk_name` (#8847) by @AliceLanniste
- bench: remove redundant sourcemap benchmark cases (#8825) by @Boshen
- reduce intermediate allocations in `collapse_sourcemaps` (#8821) by @Boshen
- enable parallel AST cloning on macOS (#8814) by @Boshen

### 🧪 Testing

- watch: use polling watcher and retry for watch error test (#8772) by @sapphi-red

### ⚙️ Miscellaneous Tasks

- deps: update dependency @oxc-project/types to v0.122.0 (#8873) by @renovate[bot]
- publish-to-npm: use correct vp pm publish (#8871) by @shulaoda
- justfile: skip setup-vite-plus if vp is already installed (#8862) by @Boshen
- add expectWarning option to test config (#8861) by @IWANABETHATGUY
- justfile: support windows for `just setup` (#8846) by @AliceLanniste
- deps: update rust crates (#8852) by @renovate[bot]
- deps: update endbug/version-check action to v3 (#8855) by @renovate[bot]
- deps: update github-actions (#8853) by @renovate[bot]
- deps: update dependency vitepress to v2.0.0-alpha.17 (#8854) by @renovate[bot]
- deps: update npm packages (#8851) by @renovate[bot]
- bench: use mimalloc as global allocator in bench crate (#8844) by @IWANABETHATGUY
- reuse native build artifact in node-validation job (#8826) by @Boshen
- speed up CodSpeed benchmark build by disabling LTO (#8824) by @Boshen
- remove redundant critcmp benchmark job (#8823) by @Boshen
- deps: update rust crate oxc_sourcemap to v6.1.0 (#8785) by @renovate[bot]
- node: migrate oxlint and oxfmt to Vite+ (#8813) by @Boshen
- revert namespace runners for release build jobs (#8820) by @Boshen
- migrate runners to namespace (#8819) by @Boshen
- test: relax test utils path assertion to support git worktrees (#8816) by @younggglcy
- rename `examples/lazy` to `examples/lazy-compilation` (#8789) by @shulaoda
- improve "needs reproduction" wording by @Boshen
- deps: update dependency oxlint-tsgolint to v0.17.1 (#8807) by @renovate[bot]
- enable 7 previously-skipped MagicString tests (#8771) by @IWANABETHATGUY
- upgrade oxc to 0.121.0 (#8784) by @shulaoda
- increase Windows dev drive size from 12GB to 20GB (#8779) by @Copilot

### ❤️ New Contributors

* @younggglcy made their first contribution in [#8870](#8870)
* @elderapo made their first contribution in [#8848](#8848)
* @bddjr made their first contribution in [#8780](#8780)
* @zOadT made their first contribution in [#8778](#8778)

---------

Co-authored-by: shulaoda <165626830+shulaoda@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test: vite-tests Trigger Vite tests workflow on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants