Conversation
dibarbet
left a comment
There was a problem hiding this comment.
lgtm, apologies for not getting to this sooner - def ping me directly on teams if its taking too long.
|
|
||
| internal static class FindAllReferences | ||
| { | ||
| public static async Task<SumType<VSInternalReferenceItem, Location>[]?> FindReferencesAsync(Workspace workspace, Document document, LinePosition linePosition, bool supportsVSExtensions, CancellationToken cancellationToken) |
There was a problem hiding this comment.
You might consider having a progress parameter here and passing it in from Razor - otherwise you could be waiting a while for anything to stream in. I don't think you need all the references before you can do anything with them right?
There was a problem hiding this comment.
Right now Razor doesn't support streaming at all, because the LSP client middle layer doesn't. Cohosting removes that limitation, but none of our shared code on the Razor file knows how to deal with it, plus we'd have to work out how to stream things from OOP back to devenv to send to the language client, so I just decided to punt all of that until later :)
Fixes #11237 Needs dotnet/roslyn#76002 and a version bump Very simple one, though I was a little cheeky. There is basically no code that could be shared, except for code that removes `__o` and `k_BackingField` from the results, but those methods operate on VS LSP types. Given cohosting largely uses Roslyn LSP types, and will be exclusively FUSE, and FUSE doesn't have `__o`, I just skipped that bit. Confirmed in VS that having cohosting and FUSE on makes for nice looking results with no generated code artifacts. Side note: I don't think anything will ever have `k_BackingField` in the results, but there is zero test coverage so who knows! 😁
Roslyn side of dotnet/razor#11237