Skip to content

refactor(parser): move duplicate_default_export diagnostic to diagnostics mod#17557

Merged
graphite-app[bot] merged 1 commit intomainfrom
c/01-01-refactor_parser_move_duplicate_default_export_diagnostic_to_diagnostics.rs
Jan 2, 2026
Merged

refactor(parser): move duplicate_default_export diagnostic to diagnostics mod#17557
graphite-app[bot] merged 1 commit intomainfrom
c/01-01-refactor_parser_move_duplicate_default_export_diagnostic_to_diagnostics.rs

Conversation

@camc314
Copy link
Contributor

@camc314 camc314 commented Jan 1, 2026

No description provided.

@github-actions github-actions bot added A-parser Area - Parser C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior labels Jan 1, 2026
@camc314 camc314 self-assigned this Jan 1, 2026
Copy link
Contributor Author

camc314 commented Jan 1, 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.

@camc314 camc314 changed the title refactor(parser): move duplicate_default_export diagnostic to diagnostics.rs refactor(parser): move duplicate_default_export diagnostic to diagnostics mod Jan 1, 2026
@camc314 camc314 marked this pull request as ready for review January 1, 2026 13:54
Copilot AI review requested due to automatic review settings January 1, 2026 13:54
@camc314 camc314 assigned Boshen and unassigned camc314 Jan 1, 2026
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 parser code to move the duplicate_default_export diagnostic creation from inline code in module_record.rs to a dedicated function in the diagnostics.rs module, improving code organization and consistency.

Key changes:

  • Extracted inline diagnostic creation into a reusable duplicate_default_export function in the diagnostics module

Reviewed changes

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

File Description
crates/oxc_parser/src/module_record.rs Replaced inline OxcDiagnostic::error() call with diagnostics::duplicate_default_export() function call
crates/oxc_parser/src/diagnostics.rs Added new duplicate_default_export diagnostic function following established patterns with #[cold] attribute

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

@codspeed-hq
Copy link

codspeed-hq bot commented Jan 1, 2026

CodSpeed Performance Report

Merging #17557 will not alter performance

Comparing c/01-01-refactor_parser_move_duplicate_default_export_diagnostic_to_diagnostics.rs (2f81c86) with main (bb2e8e4)1

Summary

✅ 42 untouched
⏩ 3 skipped2

Footnotes

  1. No successful run was found on main (9200308) during the generation of this report, so bb2e8e4 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

  2. 3 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.

@camc314 camc314 added the 0-merge Merge with Graphite Merge Queue label Jan 2, 2026
Copy link
Contributor Author

camc314 commented Jan 2, 2026

Merge activity

@graphite-app graphite-app bot force-pushed the c/01-01-refactor_parser_move_duplicate_default_export_diagnostic_to_diagnostics.rs branch from 2f81c86 to 1cd2b1f Compare January 2, 2026 12:55
@graphite-app graphite-app bot merged commit 1cd2b1f into main Jan 2, 2026
21 checks passed
@graphite-app graphite-app bot deleted the c/01-01-refactor_parser_move_duplicate_default_export_diagnostic_to_diagnostics.rs branch January 2, 2026 13:01
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Jan 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-parser Area - Parser 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