Skip to content

Conversation

@leaysgur
Copy link
Member

@leaysgur leaysgur commented Oct 28, 2025

If the parser reports a syntax error, simply skip the test.
oxfmt already reports error for this case.

By this change, tests containing unsupported syntax such as stage 2, 3 will be automatically ignored.

I'll add notes in the line comments to explain what they were like.

@github-actions github-actions bot added A-formatter Area - Formatter C-bug Category - Bug labels Oct 28, 2025
Copy link
Member Author

leaysgur commented Oct 28, 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.

@leaysgur leaysgur marked this pull request as ready for review October 28, 2025 04:13
Copilot AI review requested due to automatic review settings October 28, 2025 04:13
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 implements automatic skipping of tests that fail to parse, eliminating the need to manually maintain an ignore list for tests with unsupported syntax (e.g., stage 2, 3 features). When the parser encounters a syntax error, the test is now silently skipped rather than failing.

Key Changes:

  • Modified run_oxc_formatter to return Option<String> and bail early when parsing errors occur
  • Removed explicit ignore list entries for stage 3 features that are now automatically skipped
  • Updated test results showing improved pass rates (JS: 87.58% → 89.85%, TS: 88.96% → 89.80%)

Reviewed Changes

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

File Description
tasks/prettier_conformance/src/lib.rs Updated run_oxc_formatter to return Option<String> and skip tests with parse errors; refactored calling code to handle the new return type
tasks/prettier_conformance/src/ignore_list.rs Removed manual ignore entries for stage 3 features that are now automatically skipped
tasks/prettier_conformance/snapshots/prettier.ts.snap.md Updated snapshot showing improved TypeScript test pass rate
tasks/prettier_conformance/snapshots/prettier.js.snap.md Updated snapshot showing improved JavaScript test pass rate

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

@leaysgur leaysgur requested review from Boshen and Dunqing October 28, 2025 04:14
@leaysgur leaysgur force-pushed the 10-28-fix_tasks_prettier_conformance_skip_tests_which_cannot_parse branch from d27f0fa to 4acb87b Compare October 28, 2025 04:17
@leaysgur leaysgur changed the base branch from main to graphite-base/15025 October 28, 2025 05:08
@leaysgur leaysgur force-pushed the 10-28-fix_tasks_prettier_conformance_skip_tests_which_cannot_parse branch from 4acb87b to 3259e7b Compare October 28, 2025 05:08
@leaysgur leaysgur changed the base branch from graphite-base/15025 to 10-28-refactor_formatter_export_unified_way_to_get_parse_options October 28, 2025 05:08
@Dunqing Dunqing added the 0-merge Merge with Graphite Merge Queue label Oct 28, 2025
Copy link
Member

Dunqing commented Oct 28, 2025

Merge activity

If the parser reports a syntax error, simply skip the test.
`oxfmt` already reports error for this case.

By this change, tests containing unsupported syntax such as stage 2, 3 will be automatically ignored.

I'll add notes in the line comments to explain what they were like.
@graphite-app graphite-app bot force-pushed the 10-28-refactor_formatter_export_unified_way_to_get_parse_options branch from cd0ef1d to 5de99c2 Compare October 28, 2025 09:26
@graphite-app graphite-app bot requested a review from camc314 as a code owner October 28, 2025 09:26
@graphite-app graphite-app bot requested a review from Sysix as a code owner October 28, 2025 09:26
@graphite-app graphite-app bot force-pushed the 10-28-fix_tasks_prettier_conformance_skip_tests_which_cannot_parse branch from 25ddc9d to daead30 Compare October 28, 2025 09:27
Base automatically changed from 10-28-refactor_formatter_export_unified_way_to_get_parse_options to main October 28, 2025 09:31
@graphite-app graphite-app bot merged commit daead30 into main Oct 28, 2025
19 checks passed
@graphite-app graphite-app bot deleted the 10-28-fix_tasks_prettier_conformance_skip_tests_which_cannot_parse branch October 28, 2025 09:32
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Oct 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-formatter Area - Formatter C-bug Category - Bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants