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
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.
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 previousv2
namespace to the crate root, which implies rewriting pretty much every import ofrome_diagnostics
.The only 2 parts of the previous API still in use are the
CodeSuggestion
struct (this remains in thesuggestion
module ofrome_diagnostics
) and theSpan
trait (this was moved to thespan
module ofrome_js_parser
since it's only used there and could be confused with theAsSpan
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.