Skip to content

[Flight] Preserve async nature of calls in transported stacks #33679

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

eps1lon
Copy link
Collaborator

@eps1lon eps1lon commented Jul 1, 2025

E.g. in

async function delayedErrorLog() {
  await Promise.resolve();
  console.log(new Error('Oops'));
}

async function ServerComponent({}) {
  await delayedErrorLog();
}

We now replay it as

Server   Error: Oops
    at delayedErrorLog (App.js:120:15)
    at async ServerComponent (App.js:124:3)

instead of

Server   Error: Oops
    at delayedErrorLog (App.js:120:15)
    at ServerComponent (App.js:124:3)

There's more missing like await Promise.all which will be handled in a follow-up.

@github-actions github-actions bot added the React Core Team Opened by a member of the React Core Team label Jul 1, 2025
@react-sizebot
Copy link

react-sizebot commented Jul 1, 2025

Comparing: 7216c0f...da4924b

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.js = 6.68 kB 6.68 kB = 1.83 kB 1.83 kB
oss-stable/react-dom/cjs/react-dom-client.production.js = 530.57 kB 530.57 kB = 93.67 kB 93.67 kB
oss-experimental/react-dom/cjs/react-dom.production.js = 6.69 kB 6.69 kB = 1.83 kB 1.83 kB
oss-experimental/react-dom/cjs/react-dom-client.production.js = 651.66 kB 651.66 kB = 114.78 kB 114.78 kB
facebook-www/ReactDOM-prod.classic.js = 674.81 kB 674.81 kB = 118.78 kB 118.78 kB
facebook-www/ReactDOM-prod.modern.js = 665.30 kB 665.30 kB = 117.20 kB 117.19 kB

Significant size changes

Includes any change greater than 0.2%:

(No significant changes)

Generated by 🚫 dangerJS against da4924b

@eps1lon eps1lon force-pushed the sebbie/async-frames branch from 59a7654 to da4924b Compare July 1, 2025 11:34
@eps1lon eps1lon requested a review from sebmarkbage July 1, 2025 12:06
@eps1lon eps1lon marked this pull request as ready for review July 1, 2025 12:06
@eps1lon eps1lon changed the title [Flight] Preserve async nature of functions in transported stacks [Flight] Preserve async nature of calls in transported stacks Jul 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed React Core Team Opened by a member of the React Core Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants