Skip to content

Conversation

@davidwengier
Copy link
Member

@davidwengier davidwengier commented Jun 21, 2023

FYI @veler

RazorSpellCheck

@davidwengier davidwengier requested a review from a team as a code owner June 21, 2023 07:33
return request.TextDocument;
}

public async Task<VSInternalSpellCheckableRangeReport[]> HandleRequestAsync(VSInternalDocumentSpellCheckableParams request, RazorRequestContext requestContext, CancellationToken cancellationToken)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this supporting Streaming? Can we make sure we support streaming and send chunks of ranges to make sure we don't pass too large objects to the Client?

Copy link
Member Author

@davidwengier davidwengier Jun 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't at the moment, and its a little problematic. There is a limitation in the platform that we can't stream results from our custom message target. We could in theory allow Roslyn to stream the results, and collect the chunks in that target, but we'd have to send all of Roslyns results over to here in one go. Similarly we need to have all of Roslyns results here in one chunk, because we need to combine them with the Razor results, and being a delta based API, everything has to be in order.

We could in theory, once we've done all of the work, send the results back to the client in chunks from here, but I'm not sure that alone is worth it.

Copy link
Contributor

@allisonchou allisonchou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Spell checker responses look very semantic tokens-esque 😊

var ranges = response?.First().Ranges;
Assert.NotNull(ranges);

// To make for easier test failure analysis, we convert the ranges back to the test input, so we can show a diff
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

…heck/DocumentSpellCheckEndpoint.cs

Co-authored-by: Allison Chou <[email protected]>
@davidwengier davidwengier merged commit 0b5b042 into dotnet:main Jun 23, 2023
@davidwengier davidwengier deleted the SpellChecking branch June 23, 2023 06:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants