Repository navigation
Retry nested dynamic import links after evaluation - #8541
Merged
Merged
Conversation
A dynamic import during module evaluation can reach a new graph that statically imports a module still being evaluated. The new module registry rejects that link instead of passing an evaluating module to V8, so the import fails with a circular dependency error. When linking an uninstantiated target fails during module evaluation, retry linking and evaluation once from a microtask. Nested evaluation does not drain microtasks, so the retry runs after the current evaluation stack unwinds. Successful links still evaluate inline, and permanent link or evaluation errors reject the import. Cover linking cycles, concurrent imports, top-level await, deferred link and evaluation errors, and synchronous require().
There was a problem hiding this comment.
✅ Approved — No issues found. The deferred retry is scoped to links that fail during module evaluation, handles termination correctly, and is well covered by tests and documentation.
The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.
✅ All checks passed
🔒 Security: ✅ LGTM
No issues found.
📖 AGENTS.md: ✅ LGTM
No issues found.
📋 Code Quality: ✅ LGTM
No issues found.
⚡ Performance: ✅ LGTM
No issues found.
📝 Documentation: ✅ LGTM
No issues found.
Reviewed commit: 3d8df624
git-bruh
enabled auto-merge
November 17, 2026 14:35
jasnell
approved these changes
Nov 17, 2026
5 tasks done
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.
A dynamic import during module evaluation can reach a new graph that statically imports a module still being evaluated. The new module registry rejects that link instead of passing an evaluating module to V8, so the import fails with a circular dependency error.
When linking an uninstantiated target fails during module evaluation, retry linking and evaluation once from a microtask. Nested evaluation does not drain microtasks, so the retry runs after the current evaluation stack unwinds. Successful links still evaluate inline, and permanent link or evaluation errors reject the import.
Cover linking cycles, concurrent imports, top-level await, deferred link and evaluation errors, and synchronous require().