Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

refactor(rome_diagnostics): remove the legacy Diagnostics API #3811

Merged
merged 2 commits into from
Nov 21, 2022

Conversation

leops
Copy link
Contributor

@leops leops commented Nov 21, 2022

Summary

The old rome_diagnostics API isn't being used by anything anymore, so this PR removes it. Most of the changes come from moving the previous v2 namespace to the crate root, which implies rewriting pretty much every import of rome_diagnostics.
The only 2 parts of the previous API still in use are the CodeSuggestion struct (this remains in the suggestion module of rome_diagnostics) and the Span trait (this was moved to the span module of rome_js_parser since it's only used there and could be confused with the AsSpan trait exposed by the new diagnostics API).

Test Plan

This is purely a type-level change with no modification to the logic of the code, so all of it should be checked by rustc at compile time.

@leops leops requested a review from a team November 21, 2022 08:53
@netlify
Copy link

netlify bot commented Nov 21, 2022

Deploy Preview for docs-rometools canceled.

Name Link
🔨 Latest commit 04be0ca
🔍 Latest deploy log https://app.netlify.com/sites/docs-rometools/deploys/637b3f27ce9874000827be59

@github-actions
Copy link

Parser conformance results on ubuntu-latest

js/262

Test result main count This PR count Difference
Total 45879 45879 0
Passed 44936 44936 0
Failed 943 943 0
Panics 0 0 0
Coverage 97.94% 97.94% 0.00%

jsx/babel

Test result main count This PR count Difference
Total 39 39 0
Passed 36 36 0
Failed 3 3 0
Panics 0 0 0
Coverage 92.31% 92.31% 0.00%

symbols/microsoft

Test result main count This PR count Difference
Total 5946 5946 0
Passed 1621 1621 0
Failed 4325 4325 0
Panics 0 0 0
Coverage 27.26% 27.26% 0.00%

ts/babel

Test result main count This PR count Difference
Total 588 588 0
Passed 519 519 0
Failed 69 69 0
Panics 0 0 0
Coverage 88.27% 88.27% 0.00%

ts/microsoft

Test result main count This PR count Difference
Total 16257 16257 0
Passed 12397 12397 0
Failed 3860 3860 0
Panics 0 0 0
Coverage 76.26% 76.26% 0.00%

@leops leops added the A-Diagnostic Area: errors and diagnostics label Nov 21, 2022
@ematipico ematipico merged commit f17ace3 into main Nov 21, 2022
@ematipico ematipico deleted the refactor/remove-legacy-diagnostics branch November 21, 2022 11:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Diagnostic Area: errors and diagnostics
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants