-
-
Notifications
You must be signed in to change notification settings - Fork 726
test(coverage/typescript): Add reviewed tsc diagnostics error codes #15542
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test(coverage/typescript): Add reviewed tsc diagnostics error codes #15542
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
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. |
ca9169a to
ed45a7d
Compare
There was a problem hiding this 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 adds a new script to generate and maintain a reviewed list of TypeScript diagnostic error codes from the TypeScript compiler's test baselines. The script helps track which error codes can be detected by oxc_parser during static parsing versus those requiring type information.
Key changes:
- New TypeScript script to extract diagnostic error codes from TypeScript's
.errors.txttest baseline files - Generated list of 1008 unique diagnostic error codes in
reviewed-diagnostic-error-codes.txt - Integration with the build system via
justfilecommandupdate-tsc-diagnostics-codes
Reviewed Changes
Copilot reviewed 2 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tasks/coverage/tsc-diagnostics-codes/package.json | New package configuration with tinyglobby dependency for glob operations |
| tasks/coverage/tsc-diagnostics-codes/main.ts | Script that collects TypeScript test files, extracts error codes, and generates the reviewed list |
| tasks/coverage/reviewed-diagnostic-error-codes.txt | Generated list of TypeScript diagnostic error codes to be reviewed for OXC support |
| pnpm-workspace.yaml | Adds the new tsc-diagnostics-codes task to the workspace |
| pnpm-lock.yaml | Locks tinyglobby dependency version for the new task |
| justfile | Adds update-tsc-diagnostics-codes command to update the error codes list |
| .gitignore | Ignores node_modules for the new task directory |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ed45a7d to
834ca4e
Compare
Boshen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not comfortable maintaining another submodule 😢 please let me study what this PR is actually doing first.
|
Opps I'm mistake, there is actually no submodule, just a task. |
Merge activity
|
…15542) Finally fixes #11582 This PR adds a script that generates a list of TSC error codes. The codes are collected based on the TypeScript version managed by `just submodules`. And the list is then committed to Git. When the submodule version is updated, the script is also called and the list is regenerated. If TSC introduces new diagnostic codes, the diff will show the added code, which we need to review. Either leave it for the parser to report or ignore it if we cannot support it.
834ca4e to
1d8832d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be part of the conformance runner instead of separate js task, which I assume is slow.
I'll get claude to work on this at some point.
|
Then, my Claude will do it tomorrow morning. 🫡 |

Finally fixes #11582
This PR adds a script that generates a list of TSC error codes.
The codes are collected based on the TypeScript version managed by
just submodules.And the list is then committed to Git.
When the submodule version is updated, the script is also called and the list is regenerated.
If TSC introduces new diagnostic codes, the diff will show the added code, which we need to review.
Either leave it for the parser to report or ignore it if we cannot support it.