Skip to content

Conversation

@sebmarkbage
Copy link
Collaborator

For debug purposes this is the value that the React.lazy resolves to. It also lets us look at that value for descriptions like its name.

@sebmarkbage sebmarkbage requested a review from eps1lon October 18, 2025 14:14
@meta-cla meta-cla bot added the CLA Signed label Oct 18, 2025
@github-actions github-actions bot added the React Core Team Opened by a member of the React Core Team label Oct 18, 2025
@react-sizebot
Copy link

react-sizebot commented Oct 18, 2025

Comparing: 40c7a7f...a12cc9a

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 = 605.41 kB 605.41 kB = 107.22 kB 107.21 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 = 664.38 kB 664.38 kB = 117.09 kB 117.09 kB
facebook-www/ReactDOM-prod.classic.js = 688.25 kB 688.25 kB = 121.13 kB 121.13 kB
facebook-www/ReactDOM-prod.modern.js = 678.67 kB 678.67 kB = 119.48 kB 119.48 kB
oss-stable-semver/react/cjs/react.react-server.development.js +2.29% 30.90 kB 31.61 kB +1.94% 7.36 kB 7.50 kB
oss-stable/react/cjs/react.react-server.development.js +2.29% 30.93 kB 31.64 kB +1.91% 7.38 kB 7.53 kB

Significant size changes

Includes any change greater than 0.2%:

Expand to show
Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable-semver/react/cjs/react.react-server.development.js +2.29% 30.90 kB 31.61 kB +1.94% 7.36 kB 7.50 kB
oss-stable/react/cjs/react.react-server.development.js +2.29% 30.93 kB 31.64 kB +1.91% 7.38 kB 7.53 kB
oss-experimental/react/cjs/react.react-server.development.js +1.84% 38.50 kB 39.21 kB +1.54% 9.04 kB 9.18 kB
facebook-www/React-dev.modern.js +1.52% 55.17 kB 56.00 kB +1.11% 12.18 kB 12.32 kB
facebook-www/React-dev.classic.js +1.52% 55.17 kB 56.01 kB +1.10% 12.19 kB 12.32 kB
oss-stable-semver/react/cjs/react.development.js +1.46% 48.46 kB 49.17 kB +1.33% 10.99 kB 11.14 kB
oss-stable/react/cjs/react.development.js +1.46% 48.48 kB 49.19 kB +1.30% 11.02 kB 11.16 kB
oss-experimental/react/cjs/react.development.js +1.40% 50.63 kB 51.34 kB +1.31% 11.40 kB 11.55 kB
facebook-react-native/react/cjs/React-dev.js = 52.91 kB 52.61 kB = 11.67 kB 11.61 kB

Generated by 🚫 dangerJS against a12cc9a

Comment on lines +111 to +118
// Surface the default export as the resolved "value" for debug purposes.
const debugValue =
moduleObject == null ? undefined : moduleObject.default;
resolveDebugValue(debugValue);
// $FlowFixMe
ioInfo.value.status = 'fulfilled';
// $FlowFixMe
ioInfo.value.value = debugValue;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This block isn't gated on enableAsyncDebugInfo but resolveDebugValue is only callable with enableAsyncDebugInfo. enableAsyncDebugInfo isn't enabled everywhere at the moment.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this is implied via payload._ioInfo but still nice for DCE and readability to gate it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed. The whole block should've been gated before just like the reject.

@sebmarkbage sebmarkbage merged commit ec7d9a7 into facebook:main Oct 19, 2025
240 checks passed
sebmarkbage added a commit that referenced this pull request Oct 19, 2025
)

Stacked on #34906.

Infer name from stack if it's the generic "lazy" name. It might be
wrapped in an abstraction. E.g. `next/dynamic`.

Also use the function name as a description of a resolved function
value.

<img width="310" height="166" alt="Screenshot 2025-10-18 at 10 42 05 AM"
src="https://github.com/user-attachments/assets/c63170b9-2b19-4f30-be7a-6429bb3ef3d9"
/>
github-actions bot pushed a commit that referenced this pull request Oct 19, 2025
…34906)

For debug purposes this is the value that the `React.lazy` resolves to.
It also lets us look at that value for descriptions like its name.

DiffTrain build for [ec7d9a7](ec7d9a7)
github-actions bot pushed a commit that referenced this pull request Oct 19, 2025
…34906)

For debug purposes this is the value that the `React.lazy` resolves to.
It also lets us look at that value for descriptions like its name.

DiffTrain build for [ec7d9a7](ec7d9a7)
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