Skip to content

Conversation

@camc314
Copy link
Contributor

@camc314 camc314 commented Oct 30, 2025

@github-actions github-actions bot added A-linter Area - Linter A-cli Area - CLI A-formatter Area - Formatter C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior labels Oct 30, 2025
Copy link
Contributor Author

camc314 commented Oct 30, 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.

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 diagnostic service to simplify the channel message type by embedding path information directly into Error objects instead of passing path-diagnostic tuples. The DiagnosticTuple type alias is removed, and all senders now transmit only Vec<Error> instead of (PathBuf, Vec<Error>).

  • Simplified channel API by removing the DiagnosticTuple type and changing DiagnosticSender/DiagnosticReceiver to handle Vec<Error> directly
  • Updated all diagnostic sender call sites to send only diagnostic vectors
  • Modified the diagnostic service to extract path information from error source codes instead of receiving it as tuple data

Reviewed Changes

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

Show a summary per file
File Description
crates/oxc_diagnostics/src/service.rs Removed DiagnosticTuple type alias, updated channel types, modified run() to extract path from diagnostic source code
crates/oxc_diagnostics/src/lib.rs Removed DiagnosticTuple from public exports
crates/oxc_linter/src/tsgolint.rs Updated error sender to send only diagnostics vector
crates/oxc_linter/src/service/runtime.rs Updated multiple error sender call sites to send only diagnostics vectors
crates/oxc_linter/src/lint_runner.rs Updated error sender to send only diagnostics vector
apps/oxfmt/src/service.rs Updated error sender call sites to send only diagnostics vectors
Comments suppressed due to low confidence (1)

crates/oxc_diagnostics/src/service.rs:1

  • The documentation example is outdated and no longer matches the new API. Since the channel now accepts Vec<Error> instead of tuples, the example should be updated to use wrap_diagnostics or demonstrate creating errors with source code attached. The current example code will not compile with the new signature.
use std::{

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

@camc314 camc314 changed the base branch from main to graphite-base/15130 October 30, 2025 15:26
@camc314 camc314 force-pushed the c/10-30-refactor_diagnostic_remove_path_from_sender branch from e797a3d to e6ef83a Compare October 30, 2025 15:26
@camc314 camc314 changed the base branch from graphite-base/15130 to c/10-30-chore_deps_update_dependency_oxc-miette_to_v2.6.0 October 30, 2025 15:26
@graphite-app graphite-app bot changed the base branch from c/10-30-chore_deps_update_dependency_oxc-miette_to_v2.6.0 to graphite-base/15130 October 30, 2025 15:32
@codspeed-hq
Copy link

codspeed-hq bot commented Oct 30, 2025

CodSpeed Performance Report

Merging #15130 will not alter performance

Comparing c/10-30-refactor_diagnostic_remove_path_from_sender (6f9c859) with main (3955335)

Summary

✅ 37 untouched

@graphite-app graphite-app bot force-pushed the graphite-base/15130 branch from 78a108f to 3955335 Compare October 30, 2025 15:38
@graphite-app graphite-app bot force-pushed the c/10-30-refactor_diagnostic_remove_path_from_sender branch from e6ef83a to f281003 Compare October 30, 2025 15:38
@graphite-app graphite-app bot changed the base branch from graphite-base/15130 to main October 30, 2025 15:38
@graphite-app graphite-app bot force-pushed the c/10-30-refactor_diagnostic_remove_path_from_sender branch from f281003 to 6f9c859 Compare October 30, 2025 15:39
@Boshen Boshen added the 0-merge Merge with Graphite Merge Queue label Oct 31, 2025
Copy link
Member

Boshen commented Oct 31, 2025

Merge activity

@graphite-app graphite-app bot force-pushed the c/10-30-refactor_diagnostic_remove_path_from_sender branch from 6f9c859 to 27b4f36 Compare October 31, 2025 07:43
@graphite-app graphite-app bot merged commit 27b4f36 into main Oct 31, 2025
20 checks passed
@graphite-app graphite-app bot deleted the c/10-30-refactor_diagnostic_remove_path_from_sender branch October 31, 2025 07:49
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Oct 31, 2025
@Boshen Boshen mentioned this pull request Nov 4, 2025
leaysgur added a commit that referenced this pull request Nov 4, 2025
## [0.10.0] - 2025-11-04

### 🚀 Features

- 505252c formatter: Wrap parenthesis for AssignmentExpression that is a
key of `PropertyDefinition` (#15243) (Dunqing)
- 880b259 formatter: Align import-like formatting the same as Prettier
(#15238) (Dunqing)
- b77f254 oxfmt,formatter: Support `embeddedLanguageFormatting` option
(#15216) (leaysgur)
- 898d6fe oxfmt: Add embedded language formatting with Prettier
integration (#14820) (Boshen)
- e77a48e formatter: Detect code removal feature (#15059) (leaysgur)

### 🐛 Bug Fixes

- daacf85 oxfmt: Release build fails (#15262) (Dunqing)
- f5d0348 oxfmt: Sync `dependencies` with `npm/oxfmt` and `apps/oxfmt`
(#15261) (leaysgur)
- 46793d7 formatter: Correct printing comments for `LabeledStatement`
(#15260) (Dunqing)
- 831ae99 formatter: Multiple comments in `LogicalExpression` and
`TSIntersectionType` (#15253) (Dunqing)
- 5fa9b1e formatter: Should not indent `BinaryLikeExpression` when it is
an argument of `Boolean` (#15250) (Dunqing)
- 99e520f formatter: Handle chain expression for
`JSXExpressionContainer` (#15242) (Dunqing)
- a600bf5 formatter: Correct printing comments for
`TaggedTemplateExpression` (#15241) (Dunqing)
- a7289e7 formatter: Handle member chain for the call's parent is a
chain expression (#15237) (Dunqing)

### 🚜 Refactor

- 36ae721 formatter: Simplify the use of `indent` with
`soft_line_break_or_space` (#15254) (Dunqing)
- cdd8e2f formatter/sort-imports: Split sort_imports modules (#15189)
(leaysgur)
- 27b4f36 diagnostic: Remove `path` from sender (#15130) (camc314)
- 85fb8e8 formatter/sort-imports: Pass options to is_ignored() (#15181)
(leaysgur)

### 🧪 Testing

- 9d5b34b formatter/sort-imports: Refactor sort_imports tests (#15188)
(leaysgur)

Co-authored-by: leaysgur <[email protected]>
@Boshen Boshen mentioned this pull request Nov 5, 2025
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 A-linter Area - Linter 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