Skip to content

Conversation

@sapphi-red
Copy link
Member

@sapphi-red sapphi-red commented Nov 7, 2025

Added more helps to parser errors to make it easier to understand why the error happens or how it can be resolved.

@github-actions github-actions bot added A-parser Area - Parser C-enhancement Category - New feature or request labels Nov 7, 2025
Copy link
Member Author

sapphi-red commented Nov 7, 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.

@codspeed-hq
Copy link

codspeed-hq bot commented Nov 7, 2025

CodSpeed Performance Report

Merging #15440 will not alter performance

Comparing 11-05-feat_parser_add_more_help_messages_to_diagnostics (b5dc76a) with main (89adad0)1

Summary

✅ 37 untouched

Footnotes

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

@sapphi-red sapphi-red force-pushed the 11-05-feat_parser_add_more_help_messages_to_diagnostics branch from 27731bd to 6181bb5 Compare November 7, 2025 17:58
@github-actions github-actions bot added the A-transformer Area - Transformer / Transpiler label Nov 7, 2025
@sapphi-red sapphi-red force-pushed the 11-05-feat_parser_add_more_help_messages_to_diagnostics branch from 6181bb5 to b5dc76a Compare November 7, 2025 18:09
@sapphi-red sapphi-red requested a review from Boshen November 7, 2025 18:15
@sapphi-red sapphi-red marked this pull request as ready for review November 7, 2025 18:15
Copilot AI review requested due to automatic review settings November 7, 2025 18:15
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 enhances error messages in the TypeScript parser by adding helpful context to diagnostic messages. The changes improve user experience by providing actionable guidance when errors occur.

Key changes:

  • Added help text to TypeScript constructor and arrow function parameter errors
  • Capitalized help message for super usage errors for consistency
  • Enhanced JSX closing tag mismatch errors with clearer labels showing which tag was opened and what closing tag is expected
  • Added explanatory help messages for private identifiers with accessibility modifiers and import equals statements

Reviewed Changes

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

Show a summary per file
File Description
crates/oxc_parser/src/diagnostics.rs Added help messages and improved error formatting for TS constructor type parameters, arrow function this parameters, super usage, JSX tag mismatches, private identifiers, and import equals statements
tasks/transform_conformance/snapshots/babel.snap.md Updated snapshots to reflect new help messages for private identifiers
tasks/coverage/snapshots/parser_typescript.snap Updated snapshots with all new help messages including super, constructor type parameters, JSX improvements, and import equals
tasks/coverage/snapshots/parser_test262.snap Updated snapshot for capitalized super help message
tasks/coverage/snapshots/parser_misc.snap Updated snapshots for improved JSX closing tag error messages
tasks/coverage/snapshots/parser_babel.snap Updated snapshots for capitalized super help message and new help messages for private identifiers and constructor type parameters

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

Copy link
Member

Boshen commented Nov 8, 2025

Merge activity

Added more helps to parser errors to make it easier to understand why the error happens or how it can be resolved.
@graphite-app graphite-app bot force-pushed the 11-05-feat_parser_add_more_help_messages_to_diagnostics branch from b5dc76a to b7e3849 Compare November 8, 2025 04:28
@graphite-app graphite-app bot merged commit b7e3849 into main Nov 8, 2025
21 checks passed
@graphite-app graphite-app bot deleted the 11-05-feat_parser_add_more_help_messages_to_diagnostics branch November 8, 2025 04:33
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Nov 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-parser Area - Parser A-transformer Area - Transformer / Transpiler C-enhancement Category - New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants