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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(hmr): change visit_node_children from macro to fn #3075

Merged
merged 1 commit into from
May 9, 2023

Conversation

bvanjoi
Copy link
Collaborator

@bvanjoi bvanjoi commented May 9, 2023

Related issue (if exists)

Summary

馃 Generated by Copilot at 85e3fd3

Refactored the HmrDependencyScanner struct in the rspack_plugin_javascript crate to use a closure instead of a macro for visiting node children. This improved code readability and reduced complexity.

Walkthrough

馃 Generated by Copilot at 85e3fd3

  • Replace macro visit_node_children with a closure of the same name to simplify code and avoid unnecessary macros in hmr_scanner.rs (link)
  • Update macro invocations to closure calls and pass self reference explicitly in HmrDependencyScanner methods for handling import.meta.hot.accept and import.meta.hot.decline nodes (link, link)

@github-actions github-actions bot added the team The issue/pr is created by the member of Rspack. label May 9, 2023
@bvanjoi bvanjoi enabled auto-merge May 9, 2023 07:55
@bvanjoi bvanjoi added this pull request to the merge queue May 9, 2023
Merged via the queue into main with commit ec5dcd5 May 9, 2023
15 checks passed
@bvanjoi bvanjoi deleted the refactor-hmr-visit-node-children branch May 9, 2023 09:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team The issue/pr is created by the member of Rspack.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants