refactor(lsp): move logic for Worker::did_change_configuration & ::did_change_watched_files to a combined function#16360
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via 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. |
There was a problem hiding this comment.
Pull request overview
This PR refactors the WorkspaceWorker by extracting duplicated logic from did_change_configuration and did_change_watched_files methods into a new generic helper function handle_tool_changes. This consolidates the common pattern of iterating through tools, collecting diagnostics, managing watcher registrations/unregistrations, and handling tool replacements.
Key changes:
- Introduced a new generic
handle_tool_changesmethod that accepts a closure to handle tool-specific change logic - Both
did_change_configurationanddid_change_watched_filesnow delegate to this common implementation - Added
ToolRestartChangesto the crate's public imports
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Merge activity
|
…:did_change_watched_files` to a combined function (#16360)
7dc9e85 to
8504095
Compare
…:did_change_watched_files` to a combined function (oxc-project#16360)

No description provided.