Skip to content

Conversation

@Boshen
Copy link
Member

@Boshen Boshen commented Sep 27, 2025

Copilot AI review requested due to automatic review settings September 27, 2025 06:34
@Boshen Boshen requested a review from Dunqing as a code owner September 27, 2025 06:34
@github-actions github-actions bot added A-semantic Area - Semantic C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior labels Sep 27, 2025
Copy link
Member Author

Boshen commented Sep 27, 2025


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

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

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

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

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This refactoring removes the dependency on AstNodes::get_node for the check_unresolved_exports function by restructuring how unresolved exports are checked. The change moves from traversing unresolved references to directly iterating over AST nodes.

  • Removes the root() method from UnresolvedReferencesStack
  • Moves check_unresolved_exports from checker/mod.rs to javascript.rs
  • Changes the implementation to traverse program statements directly instead of using unresolved references and node lookup

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
crates/oxc_semantic/src/unresolved_stack.rs Removes unused root() method
crates/oxc_semantic/src/checker/mod.rs Removes old check_unresolved_exports function and call site, adds new call with program parameter
crates/oxc_semantic/src/checker/javascript.rs Adds new check_unresolved_exports implementation that traverses AST directly
crates/oxc_semantic/src/builder.rs Removes old call to check_unresolved_exports from builder

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@codspeed-hq
Copy link

codspeed-hq bot commented Sep 27, 2025

CodSpeed Instrumentation Performance Report

Merging #14176 will not alter performance

Comparing 09-27-refactor_semantic_do_not_use_astnodes_get_node_for_check_unresolved_exports_ (3542572) with main (d02d750)1

Summary

✅ 37 untouched

Footnotes

  1. No successful run was found on main (3542572) during the generation of this report, so d02d750 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@Boshen Boshen added the 0-merge Merge with Graphite Merge Queue label Sep 27, 2025
@graphite-app
Copy link
Contributor

graphite-app bot commented Sep 27, 2025

Merge activity

@graphite-app graphite-app bot force-pushed the 09-27-refactor_semantic_do_not_use_astnodes_get_node_for_check_unresolved_exports_ branch from ea9dd1e to 3542572 Compare September 27, 2025 06:52
@graphite-app graphite-app bot merged commit 3542572 into main Sep 27, 2025
26 checks passed
@graphite-app graphite-app bot deleted the 09-27-refactor_semantic_do_not_use_astnodes_get_node_for_check_unresolved_exports_ branch September 27, 2025 06:57
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Sep 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-semantic Area - Semantic C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants