-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Support IsActiveDocument in RoslynCodeSearchResult #77311
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
Conversation
src/Features/Core/Portable/NavigateTo/INavigateToSearchResult.cs
Outdated
Show resolved
Hide resolved
|
This won't build until a corresponding change lands on the VS side. I just wanted to put drafts up on each side to get feedback on the approach. |
src/Features/Core/Portable/NavigateTo/AbstractNavigateToSearchService.NormalSearch.cs
Show resolved
Hide resolved
d2cc2b8 to
33adb91
Compare
|
@tmat locally, this build is failing during SemanticSearch's |
33adb91 to
cc4b644
Compare
|
@sandyarmstrong what version of the platform apis do we need to update to to get this new api? |
17.14 stable packages. At the time of this PR, I was trying to integrate MS.VS.Search |
|
@sandyarmstrong made the changes i think are relevant. |
|
@jasonmalinowski i'm not sure what to do about the build breaks in CI. This all builds locally for me (on command line and in VS) :( |
This existed back from when the input to the function was a namespace, but that's not the case anymore.
CPS passes us an INamespaceSymbol that is the global namespace symbol; it doesn't have a containing assembly. It does have a containing Compilation though, which is what we actually need. Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/2506795 Fixes #78697
I'm not sure why this ever took an INamespaceSymbol in the first place, but we either have code working around it, or having an (old) comment saying the code was wrong.
48de68b to
d3589f0
Compare
Cyrus fixed #77051, opening the door for All-in-one Search's "Current Document" scope to include results from base types and partial types (not literally the current document).
To avoid confusing users, it was suggested that we should prioritize results from the literal current document. Since providers are already checking this, we decided to add
CodeSearchResult.IsActiveDocumentto the existing API so that providers can set the flag for AIOS to check during sorting.Now results with that flag set will rise to the top when the user has the "Current Document" scope set.