Repository navigation
fix(plugin): stop this.resolve recursion between plugins with skipSelf: true - #11181
Merged
sapphi-red merged 4 commits intoOct 21, 2026
Merged
Conversation
anzal1
marked this pull request as ready for review
October 16, 2026 18:46
anzal1
requested review from
IWANABETHATGUY,
hyfdev,
sapphi-red and
shulaoda
as code owners
October 16, 2026 18:46
anzal1
force-pushed
the
fix/resolve-recursive-skip-self
branch
from
October 19, 2026 06:27
3684ca3 to
110c442
Compare
Merging this PR will not alter performance
|
this.resolve recursion between plugins with skipSelf: true
sapphi-red
approved these changes
Oct 21, 2026
sapphi-red
enabled auto-merge (squash)
October 21, 2026 08:33
Merged
shulaoda
added a commit
that referenced
this pull request
Oct 21, 2026
## [1.2.15] - 2026-10-21 ### 🚀 Features - rolldown_plugin_vite_resolve: add `isBundled` to pick the browser-external stub format (#11260) by @h-a-n-a - dev: mark entry modules in the HMR module graph (#11252) by @h-a-n-a - mark module starts with `// <id>` comments instead of `#region` pairs (#11235) by @IWANABETHATGUY ### 🐛 Bug Fixes - plugin: stop `this.resolve` recursion between plugins with `skipSelf: true` (#11181) by @anzal1 - rolldown_plugin_vite_resolve: handle external `require` for `ssr.target: 'webworker'` (#11205) by @sapphi-red - rolldown_plugin_vite_build_import_analysis: only wrap dynamic imports with static specifiers in __vitePreload (#10879) by @smeng9 - strict-execution-order: wrap eager modules that forward wrapped definers (#11186) by @hyfdev - chunk-import-map: keep common chunk keys unique when enabling inline common chunks (#11230) by @hyfdev - only register signal-exit handler when a trace subscriber is active (#11208) by @DaniilIsupov ### 🧪 Testing - fold hand-unrolled Rust test tables (#11212) by @Brooooooklyn ### ⚙️ Miscellaneous Tasks - deps: upgrade oxc to 0.155.0 (#11228) by @Dunqing - rollup-tests: retriage failed tests (#11251) by @sapphi-red - deps: update rollup submodule for tests to v4.64.12 (#11249) by @rolldown-guard[bot] - deps: update test262 submodule for tests (#11242) by @rolldown-guard[bot] ### ❤️ New Contributors * @anzal1 made their first contribution in [#11181](#11181) * @smeng9 made their first contribution in [#10879](#10879) * @DaniilIsupov made their first contribution in [#11208](#11208) Co-authored-by: shulaoda <[email protected]>
This was referenced Oct 30, 2026
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.
This fixes
this.resolverecursion between two plugins that never terminates. There is no tracking issue. The case is Rollup'sresolveid-recursive-calltest (rollup/rollup#5945), which was listed inpackages/rollup-tests/src/failed-tests.json.Root cause
this.resolvewithskipSelfonly filtered plugins at dispatch time. If plugin r1 callsthis.resolve(id, 'foo')and plugin r2 callsthis.resolve(id, 'bar'), r1 gets called again with importerbarand callsthis.resolve(id, 'foo')again. The skip list already holds (r1, id, 'foo'), but nothing checks it, so the chain repeats forever.Fix
In
NativePluginContextImpl::resolve, whenskipSelfis on and the skip list already has an entry for this plugin with the same specifier and importer, return a not-found result. The node binding turns that intonull, so the plugin falls back to its own default. This mirrorsresolveIdViaPluginsin Rollup, which returnsnullwith the comment "plugin recursively called itself".Tests
packages/rolldown/tests/fixtures/plugin/context/resolve-recursive-skip-self. It throws after 20 calls so a regression fails fast instead of hanging. Before the fix it fails with "resolve recursion did not terminate". After the fix it passes with the call order r1, r2, r1.rollup@function@resolveid-recursive-callfromfailed-tests.jsonand refreshedstatus.jsonandstatus.md. The Rollup suite passes with the entry removed.cargo test -p rolldown_pluginandcargo clippy -p rolldown_pluginpass.AI usage
This PR was written with the help of an AI agent (Claude Code). The change is a small bug fix with clear expected behavior, matching Rollup.
Written with the help of an agent (Claude Code, claude-opus-5-5 orchestrating claude-sonnet-5-5).