From 26248fcaadaa93386efdcd942a392ee0a4dffd5b Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Mon, 28 Nov 2022 16:37:47 -0800 Subject: [PATCH 1/5] Rename methods --- .../Portable/FindSymbols/Declarations/DeclarationFinder.cs | 6 +++--- .../Declarations/DeclarationFinder_AllDeclarations.cs | 4 ++-- .../Declarations/DeclarationFinder_SourceDeclarations.cs | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Workspaces/Core/Portable/FindSymbols/Declarations/DeclarationFinder.cs b/src/Workspaces/Core/Portable/FindSymbols/Declarations/DeclarationFinder.cs index 588f3fb7f9046..51ef018584465 100644 --- a/src/Workspaces/Core/Portable/FindSymbols/Declarations/DeclarationFinder.cs +++ b/src/Workspaces/Core/Portable/FindSymbols/Declarations/DeclarationFinder.cs @@ -17,19 +17,19 @@ namespace Microsoft.CodeAnalysis.FindSymbols { internal static partial class DeclarationFinder { - private static Task AddCompilationDeclarationsWithNormalQueryAsync( + private static Task AddCompilationSourceDeclarationsWithNormalQueryAsync( Project project, SearchQuery query, SymbolFilter filter, ArrayBuilder list, CancellationToken cancellationToken) { Contract.ThrowIfTrue(query.Kind == SearchKind.Custom, "Custom queries are not supported in this API"); - return AddCompilationDeclarationsWithNormalQueryAsync( + return AddCompilationSourceDeclarationsWithNormalQueryAsync( project, query, filter, list, startingCompilation: null, startingAssembly: null, cancellationToken: cancellationToken); } - private static async Task AddCompilationDeclarationsWithNormalQueryAsync( + private static async Task AddCompilationSourceDeclarationsWithNormalQueryAsync( Project project, SearchQuery query, SymbolFilter filter, diff --git a/src/Workspaces/Core/Portable/FindSymbols/Declarations/DeclarationFinder_AllDeclarations.cs b/src/Workspaces/Core/Portable/FindSymbols/Declarations/DeclarationFinder_AllDeclarations.cs index 896b7613e04a1..248136b24aaad 100644 --- a/src/Workspaces/Core/Portable/FindSymbols/Declarations/DeclarationFinder_AllDeclarations.cs +++ b/src/Workspaces/Core/Portable/FindSymbols/Declarations/DeclarationFinder_AllDeclarations.cs @@ -66,7 +66,7 @@ internal static async Task> FindAllDeclarationsWithNorma var compilation = await project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false); // get declarations from the compilation's assembly - await AddCompilationDeclarationsWithNormalQueryAsync( + await AddCompilationSourceDeclarationsWithNormalQueryAsync( project, query, criteria, buffer, cancellationToken).ConfigureAwait(false); // get declarations from directly referenced projects and metadata @@ -75,7 +75,7 @@ await AddCompilationDeclarationsWithNormalQueryAsync( var assemblyProject = project.Solution.GetProject(assembly, cancellationToken); if (assemblyProject != null) { - await AddCompilationDeclarationsWithNormalQueryAsync( + await AddCompilationSourceDeclarationsWithNormalQueryAsync( assemblyProject, query, criteria, buffer, compilation, assembly, cancellationToken).ConfigureAwait(false); } diff --git a/src/Workspaces/Core/Portable/FindSymbols/Declarations/DeclarationFinder_SourceDeclarations.cs b/src/Workspaces/Core/Portable/FindSymbols/Declarations/DeclarationFinder_SourceDeclarations.cs index 23fbe41fdcc08..a9a7066a8cd4a 100644 --- a/src/Workspaces/Core/Portable/FindSymbols/Declarations/DeclarationFinder_SourceDeclarations.cs +++ b/src/Workspaces/Core/Portable/FindSymbols/Declarations/DeclarationFinder_SourceDeclarations.cs @@ -182,7 +182,7 @@ internal static async Task> FindSourceDeclarationsWithNo using var _ = ArrayBuilder.GetInstance(out var result); foreach (var project in solution.Projects) { - await AddCompilationDeclarationsWithNormalQueryAsync( + await AddCompilationSourceDeclarationsWithNormalQueryAsync( project, query, criteria, result, cancellationToken).ConfigureAwait(false); } @@ -195,7 +195,7 @@ internal static async Task> FindSourceDeclarationsWithNo using var _ = ArrayBuilder.GetInstance(out var result); using var query = SearchQuery.Create(name, ignoreCase); - await AddCompilationDeclarationsWithNormalQueryAsync( + await AddCompilationSourceDeclarationsWithNormalQueryAsync( project, query, filter, result, cancellationToken).ConfigureAwait(false); return result.ToImmutable(); From 4b20a8219e9df5dfb1beb51aa162353577467e4c Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Mon, 28 Nov 2022 17:00:55 -0800 Subject: [PATCH 2/5] Avoid producing compilations in Add-Import when we can prove there are no results --- .../Declarations/DeclarationFinder.cs | 40 ++-------- .../DeclarationFinder_AllDeclarations.cs | 80 +++++++++++++------ .../FindSymbols/SymbolTree/SymbolTreeInfo.cs | 15 ++-- 3 files changed, 70 insertions(+), 65 deletions(-) diff --git a/src/Workspaces/Core/Portable/FindSymbols/Declarations/DeclarationFinder.cs b/src/Workspaces/Core/Portable/FindSymbols/Declarations/DeclarationFinder.cs index 51ef018584465..85c6b1ffa428b 100644 --- a/src/Workspaces/Core/Portable/FindSymbols/Declarations/DeclarationFinder.cs +++ b/src/Workspaces/Core/Portable/FindSymbols/Declarations/DeclarationFinder.cs @@ -17,25 +17,11 @@ namespace Microsoft.CodeAnalysis.FindSymbols { internal static partial class DeclarationFinder { - private static Task AddCompilationSourceDeclarationsWithNormalQueryAsync( - Project project, SearchQuery query, SymbolFilter filter, - ArrayBuilder list, CancellationToken cancellationToken) - { - Contract.ThrowIfTrue(query.Kind == SearchKind.Custom, "Custom queries are not supported in this API"); - return AddCompilationSourceDeclarationsWithNormalQueryAsync( - project, query, filter, list, - startingCompilation: null, - startingAssembly: null, - cancellationToken: cancellationToken); - } - private static async Task AddCompilationSourceDeclarationsWithNormalQueryAsync( Project project, SearchQuery query, SymbolFilter filter, ArrayBuilder list, - Compilation? startingCompilation, - IAssemblySymbol? startingAssembly, CancellationToken cancellationToken) { if (!project.SupportsCompilation) @@ -76,23 +62,14 @@ private static async Task AddCompilationSourceDeclarationsWithNormalQueryAsync( var symbolsWithName = symbols.ToImmutableArray(); - if (startingCompilation != null && startingAssembly != null && !Equals(compilation.Assembly, startingAssembly)) - { - // Return symbols from skeleton assembly in this case so that symbols have - // the same language as startingCompilation. - symbolsWithName = symbolsWithName.Select(s => s.GetSymbolKey(cancellationToken).Resolve(startingCompilation, cancellationToken: cancellationToken).Symbol) - .WhereNotNull() - .ToImmutableArray(); - } - list.AddRange(FilterByCriteria(symbolsWithName, filter)); } } private static async Task AddMetadataDeclarationsWithNormalQueryAsync( Project project, - IAssemblySymbol assembly, - PortableExecutableReference? reference, + AsyncLazy lazyAssembly, + PortableExecutableReference reference, SearchQuery query, SymbolFilter filter, ArrayBuilder list, @@ -104,16 +81,13 @@ private static async Task AddMetadataDeclarationsWithNormalQueryAsync( using (Logger.LogBlock(FunctionId.SymbolFinder_Assembly_AddDeclarationsAsync, cancellationToken)) { - if (reference != null) - { - var info = await SymbolTreeInfo.GetInfoForMetadataReferenceAsync( - project.Solution, reference, checksum: null, cancellationToken).ConfigureAwait(false); + var info = await SymbolTreeInfo.GetInfoForMetadataReferenceAsync( + project.Solution, reference, checksum: null, cancellationToken).ConfigureAwait(false); - Contract.ThrowIfNull(info); + Contract.ThrowIfNull(info); - var symbols = await info.FindAsync(query, assembly, filter, cancellationToken).ConfigureAwait(false); - list.AddRange(symbols); - } + var symbols = await info.FindAsync(query, lazyAssembly, filter, cancellationToken).ConfigureAwait(false); + list.AddRange(symbols); } } diff --git a/src/Workspaces/Core/Portable/FindSymbols/Declarations/DeclarationFinder_AllDeclarations.cs b/src/Workspaces/Core/Portable/FindSymbols/Declarations/DeclarationFinder_AllDeclarations.cs index 248136b24aaad..3ffffd4a5e08f 100644 --- a/src/Workspaces/Core/Portable/FindSymbols/Declarations/DeclarationFinder_AllDeclarations.cs +++ b/src/Workspaces/Core/Portable/FindSymbols/Declarations/DeclarationFinder_AllDeclarations.cs @@ -5,6 +5,7 @@ using System; using System.Collections.Generic; using System.Collections.Immutable; +using System.Linq; using System.Threading; using System.Threading.Tasks; using Microsoft.CodeAnalysis.PooledObjects; @@ -61,48 +62,75 @@ internal static async Task> FindAllDeclarationsWithNorma using var _1 = ArrayBuilder.GetInstance(out var buffer); using var _2 = ArrayBuilder.GetInstance(out var result); + // Lazily produce the compilation. We don't want to incur any costs (especially source generators) if there + // are no results for this query in this project. + var lazyCompilation = new AsyncLazy(project.GetRequiredCompilationAsync, cacheResult: true); + if (project.SupportsCompilation) { - var compilation = await project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false); - // get declarations from the compilation's assembly await AddCompilationSourceDeclarationsWithNormalQueryAsync( project, query, criteria, buffer, cancellationToken).ConfigureAwait(false); - // get declarations from directly referenced projects and metadata - foreach (var assembly in compilation.GetReferencedAssemblySymbols()) + // get declarations from directly referenced projects + foreach (var projectReference in project.ProjectReferences) { - var assemblyProject = project.Solution.GetProject(assembly, cancellationToken); - if (assemblyProject != null) - { - await AddCompilationSourceDeclarationsWithNormalQueryAsync( - assemblyProject, query, criteria, buffer, - compilation, assembly, cancellationToken).ConfigureAwait(false); - } - else + buffer.Clear(); + + var referencedProject = project.Solution.GetProject(projectReference.ProjectId); + if (referencedProject is null) + continue; + + await AddCompilationSourceDeclarationsWithNormalQueryAsync( + referencedProject, query, criteria, buffer, cancellationToken).ConfigureAwait(false); + + // Add all the results. If they're from a different language, attempt to map them back into the + // starting project's language. + await AddAllAsync(buffer, mapSymbol: referencedProject.Language != project.Language).ConfigureAwait(false); + } + + // get declarations from directly referenced metadata + foreach (var peReference in project.MetadataReferences.OfType()) + { + buffer.Clear(); + + var lazyAssembly = new AsyncLazy(async cancellationToken => { - await AddMetadataDeclarationsWithNormalQueryAsync( - project, assembly, compilation.GetMetadataReference(assembly) as PortableExecutableReference, - query, criteria, buffer, cancellationToken).ConfigureAwait(false); - } + var compilation = await lazyCompilation.GetValueAsync(cancellationToken).ConfigureAwait(false); + var assemblySymbol = compilation.GetAssemblyOrModuleSymbol(peReference) as IAssemblySymbol; + return assemblySymbol; + }, cacheResult: true); + + await AddMetadataDeclarationsWithNormalQueryAsync( + project, lazyAssembly, peReference, + query, criteria, buffer, cancellationToken).ConfigureAwait(false); + + await AddAllAsync(buffer, mapSymbol: false).ConfigureAwait(false); } + } + + return result.ToImmutable(); + + async Task AddAllAsync(ArrayBuilder buffer, bool mapSymbol) + { + if (buffer.Count == 0) + return; + + var compilation = await lazyCompilation.GetValueAsync(cancellationToken).ConfigureAwait(false); // Make certain all namespace symbols returned by API are from the compilation // for the passed in project. foreach (var symbol in buffer) { - if (symbol is INamespaceSymbol ns) - { - result.AddIfNotNull(compilation.GetCompilationNamespace(ns)); - } - else - { - result.Add(symbol); - } + var mappedSymbol = mapSymbol + ? symbol.GetSymbolKey(cancellationToken).Resolve(compilation, cancellationToken: cancellationToken).Symbol + : symbol; + + result.AddIfNotNull(mappedSymbol is INamespaceSymbol ns + ? compilation.GetCompilationNamespace(ns) + : mappedSymbol); } } - - return result.ToImmutable(); } private static async Task> RehydrateAsync( diff --git a/src/Workspaces/Core/Portable/FindSymbols/SymbolTree/SymbolTreeInfo.cs b/src/Workspaces/Core/Portable/FindSymbols/SymbolTree/SymbolTreeInfo.cs index f8635af1c7d95..e3d6678c3d727 100644 --- a/src/Workspaces/Core/Portable/FindSymbols/SymbolTree/SymbolTreeInfo.cs +++ b/src/Workspaces/Core/Portable/FindSymbols/SymbolTree/SymbolTreeInfo.cs @@ -59,7 +59,7 @@ internal partial class SymbolTreeInfo : IChecksummedObject /// For non-array simple types, the receiver type name would be its metadata name, e.g. "Int32". /// For any array types with simple type as element, the receiver type name would be just "ElementTypeName[]", e.g. "Int32[]" for int[][,] /// For non-array complex types, the receiver type name is "". - /// For any array types with complex type as element, the receier type name is "[]" + /// For any array types with complex type as element, the receiver type name is "[]" /// private readonly MultiDictionary? _receiverTypeNameToExtensionMethodMap; @@ -126,11 +126,11 @@ public Task> FindAsync( Contract.ThrowIfTrue(query.Kind == SearchKind.Custom, "Custom queries are not supported in this API"); return this.FindAsync( - query, new AsyncLazy(assembly), filter, cancellationToken); + query, new AsyncLazy(assembly), filter, cancellationToken); } public async Task> FindAsync( - SearchQuery query, AsyncLazy lazyAssembly, + SearchQuery query, AsyncLazy lazyAssembly, SymbolFilter filter, CancellationToken cancellationToken) { // All entrypoints to this function are Find functions that are only searching @@ -143,7 +143,7 @@ public async Task> FindAsync( } private Task> FindCoreAsync( - SearchQuery query, AsyncLazy lazyAssembly, CancellationToken cancellationToken) + SearchQuery query, AsyncLazy lazyAssembly, CancellationToken cancellationToken) { // All entrypoints to this function are Find functions that are only searching // for specific strings (i.e. they never do a custom search). @@ -168,7 +168,7 @@ private Task> FindCoreAsync( /// Finds symbols in this assembly that match the provided name in a fuzzy manner. /// private async Task> FuzzyFindAsync( - AsyncLazy lazyAssembly, string name, CancellationToken cancellationToken) + AsyncLazy lazyAssembly, string name, CancellationToken cancellationToken) { var similarNames = _spellChecker.FindSimilarWords(name, substringsAreSimilar: false); var result = ArrayBuilder.GetInstance(); @@ -186,7 +186,7 @@ private async Task> FuzzyFindAsync( /// Get all symbols that have a name matching the specified name. /// private async Task> FindAsync( - AsyncLazy lazyAssembly, + AsyncLazy lazyAssembly, string name, bool ignoreCase, CancellationToken cancellationToken) @@ -206,6 +206,9 @@ private async Task> FindAsync( if (ignoreCase || StringComparer.Ordinal.Equals(name, node.Name)) { assemblySymbol ??= await lazyAssembly.GetValueAsync(cancellationToken).ConfigureAwait(false); + if (assemblySymbol is null) + return ImmutableArray.Empty; + Bind(index, assemblySymbol.GlobalNamespace, ref results.AsRef(), cancellationToken); } } From ace7b1687542230ea123f1a7174c28a5cdd8adce Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Mon, 28 Nov 2022 17:07:18 -0800 Subject: [PATCH 3/5] Simplify futher --- .../DeclarationFinder_AllDeclarations.cs | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/src/Workspaces/Core/Portable/FindSymbols/Declarations/DeclarationFinder_AllDeclarations.cs b/src/Workspaces/Core/Portable/FindSymbols/Declarations/DeclarationFinder_AllDeclarations.cs index 3ffffd4a5e08f..14b97a337574c 100644 --- a/src/Workspaces/Core/Portable/FindSymbols/Declarations/DeclarationFinder_AllDeclarations.cs +++ b/src/Workspaces/Core/Portable/FindSymbols/Declarations/DeclarationFinder_AllDeclarations.cs @@ -59,8 +59,7 @@ public static async Task> FindAllDeclarationsWithNormalQ internal static async Task> FindAllDeclarationsWithNormalQueryInCurrentProcessAsync( Project project, SearchQuery query, SymbolFilter criteria, CancellationToken cancellationToken) { - using var _1 = ArrayBuilder.GetInstance(out var buffer); - using var _2 = ArrayBuilder.GetInstance(out var result); + using var _1 = ArrayBuilder.GetInstance(out var result); // Lazily produce the compilation. We don't want to incur any costs (especially source generators) if there // are no results for this query in this project. @@ -68,14 +67,22 @@ internal static async Task> FindAllDeclarationsWithNorma if (project.SupportsCompilation) { - // get declarations from the compilation's assembly - await AddCompilationSourceDeclarationsWithNormalQueryAsync( - project, query, criteria, buffer, cancellationToken).ConfigureAwait(false); + // Search in the source symbols for this project first. + { + using var _2 = ArrayBuilder.GetInstance(out var buffer); + + // get declarations from the compilation's assembly + await AddCompilationSourceDeclarationsWithNormalQueryAsync( + project, query, criteria, buffer, cancellationToken).ConfigureAwait(false); + + // No need to map symbols since we're looking in the starting project. + await AddAllAsync(buffer, mapSymbol: false).ConfigureAwait(false); + } // get declarations from directly referenced projects foreach (var projectReference in project.ProjectReferences) { - buffer.Clear(); + using var _2 = ArrayBuilder.GetInstance(out var buffer); var referencedProject = project.Solution.GetProject(projectReference.ProjectId); if (referencedProject is null) @@ -92,7 +99,7 @@ await AddCompilationSourceDeclarationsWithNormalQueryAsync( // get declarations from directly referenced metadata foreach (var peReference in project.MetadataReferences.OfType()) { - buffer.Clear(); + using var _2 = ArrayBuilder.GetInstance(out var buffer); var lazyAssembly = new AsyncLazy(async cancellationToken => { @@ -105,6 +112,7 @@ await AddMetadataDeclarationsWithNormalQueryAsync( project, lazyAssembly, peReference, query, criteria, buffer, cancellationToken).ConfigureAwait(false); + // No need to map symbols since we're looking in metadata. They will always be in the language of our starting project. await AddAllAsync(buffer, mapSymbol: false).ConfigureAwait(false); } } From 0e91a9a9e01dfe6dc2561572b099271bfb35e4c6 Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Mon, 28 Nov 2022 17:09:50 -0800 Subject: [PATCH 4/5] Simplify --- .../DeclarationFinder_AllDeclarations.cs | 37 ++++++++++++------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/src/Workspaces/Core/Portable/FindSymbols/Declarations/DeclarationFinder_AllDeclarations.cs b/src/Workspaces/Core/Portable/FindSymbols/Declarations/DeclarationFinder_AllDeclarations.cs index 14b97a337574c..fc5d8e3af64bb 100644 --- a/src/Workspaces/Core/Portable/FindSymbols/Declarations/DeclarationFinder_AllDeclarations.cs +++ b/src/Workspaces/Core/Portable/FindSymbols/Declarations/DeclarationFinder_AllDeclarations.cs @@ -59,30 +59,40 @@ public static async Task> FindAllDeclarationsWithNormalQ internal static async Task> FindAllDeclarationsWithNormalQueryInCurrentProcessAsync( Project project, SearchQuery query, SymbolFilter criteria, CancellationToken cancellationToken) { - using var _1 = ArrayBuilder.GetInstance(out var result); + using var _ = ArrayBuilder.GetInstance(out var result); // Lazily produce the compilation. We don't want to incur any costs (especially source generators) if there // are no results for this query in this project. var lazyCompilation = new AsyncLazy(project.GetRequiredCompilationAsync, cacheResult: true); if (project.SupportsCompilation) + { + await SearchCurrentProjectAsync().ConfigureAwait(false); + await SearchProjectReferencesAsync().ConfigureAwait(false); + await SearchMetadataReferencesAsync().ConfigureAwait(false); + } + + return result.ToImmutable(); + + async Task SearchCurrentProjectAsync() { // Search in the source symbols for this project first. - { - using var _2 = ArrayBuilder.GetInstance(out var buffer); + using var _ = ArrayBuilder.GetInstance(out var buffer); - // get declarations from the compilation's assembly - await AddCompilationSourceDeclarationsWithNormalQueryAsync( - project, query, criteria, buffer, cancellationToken).ConfigureAwait(false); + // get declarations from the compilation's assembly + await AddCompilationSourceDeclarationsWithNormalQueryAsync( + project, query, criteria, buffer, cancellationToken).ConfigureAwait(false); - // No need to map symbols since we're looking in the starting project. - await AddAllAsync(buffer, mapSymbol: false).ConfigureAwait(false); - } + // No need to map symbols since we're looking in the starting project. + await AddAllAsync(buffer, mapSymbol: false).ConfigureAwait(false); + } + async Task SearchProjectReferencesAsync() + { // get declarations from directly referenced projects foreach (var projectReference in project.ProjectReferences) { - using var _2 = ArrayBuilder.GetInstance(out var buffer); + using var _ = ArrayBuilder.GetInstance(out var buffer); var referencedProject = project.Solution.GetProject(projectReference.ProjectId); if (referencedProject is null) @@ -95,11 +105,14 @@ await AddCompilationSourceDeclarationsWithNormalQueryAsync( // starting project's language. await AddAllAsync(buffer, mapSymbol: referencedProject.Language != project.Language).ConfigureAwait(false); } + } + async Task SearchMetadataReferencesAsync() + { // get declarations from directly referenced metadata foreach (var peReference in project.MetadataReferences.OfType()) { - using var _2 = ArrayBuilder.GetInstance(out var buffer); + using var _ = ArrayBuilder.GetInstance(out var buffer); var lazyAssembly = new AsyncLazy(async cancellationToken => { @@ -117,8 +130,6 @@ await AddMetadataDeclarationsWithNormalQueryAsync( } } - return result.ToImmutable(); - async Task AddAllAsync(ArrayBuilder buffer, bool mapSymbol) { if (buffer.Count == 0) From b7061e41cfd9d88dd5184d02354ff07ffb16e3e3 Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Mon, 28 Nov 2022 17:23:14 -0800 Subject: [PATCH 5/5] nrt --- .../SearchScopes/SourceSymbolsProjectSearchScope.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Features/Core/Portable/AddImport/SearchScopes/SourceSymbolsProjectSearchScope.cs b/src/Features/Core/Portable/AddImport/SearchScopes/SourceSymbolsProjectSearchScope.cs index caa5dde2de8e6..287d8a99be90e 100644 --- a/src/Features/Core/Portable/AddImport/SearchScopes/SourceSymbolsProjectSearchScope.cs +++ b/src/Features/Core/Portable/AddImport/SearchScopes/SourceSymbolsProjectSearchScope.cs @@ -21,11 +21,11 @@ internal abstract partial class AbstractAddImportFeatureService private class SourceSymbolsProjectSearchScope : ProjectSearchScope { - private readonly ConcurrentDictionary> _projectToAssembly; + private readonly ConcurrentDictionary> _projectToAssembly; public SourceSymbolsProjectSearchScope( AbstractAddImportFeatureService provider, - ConcurrentDictionary> projectToAssembly, + ConcurrentDictionary> projectToAssembly, Project project, bool ignoreCase, CancellationToken cancellationToken) : base(provider, project, ignoreCase, cancellationToken) { @@ -54,9 +54,9 @@ protected override async Task> FindDeclarationsAsync( return declarations; } - private static AsyncLazy CreateLazyAssembly(Project project) + private static AsyncLazy CreateLazyAssembly(Project project) { - return new AsyncLazy( + return new AsyncLazy( async c => { var compilation = await project.GetRequiredCompilationAsync(c).ConfigureAwait(false);