Merged
Conversation
5cb898b to
6b8c3b0
Compare
bdc6a87 to
6c45020
Compare
effb755 to
84a30bd
Compare
d3f4fb2 to
7470447
Compare
Member
Author
|
@dotnet/roslyn-ide ptal |
sharwell
reviewed
Mar 19, 2024
src/Features/CSharp/Portable/SemanticSearch/CSharpSemanticSearchService.cs
Show resolved
Hide resolved
sharwell
previously requested changes
Mar 19, 2024
Contributor
sharwell
left a comment
There was a problem hiding this comment.
Feature must be able to operate when ServiceHub is disabled.
src/Features/CSharp/Portable/SemanticSearch/CSharpSemanticSearchUtilities.cs
Outdated
Show resolved
Hide resolved
sharwell
reviewed
Mar 19, 2024
sharwell
reviewed
Mar 19, 2024
genlu
reviewed
Mar 29, 2024
genlu
approved these changes
Mar 29, 2024
Member
genlu
left a comment
There was a problem hiding this comment.
The change looks good to me (except for the part involves metadata manipulation, which is way over my head, could use some detailed comments there 😄)
src/Features/Core/Portable/SemanticSearch/IRemoteSemanticSearchService.cs
Show resolved
Hide resolved
src/Tools/SemanticSearch/ReferenceAssemblies/ApiSet/System.Collections.Immutable.txt
Show resolved
Hide resolved
Contributor
|
Could you include some gifs of the whole experience in action? Thanks :) |
Co-authored-by: Cyrus Najmabadi <[email protected]>
333fred
added a commit
to 333fred/roslyn
that referenced
this pull request
Apr 3, 2024
* upstream/main: (416 commits) Semantic search (dotnet#71268) Make more static Fix MEF import of IExternalCSharpCopilotCodeAnalysisService to allow null Make static Make private Add comments Add method name to TimeInQueue telemetry (dotnet#72841) switch to frozen Simplify Add test Downstream Use singular helper when creating checksumsw Use singular helper when creating checksumsw Remove ability for a project to change its language Revert "Avoid creating result temp for is-expressions (dotnet#72273)" (dotnet#72827) Localized file check-in by OneLocBuild Task: Build definition ID 327: Build ID 2420199 Localized file check-in by OneLocBuild Task: Build definition ID 327: Build ID 2420199 Localized file check-in by OneLocBuild Task: Build definition ID 327: Build ID 2420199 Localized file check-in by OneLocBuild Task: Build definition ID 327: Build ID 2420199 Improve generic type argument list error recovery (dotnet#69734) ...
This was referenced Apr 13, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements Semantic Search IDE feature.
There are a few parts to it:
The window is a Gladstone Tool Window. Currently, we need to construct the XAML tree for the window content manually due to some Gladstone limitations (tracked as TODOs in code). The window implementation should simplify significantly once these limitations are removed.
Like in Interactive Window, we use
Ctrl+Enterto run the query andEscapeto cancel running query.Ctrl+Enteroverrides "insert empty line above" editor command. We can come up with another key binding to avoid the override but Ctrl+Enter is very intuitive for "submission".The implementation is in
src\VisualStudio\CSharp\Impl\SemanticSearch\SemanticSearchToolWindow.cs.A new workspace with kind
SemanticWorkspacethat has a solution with a single C# project that contains the query document (content of the tool window editor) and provides IDE services.This service runs in OOP only (and only on .NET 8+). The service creates a compilation, emits in-memory assembly with instrumentation injecting stack overflow and cancellation probes, executes
Findmethod defined in the compilation and streams resulting symbols back in-proc as DefinitionItems to be displayed in FAR window.We limit the set of APIs the search can use to Roslyn APIs and runtime APIs that we deem safe to run in our OOP.
The assemblies are generated from Roslyn CodeAnalysis assemblies and runtime reference assemblies by a build task implemented in Tools/SemanticSearch/BuildTask.
The task takes an assembly and text file that lists include/exclude patterns of API names in doc comment format (similar to banned APIs) and writes out an assembly, where excluded types and members are marked "private". The output assembly has a unique mvid and is meant only to be used as a reference assembly used for Semantic Search.
Follow up work:
#72585
#72617