refactor(linter/plugins): store messageId in diagnostics#16296
Merged
graphite-app[bot] merged 1 commit intomainfrom Nov 30, 2025
Merged
Conversation
Member
Author
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. |
65cd570 to
c56d44d
Compare
f0114a9 to
25da8e1
Compare
c56d44d to
72b48e7
Compare
Contributor
Merge activity
|
Store `messageId` in `DiagnosticReport` objects. It's not required for sending to Rust, but it is needed for rule tester (#16206). I think it's fine to add a little code that's redundant in the main runtime, because it only has an overhead when a rule produces diagnostics, which should be an uncommon path.
25da8e1 to
9de386d
Compare
72b48e7 to
1af1091
Compare
Base automatically changed from
11-30-refactor_linter_plugins_move_placeholder_replacement_into_own_function
to
main
November 30, 2025 23:56
camc314
reviewed
Dec 1, 2025
graphite-app bot
pushed a commit
that referenced
this pull request
Dec 3, 2025
…cReport` before sending to Rust (#16442) As @camc314 pointed out in #16296 (review): It's probably cheaper to leave the `messageId` field present in the JSON sent over to Rust and let `serde` handle skipping it, than to loop through all the diagnostics on JS side to remove it. `RuleTester` should be moved into a separate NPM package (#16018), at which point we can do a different build for that package, and not have `messageId` stored in `DiagnosticReport` in the first place in the main build. So then this issue will become moot.
taearls
pushed a commit
to taearls/oxc
that referenced
this pull request
Dec 11, 2025
…ct#16296) Store `messageId` in `DiagnosticReport` objects. It's not required for sending to Rust, but it is needed for rule tester (oxc-project#16206). I think it's fine to add a little code that's redundant in the main runtime, because it only has an overhead when a rule produces diagnostics, which should be an uncommon path.
taearls
pushed a commit
to taearls/oxc
that referenced
this pull request
Dec 11, 2025
…cReport` before sending to Rust (oxc-project#16442) As @camc314 pointed out in oxc-project#16296 (review): It's probably cheaper to leave the `messageId` field present in the JSON sent over to Rust and let `serde` handle skipping it, than to loop through all the diagnostics on JS side to remove it. `RuleTester` should be moved into a separate NPM package (oxc-project#16018), at which point we can do a different build for that package, and not have `messageId` stored in `DiagnosticReport` in the first place in the main build. So then this issue will become moot.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Store
messageIdinDiagnosticReportobjects. It's not required for sending to Rust, but it is needed for rule tester (#16206).I think it's fine to add a little code that's redundant in the main runtime, because it only has an overhead when a rule produces diagnostics, which should be an uncommon path.