Skip to content

Comments

refactor(lsp): move logic for Worker::did_change_configuration & ::did_change_watched_files to a combined function#16360

Merged
graphite-app[bot] merged 1 commit intomainfrom
12-01-refactor_lsp_move_logic_for_worker_did_change_configuration_did_change_watched_files_to_a_combined_function
Dec 2, 2025
Merged

refactor(lsp): move logic for Worker::did_change_configuration & ::did_change_watched_files to a combined function#16360
graphite-app[bot] merged 1 commit intomainfrom
12-01-refactor_lsp_move_logic_for_worker_did_change_configuration_did_change_watched_files_to_a_combined_function

Conversation

@Sysix
Copy link
Member

@Sysix Sysix commented Dec 1, 2025

No description provided.

Copy link
Member Author

Sysix commented Dec 1, 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.

@github-actions github-actions bot added A-editor Area - Editor and Language Server C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior labels Dec 1, 2025
@Sysix Sysix requested a review from Copilot December 1, 2025 20:14
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 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_changes method that accepts a closure to handle tool-specific change logic
  • Both did_change_configuration and did_change_watched_files now delegate to this common implementation
  • Added ToolRestartChanges to the crate's public imports

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@camc314 camc314 self-assigned this Dec 2, 2025
@camc314 camc314 added the 0-merge Merge with Graphite Merge Queue label Dec 2, 2025
Copy link
Contributor

camc314 commented Dec 2, 2025

Merge activity

…:did_change_watched_files` to a combined function (#16360)
@graphite-app graphite-app bot force-pushed the 12-01-refactor_lsp_move_logic_for_worker_did_change_configuration_did_change_watched_files_to_a_combined_function branch from 7dc9e85 to 8504095 Compare December 2, 2025 18:21
@graphite-app graphite-app bot merged commit 8504095 into main Dec 2, 2025
21 checks passed
@graphite-app graphite-app bot deleted the 12-01-refactor_lsp_move_logic_for_worker_did_change_configuration_did_change_watched_files_to_a_combined_function branch December 2, 2025 18:25
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Dec 2, 2025
taearls pushed a commit to taearls/oxc that referenced this pull request Dec 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-editor Area - Editor and Language Server 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