Skip to content

refactor(oxfmt): Misc fixes#17953

Merged
graphite-app[bot] merged 1 commit intomainfrom
01-13-refactor_oxfmt_misc_fixes
Jan 13, 2026
Merged

refactor(oxfmt): Misc fixes#17953
graphite-app[bot] merged 1 commit intomainfrom
01-13-refactor_oxfmt_misc_fixes

Conversation

@leaysgur
Copy link
Member

Pure refactoring;

  • Fix unused var warnings with --no-default-features
  • Remove useless Option<>

@leaysgur leaysgur changed the base branch from 01-13-fix_oxfmt_use_stdout_err_setblocking_true_to_handle_wouldblock_error to graphite-base/17953 January 13, 2026 05:37
@github-actions github-actions bot added A-cli Area - CLI A-formatter Area - Formatter C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior labels Jan 13, 2026
@leaysgur leaysgur force-pushed the 01-13-refactor_oxfmt_misc_fixes branch from 4c1c59f to 5077b4f Compare January 13, 2026 05:37
@leaysgur leaysgur force-pushed the graphite-base/17953 branch from 6dad761 to c4c55cc Compare January 13, 2026 05:37
Copy link
Member Author

leaysgur commented Jan 13, 2026


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.

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 performs pure refactoring to clean up code in the oxfmt formatter by fixing compiler warnings and removing unnecessary indirection.

Changes:

  • Removed unnecessary Option<ExternalFormatter> wrapper from StdinRunner, requiring the formatter to be passed directly to the constructor
  • Fixed unused variable warning for sort_package_json when building without the napi feature by using conditional compilation

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
apps/oxfmt/src/stdin/mod.rs Removed Option<> wrapper and builder method, updated new() to accept ExternalFormatter directly
apps/oxfmt/src/main_napi.rs Updated StdinRunner::new() call site to pass external_formatter as constructor argument
apps/oxfmt/src/core/config.rs Added conditional compilation to extract sort_package_json only when napi feature is enabled

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

@graphite-app graphite-app bot added the 0-merge Merge with Graphite Merge Queue label Jan 13, 2026
@graphite-app
Copy link
Contributor

graphite-app bot commented Jan 13, 2026

Merge activity

Pure refactoring;

- Fix unused var warnings with `--no-default-features`
- Remove useless `Option<>`
@graphite-app graphite-app bot force-pushed the 01-13-refactor_oxfmt_misc_fixes branch from 5f8d14b to 82c6c1a Compare January 13, 2026 08:19
@graphite-app graphite-app bot merged commit 82c6c1a into main Jan 13, 2026
18 checks passed
@graphite-app graphite-app bot deleted the 01-13-refactor_oxfmt_misc_fixes branch January 13, 2026 08:25
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Jan 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-cli Area - CLI A-formatter Area - Formatter 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.

3 participants