Skip to content

[Flight] Clarify that location field is a FunctionLocation not a CallSite #33141

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

Merged
merged 1 commit into from
May 7, 2025

Conversation

sebmarkbage
Copy link
Collaborator

Follow up to #33136.

This clarifies in the types where the conversion happens from a CallSite which we use to simulate getting the enclosing line/col to a FunctionLocation which doesn't represent a CallSite but actually just the function which only has an enclosing line/col.

string, // function name
string, // file name TODO: model nested eval locations as nested arrays
number, // enclosing line number
number, // enclosing column number
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Like it's not the enclosing of the function location but more like what enclosing means in the context of a callsite. I.e. function location.

@react-sizebot
Copy link

Comparing: 4206fe4...fbd7352

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 = 528.26 kB 528.26 kB = 93.16 kB 93.16 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 = 644.90 kB 644.90 kB = 113.47 kB 113.47 kB
facebook-www/ReactDOM-prod.classic.js = 673.60 kB 673.60 kB = 118.31 kB 118.31 kB
facebook-www/ReactDOM-prod.modern.js = 663.88 kB 663.88 kB = 116.73 kB 116.73 kB

Significant size changes

Includes any change greater than 0.2%:

(No significant changes)

Generated by 🚫 dangerJS against fbd7352

@eps1lon
Copy link
Collaborator

eps1lon commented May 7, 2025

FunctionDeclaration would also work. That might be confused with the AST nodes though. Separate name from "CallSite" definitely makes sen

@sebmarkbage sebmarkbage merged commit a437c99 into facebook:main May 7, 2025
245 checks passed
github-actions bot pushed a commit that referenced this pull request May 7, 2025
…Site (#33141)

Follow up to #33136.

This clarifies in the types where the conversion happens from a CallSite
which we use to simulate getting the enclosing line/col to a
FunctionLocation which doesn't represent a CallSite but actually just
the function which only has an enclosing line/col.

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

4 participants