-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose FAR to cohosting #76002
Expose FAR to cohosting #76002
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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