Fix Razor mapping errors in the log #6209
Merged
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.
Client side of dotnet/razor#9151
We were getting errors from
razor/mapDocumentRange
in the logs, and at least one of the reasons was 2 seconds after a document close, we try to update diagnostics for the .razor document, which then tries to remap the ranges for those diagnostics, but we've just closed the file, the so it fails.This fixes that by doing the mapping on the server, which is where it should have happened anyway, so also improves perf.
Will push a Razor insertion to this PR too, once dotnet/razor#9151 has been merged.