Skip to content
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

refactor(typescript/namespace): reuse TSModuleBlock's scope id #3459

Conversation

Dunqing
Copy link
Member

@Dunqing Dunqing commented May 29, 2024

No description provided.

Copy link

graphite-app bot commented May 29, 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

Dunqing commented May 29, 2024

Copy link

codspeed-hq bot commented May 29, 2024

CodSpeed Performance Report

Merging #3459 will not alter performance

Comparing 05-29-refactor_typescript_namespace_reuse_tsmoduleblock_s_scope_id (1a50b86) with main (90b0f6d)

Summary

✅ 22 untouched benchmarks

@Boshen
Copy link
Member

Boshen commented May 29, 2024

merge conflict

@Dunqing Dunqing force-pushed the 05-29-refactor_typescript_namespace_reuse_tsmoduleblock_s_scope_id branch from 5d3dc7f to 1417f2a Compare May 29, 2024 13:32
@overlookmotel
Copy link
Collaborator

@Dunqing I've made some comments, but I don't fully understand TS namespaces. So feel free to ignore them and merge if you want.

Unless I'm understanding incorrectly, there should always be a TSModuleBlock we can get scope_id from unless the namespace is empty. And if the namespace is empty, we can exit from handle_nested early as the statement just gets deleted. Do I have that right?

If you like, merge this and then I'll have a go at fixing the "binding registered in wrong scope" problem I left unsolved previously, and you could check my work? Maybe that's easier than going back and forth with comments?

@Dunqing
Copy link
Member Author

Dunqing commented May 29, 2024

Unless I'm understanding incorrectly, there should always be a TSModuleBlock we can get scope_id from unless the namespace is empty. And if the namespace is empty, we can exit from handle_nested early as the statement just gets deleted. Do I have that right?

Yes. That's right.

If you like, merge this and then I'll have a go at fixing the "binding registered in wrong scope" problem I left unsolved previously, and you could check my work? Maybe that's easier than going back and forth with comments?

Sure!

Copy link

graphite-app bot commented May 29, 2024

Merge activity

@Dunqing Dunqing force-pushed the 05-29-refactor_typescript_namespace_reuse_tsmoduleblock_s_scope_id branch 2 times, most recently from d599902 to 04628ab Compare May 29, 2024 22:58
@Dunqing Dunqing force-pushed the 05-29-refactor_typescript_namespace_reuse_tsmoduleblock_s_scope_id branch from 04628ab to 1a50b86 Compare May 29, 2024 23:00
@graphite-app graphite-app bot merged commit 1a50b86 into main May 29, 2024
23 checks passed
@graphite-app graphite-app bot deleted the 05-29-refactor_typescript_namespace_reuse_tsmoduleblock_s_scope_id branch May 29, 2024 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-transformer Area - Transformer / Transpiler
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants