Skip to content

Comments

fix(traverse): create scopes for functions#3273

Merged
Dunqing merged 1 commit intomainfrom
05-14-fix_traverse_create_scopes_for_functions
May 14, 2024
Merged

fix(traverse): create scopes for functions#3273
Dunqing merged 1 commit intomainfrom
05-14-fix_traverse_create_scopes_for_functions

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented May 14, 2024

Fix bug with:

  1. scopes not being created for functions.
  2. too many scopes being created for class methods.

i.e. Logic for when Function creates a scope was opposite of what it should be.

Discovered by @Dunqing in #3258 (review).

@graphite-app
Copy link
Contributor

graphite-app bot commented May 14, 2024

Your org has enabled the Graphite merge queue for merging into main

Add the label “merge” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix.

You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link.

Copy link
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @overlookmotel and the rest of your teammates on Graphite Graphite

@github-actions github-actions bot added the A-ast Area - AST label May 14, 2024
@overlookmotel overlookmotel marked this pull request as ready for review May 14, 2024 10:23
@codspeed-hq
Copy link

codspeed-hq bot commented May 14, 2024

CodSpeed Performance Report

Merging #3273 will not alter performance

Comparing 05-14-fix_traverse_create_scopes_for_functions (fbb33dd) with main (56346d5)

Summary

✅ 27 untouched benchmarks

@overlookmotel overlookmotel requested a review from Dunqing May 14, 2024 10:25
@Dunqing Dunqing merged commit 6fd7a3c into main May 14, 2024
@Dunqing Dunqing deleted the 05-14-fix_traverse_create_scopes_for_functions branch May 14, 2024 10:27
@overlookmotel
Copy link
Member Author

@Dunqing Just a note: To make changes to oxc_traverse/src/walk.rs, or the other codegen-ed files, make the alteration in the AST defs file in oxc_ast, not in walk.rs directly - like in this PR.

Then re-run oxc_traverse codegen, and it will make the change to walk.rs.

@Dunqing
Copy link
Member

Dunqing commented May 14, 2024

@Dunqing Just a note: To make changes to oxc_traverse/src/walk.rs, or the other codegen-ed files, make the alteration in the AST defs file in oxc_ast, not in walk.rs directly - like in this PR.

Then re-run oxc_traverse codegen, and it will make the change to walk.rs.

Yes, I made changes in oxc_ast 😀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-ast Area - AST

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants