Skip to content

Comments

refactor(formatter): replace format_once with format_with where possible#16031

Merged
graphite-app[bot] merged 1 commit intomainfrom
11-24-refactor_formatter_replace_format_once_with_format_with_where_possible
Nov 24, 2025
Merged

refactor(formatter): replace format_once with format_with where possible#16031
graphite-app[bot] merged 1 commit intomainfrom
11-24-refactor_formatter_replace_format_once_with_format_with_where_possible

Conversation

@Dunqing
Copy link
Member

@Dunqing Dunqing commented Nov 24, 2025

format_once has slightly overhead as its T was wrapped by Cell to avoid double calling. So prefer to format_with when possible

@github-actions github-actions bot added A-formatter Area - Formatter C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior labels Nov 24, 2025
Copy link
Member Author

Dunqing commented Nov 24, 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.

@Dunqing Dunqing changed the title refactor(formatter): replace format_once with format_with where possible refactor(formatter): replace format_once with format_with where possible Nov 24, 2025
@codspeed-hq
Copy link

codspeed-hq bot commented Nov 24, 2025

CodSpeed Performance Report

Merging #16031 will not alter performance

Comparing 11-24-refactor_formatter_replace_format_once_with_format_with_where_possible (c76ff3c) with 11-24-fix_formatter_revert_bestfitting_printing_logic (74d7dc8)

Summary

✅ 38 untouched
⏩ 7 skipped1

Footnotes

  1. 7 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@Dunqing
Copy link
Member Author

Dunqing commented Nov 24, 2025

I am going to merge these three PRs without @leaysgur's review since you are not available today. I've confirmed there's no regression in the VSCode repo. Feel free to review after you come back.

@Dunqing Dunqing added the 0-merge Merge with Graphite Merge Queue label Nov 24, 2025
Copy link
Member Author

Dunqing commented Nov 24, 2025

Merge activity

…ossible (#16031)

`format_once` has slightly overhead as its `T` was wrapped by Cell to avoid double calling. So prefer to `format_with` when possible
@graphite-app graphite-app bot force-pushed the 11-24-fix_formatter_revert_bestfitting_printing_logic branch from 74d7dc8 to 4817486 Compare November 24, 2025 09:01
@graphite-app graphite-app bot force-pushed the 11-24-refactor_formatter_replace_format_once_with_format_with_where_possible branch from c76ff3c to 66bab34 Compare November 24, 2025 09:02
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Nov 24, 2025
Base automatically changed from 11-24-fix_formatter_revert_bestfitting_printing_logic to main November 24, 2025 09:07
@graphite-app graphite-app bot merged commit 66bab34 into main Nov 24, 2025
21 checks passed
@graphite-app graphite-app bot deleted the 11-24-refactor_formatter_replace_format_once_with_format_with_where_possible branch November 24, 2025 09:08
taearls pushed a commit to taearls/oxc that referenced this pull request Dec 11, 2025
…ossible (oxc-project#16031)

`format_once` has slightly overhead as its `T` was wrapped by Cell to avoid double calling. So prefer to `format_with` when possible
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

2 participants