Skip to content

Conversation

@Sysix
Copy link
Member

@Sysix Sysix commented Nov 5, 2025

No description provided.

Copy link
Member Author

Sysix commented Nov 5, 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.

@Sysix Sysix changed the title refacor(language_server): split ServerFormatter creation with *Builder pattern refactor(language_server): split ServerFormatter creation with *Builder pattern Nov 5, 2025
@github-actions github-actions bot added the C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior label Nov 5, 2025
@Sysix Sysix changed the base branch from 11-05-refactor_language_server_split_serverlinter_creation_with_builder_pattern to graphite-base/15283 November 5, 2025 18:53
@Sysix Sysix requested a review from Copilot November 5, 2025 19:00
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 ServerFormatter instantiation by introducing a builder pattern. The ServerFormatter::new() method now only accepts FormatOptions instead of root_uri and LSPFormatOptions, with a new ServerFormatterBuilder handling the configuration file resolution logic.

Key changes:

  • Introduced ServerFormatterBuilder to separate configuration loading from formatter instantiation
  • Modified ServerFormatter::new() to accept FormatOptions directly instead of resolving configuration internally
  • Updated all call sites to use the builder pattern and adjust parameter passing (by value instead of by reference)

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
crates/oxc_language_server/src/formatter/server_formatter.rs Added ServerFormatterBuilder struct and moved configuration resolution methods from ServerFormatter to the builder
crates/oxc_language_server/src/worker.rs Updated all call sites to use ServerFormatterBuilder and changed parameter passing from references to owned values

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

@Sysix Sysix force-pushed the 11-05-refacor_language_server_split_serverformatter_creation_with_builder_pattern branch from 03afd96 to 4c70dba Compare November 5, 2025 19:18
@Sysix Sysix force-pushed the graphite-base/15283 branch from 58be109 to 1e77275 Compare November 5, 2025 19:18
@Sysix Sysix changed the base branch from graphite-base/15283 to 11-05-refactor_language_server_split_serverlinter_creation_with_builder_pattern November 5, 2025 19:18
@Sysix Sysix marked this pull request as ready for review November 5, 2025 19:49
@Sysix Sysix requested a review from camc314 as a code owner November 5, 2025 19:49
@graphite-app
Copy link
Contributor

graphite-app bot commented Nov 6, 2025

Merge activity

@graphite-app graphite-app bot force-pushed the 11-05-refactor_language_server_split_serverlinter_creation_with_builder_pattern branch from 1e77275 to 06bbb5d Compare November 6, 2025 01:30
graphite-app bot pushed a commit that referenced this pull request Nov 6, 2025
@graphite-app graphite-app bot force-pushed the 11-05-refacor_language_server_split_serverformatter_creation_with_builder_pattern branch from 4c70dba to 04f5315 Compare November 6, 2025 01:30
@graphite-app graphite-app bot force-pushed the 11-05-refactor_language_server_split_serverlinter_creation_with_builder_pattern branch from 06bbb5d to 5f81e63 Compare November 6, 2025 01:34
graphite-app bot pushed a commit that referenced this pull request Nov 6, 2025
@graphite-app graphite-app bot force-pushed the 11-05-refacor_language_server_split_serverformatter_creation_with_builder_pattern branch from 04f5315 to 5abbd3e Compare November 6, 2025 01:34
@graphite-app graphite-app bot added the 0-merge Merge with Graphite Merge Queue label Nov 6, 2025
@graphite-app graphite-app bot force-pushed the 11-05-refactor_language_server_split_serverlinter_creation_with_builder_pattern branch from 5f81e63 to 55222ab Compare November 6, 2025 02:32
@graphite-app graphite-app bot force-pushed the 11-05-refacor_language_server_split_serverformatter_creation_with_builder_pattern branch from 5abbd3e to a2d78e4 Compare November 6, 2025 02:33
Base automatically changed from 11-05-refactor_language_server_split_serverlinter_creation_with_builder_pattern to main November 6, 2025 02:37
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Nov 6, 2025
@graphite-app graphite-app bot merged commit a2d78e4 into main Nov 6, 2025
22 checks passed
@graphite-app graphite-app bot deleted the 11-05-refacor_language_server_split_serverformatter_creation_with_builder_pattern branch November 6, 2025 02:37
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