refactor(rolldown_resolver): inline unnecessary functions#6985
refactor(rolldown_resolver): inline unnecessary functions#6985
Conversation
How to use the Graphite Merge QueueAdd the label graphite: merge to this PR to add it to the merge queue. 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. |
|
Could you elaborate the word |
Benchmarks Rust |
bbde05d to
ba11494
Compare
4e90a55 to
4a7d43b
Compare
ba11494 to
38cb176
Compare
✅ Deploy Preview for rolldown-rs canceled.
|
Done in PR description |
I think the purpose of previous code extracting the function is for better readability and restricted scope. If there's something wrong about the behavior of infering module format, you could jump into Same for In short, these functions decrease the complexity of |
38cb176 to
67b6599
Compare
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the resolver by inlining two helper functions that were only called once, making the code more direct and easier to follow.
- Inlines
cached_package_jsonmethod into its single call site within theresolvemethod - Inlines
infer_module_def_formatfunction into its single call site within theresolvemethod - Removes unused
Resolutionimport that was only referenced in the removed function signature
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Got it. |

A small helper function called only once that doesn't improve readability can be
"unnecessary"- inlining makes the code more direct.