[artifact build] async module resume fix on the 6d586e293f line#253
Closed
robobun wants to merge 1 commit into
Closed
[artifact build] async module resume fix on the 6d586e293f line#253robobun wants to merge 1 commit into
robobun wants to merge 1 commit into
Conversation
Same fix as the main-targeting PR #252, applied on top of the commit Bun currently pins (6d586e2) so the preview artifacts are compatible with oven-sh/bun main, whose bindings do not yet compile against the newer upstream-upgrade API on this fork's main. When an AsyncLocalStorage context is active at await time, resolveWithInternalMicrotaskForAsyncAwait wraps the microtask context in an InternalFieldTuple(context, asyncContext). AsyncFunctionResume unwraps it; asyncModuleExecutionResume did not, and downcast the tuple as a JSModuleRecord. Any top-level-await module awaiting with an active async context crashed (oven-sh/bun#32178, regression in Bun 1.3.14). Unwrap the tuple and set/restore the async context around the resumption, mirroring AsyncFunctionResume.
Preview Builds
|
Collaborator
Author
|
Obsolete after oven-sh/bun rebased onto main, which now pins WebKit 9cb85a0 (the upstream-upgrade commit, #251). This branch was a cherry-pick onto the old 6d586e2 base, built only because bun main's bindings didn't compile against the upgraded WebKit. bun main now pins 9cb85a0, so #252 (based on 9cb85a0) is directly compatible and its preview build is what oven-sh/bun#32184 now uses. #252 remains the mergeable fix for main. |
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.
Do not merge. This branch is #252's one-function fix cherry-picked onto 6d586e2, the commit oven-sh/bun main currently pins, purely to generate preview artifacts that are API-compatible with bun main (bun's bindings do not compile against this fork's current main, which carries the 51cc3fe/24362e67 upstream upgrades).
oven-sh/bun#32184 pins the resulting autobuild-preview tag to prove the fix in bun CI. The mergeable fix for this fork's main is #252.
The diff vs main below is meaningless (it shows the upgrade reverted); the real content is the single commit 7eb8e17.