Skip to content
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

Port validate breakpoint endpoint to cohosting #11352

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

davidwengier
Copy link
Contributor

Fixes #11337
Needs dotnet/roslyn#76629

Ports one endpoint to cohosting
Updates two IVsLanguageInfo entry points to call cohosting in OOP rather than making LSP calls.

These mostly just call Roslyn and don't do anything interesting with the results. I thought about making some changes here (eg, does __o need to be a proximity expression?) but given the very low test coverage of our existing code, I didn't want to rock the boat.

@davidwengier davidwengier requested a review from a team as a code owner January 6, 2025 06:26
@davidwengier davidwengier changed the title Port validate breakpoint endpoint to cohostingN Port validate breakpoint endpoint to cohosting Jan 6, 2025
// We've seen this request before. Hopefully the TryGetTextVersion call above was successful so this whole path
// will have been sync, and the cache will have been useful.
return cachedRange;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: Seems like mostly the same as first part of equivalent method of RazorBreakpointResolver? No huge savings, but I wonder if a generic helper method (with ChacheKey subtype being type parameter) or maybe even a simple base class would make sense. No strong feelings here, just seeing almost identical code as I'm reading it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think if there were more of these sorts of things, I could see us having two different interfaces (ie ILspBreakpointResolver and ICohostBreakpointResolver) and each impl could share a base class etc. but I'm not sure it makes sense for just two. Perhaps in future if something like this comes up we could do something interesting with some custom MEF attributes so that the right impl gets magically imported.

Copy link
Contributor

@alexgav alexgav left a comment

Choose a reason for hiding this comment

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

:shipit:

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.

Port breakpoint and debugging endpoints to cohosting
3 participants