Remove declaration-only-compilation from CompilationTracker#56139
Remove declaration-only-compilation from CompilationTracker#56139CyrusNajmabadi merged 24 commits intodotnet:mainfrom
Conversation
src/Workspaces/Core/Portable/Workspace/Solution/SolutionState.CompilationTracker.State.cs
Show resolved
Hide resolved
src/Workspaces/Core/Portable/Workspace/Solution/SolutionState.CompilationTracker.State.cs
Show resolved
Hide resolved
| if (!this.SupportsCompilation) | ||
| return false; | ||
|
|
||
| var tasks = this.Documents.Select(async d => |
There was a problem hiding this comment.
Source generated documents?
There was a problem hiding this comment.
nope! i want to make sure we have a way to do source-gen'ed docs in a way that features can say if they need low-latency or not. We don't want to slow down things like 'add using' behind arbitrary 3rd party code. let's chat about a plan on that for monday.
There was a problem hiding this comment.
Agreed, we probably want some flag here or something, but needs to be done carefully.
src/Workspaces/Core/Portable/FindSymbols/Declarations/DeclarationFinder.cs
Show resolved
Hide resolved
src/Workspaces/Core/Portable/Workspace/Solution/SolutionState.CompilationTracker.cs
Show resolved
Hide resolved
src/Workspaces/Core/Portable/Workspace/Solution/SolutionState.CompilationTracker.cs
Outdated
Show resolved
Hide resolved
...le/LanguageServices/DeclaredSymbolFactoryService/AbstractDeclaredSymbolInfoFactoryService.cs
Show resolved
Hide resolved
0906b28 to
c0a7943
Compare
src/Workspaces/Core/Portable/Workspace/Solution/SolutionState.CompilationTracker.cs
Show resolved
Hide resolved
src/Workspaces/Core/Portable/Workspace/Solution/SolutionState.CompilationTracker.State.cs
Outdated
Show resolved
Hide resolved
|
@jasonmalinowski this is ready for review. |
jasonmalinowski
left a comment
There was a problem hiding this comment.
, and I love the state renames to things that explain a lot more their current needs.
| /// produce in progress snapshots that can be accessed from other threads. | ||
| /// </summary> | ||
| private Task<CompilationInfo> BuildCompilationInfoAsync( | ||
| private async Task<CompilationInfo> BuildCompilationInfoAsync( |
There was a problem hiding this comment.
Did we need the async here?
There was a problem hiding this comment.
(we had gotten away with not needing the extra state machine before, not sure what forced it now)
| WriteState(new FullDeclarationState(compilation, TextDocumentStates<SourceGeneratedDocumentState>.Empty, generatorDriver: null, generatedDocumentsAreFinal: false), solutionServices); | ||
| WriteState(new AllSyntaxTreesParsedState(compilation, generatedDocuments, generatorDriver, generatedDocumentsAreFinal), solutionServices); |
There was a problem hiding this comment.
Hmm, good catch to make sure we don't lose these -- I can't tell if we had a bug here before (where in some obscure cases we might end up losing prior generated documents), or whether we couldn't have gotten here before once we had generated everything.
| if (!this.SupportsCompilation) | ||
| return false; | ||
|
|
||
| var tasks = this.Documents.Select(async d => |
There was a problem hiding this comment.
Agreed, we probably want some flag here or something, but needs to be done carefully.
| // full compilation if we don't have that. | ||
| // Do a quick syntactic check first using our cheaply built indices. That will help us avoid creating | ||
| // a compilation here if it's not necessary. In the case of an exact name search we can call a special | ||
| // overload that quickly uses the direct bloom-filter identifier maps in the index. If it's nto an |
There was a problem hiding this comment.
| // overload that quickly uses the direct bloom-filter identifier maps in the index. If it's nto an | |
| // overload that quickly uses the direct bloom-filter identifier maps in the index. If it's not an |
We used this compilation to speed up some string searches for certain features (and some public APIs we have). Turns out we don't need this given the indices we already have for features like FAR and NavTo. Given this, we can remove this compilation and simplify the compilation tracker a bunch.