Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
788 commits
Select commit Hold shift + click to select a range
b5ff756
Fix
genlu Feb 7, 2025
1a0521e
fix
genlu Feb 7, 2025
c196fae
fix
genlu Feb 7, 2025
a68f3e4
Update to fix the `checked` operator
ericstj Feb 7, 2025
eeb5c70
Remove unnecessary language tracking in the diagnostic service (#77100)
CyrusNajmabadi Feb 7, 2025
4253f32
Move ArrayBuilder.GetInstance helpers to Microsoft.CodeAnalysis.Poole…
tmat Feb 7, 2025
3a9318e
Always write the Api output files, even if they don't change (#77097)
jasonmalinowski Feb 7, 2025
85d5ea3
Merge branch 'main' into inlineDiagMethods
CyrusNajmabadi Feb 7, 2025
b2862ce
Handle nullable postcondition for non-static local function inside fi…
RikkiGibson Feb 7, 2025
ff8346d
Remove arg
CyrusNajmabadi Feb 7, 2025
bd6ab1f
Simplify caching api between CodeAnalysisService and DiagnosticAnalys…
CyrusNajmabadi Feb 7, 2025
459efff
Make DiagnosticIncrementalAnalyzer a nested private type (#77096)
CyrusNajmabadi Feb 7, 2025
fd0a9a7
Merge remote-tracking branch 'upstream/main' into inlineDiagMethods
CyrusNajmabadi Feb 7, 2025
9e30885
Use common helper for diagnostics
CyrusNajmabadi Feb 7, 2025
e661250
Add cache
CyrusNajmabadi Feb 7, 2025
56b5058
in progress
CyrusNajmabadi Feb 7, 2025
66139ef
Merge base and parent type in diagnostic subsystem
CyrusNajmabadi Feb 7, 2025
06f237b
Merge branch 'combineDiagTypes' into diagNoMemorySave
CyrusNajmabadi Feb 7, 2025
f5d7181
in progrss
CyrusNajmabadi Feb 7, 2025
f4ef9a8
Remove unneeded code
CyrusNajmabadi Feb 7, 2025
26cd9e5
deletE
CyrusNajmabadi Feb 7, 2025
d34bbd7
rename
CyrusNajmabadi Feb 7, 2025
84f284c
Delete unused
CyrusNajmabadi Feb 7, 2025
0e07eb2
remove unneeded code from ProjectState
CyrusNajmabadi Feb 7, 2025
61fd975
Remove 'initial result' concept
CyrusNajmabadi Feb 7, 2025
a23b304
remove aggregated result concept
CyrusNajmabadi Feb 7, 2025
fb967b1
Simplify
CyrusNajmabadi Feb 7, 2025
58d6940
remove more unnecessary code
CyrusNajmabadi Feb 7, 2025
6619762
Use cache if available
CyrusNajmabadi Feb 7, 2025
72ea224
Remove project state concept
CyrusNajmabadi Feb 7, 2025
968028d
Simplify type
CyrusNajmabadi Feb 7, 2025
de1e66f
Delete uneeded type
CyrusNajmabadi Feb 7, 2025
20ebfb1
Simplify state set
CyrusNajmabadi Feb 7, 2025
da333ac
remove redundant type
CyrusNajmabadi Feb 7, 2025
e71f60c
Address review comments
genlu Feb 7, 2025
1061ea0
Merge base and parent type in diagnostic subsystem (#77110)
CyrusNajmabadi Feb 7, 2025
e85d3b4
Merge remote-tracking branch 'upstream/main' into diagNoMemorySave
CyrusNajmabadi Feb 7, 2025
5f58f9a
Doc
CyrusNajmabadi Feb 7, 2025
42e54b2
Simplify
CyrusNajmabadi Feb 7, 2025
5ce4040
Use common helper for diagnostics (#77109)
CyrusNajmabadi Feb 7, 2025
4b664b4
Merge remote-tracking branch 'upstream/main' into diagNoMemorySave
CyrusNajmabadi Feb 7, 2025
6e6d12b
Make local functinos
CyrusNajmabadi Feb 7, 2025
374007b
Capture values
CyrusNajmabadi Feb 7, 2025
a53fce1
Remove version flag
CyrusNajmabadi Feb 7, 2025
439121f
Cleanup how we map from projects to compilations
CyrusNajmabadi Feb 7, 2025
8acdcc2
Fix
CyrusNajmabadi Feb 7, 2025
dc09a70
Update test
CyrusNajmabadi Feb 7, 2025
29c8e3d
In progress
CyrusNajmabadi Feb 7, 2025
cd9c7c1
Add culture to the extensionmanager reference to unblock d18
arunchndr Feb 7, 2025
26b446c
Merge branch 'diagNoMemorySave' into projectCompilationMap
CyrusNajmabadi Feb 7, 2025
bb36408
move method
CyrusNajmabadi Feb 7, 2025
488adf0
Simplify with captures
CyrusNajmabadi Feb 7, 2025
0d96912
Add a paranoia check
CyrusNajmabadi Feb 7, 2025
64157a3
Delete old stuff from vsixmanifest (#76801)
jasonmalinowski Feb 7, 2025
2be3696
Refactor out the existing logger for logging to test outputs
jasonmalinowski Feb 5, 2025
0f8dc35
Pass the ITestOutputHelper to the MSBuildWorkspace logger
jasonmalinowski Feb 5, 2025
dae45c9
Pass the ITestOutputHelper to the MSBuildWorkspace logger (#77072)
jasonmalinowski Feb 8, 2025
67028f5
Inline diagnostic service helpers (#77099)
CyrusNajmabadi Feb 8, 2025
651ee91
Set a RID for InteractiveHost32 (#77116)
jkoritzinsky Feb 8, 2025
4b4ca0b
Merge remote-tracking branch 'upstream/main' into diagNoMemorySave
CyrusNajmabadi Feb 8, 2025
577cc45
Merge branch 'diagNoMemorySave' into projectCompilationMap
CyrusNajmabadi Feb 8, 2025
3168481
Update data section string literals spec (#77050)
jjonescz Feb 8, 2025
0fcaef9
Large simplification in how diagnostics are cached in the diagnostic …
CyrusNajmabadi Feb 8, 2025
14610b6
Merge branch 'main' into projectCompilationMap
CyrusNajmabadi Feb 8, 2025
d4d7e59
Make physical property into a computed property
CyrusNajmabadi Feb 8, 2025
4fe6423
Make FileContentLoadAnalyzer into a hosts analyzer
CyrusNajmabadi Feb 8, 2025
5fe179d
Make GenerateDiagnosticAnalyzer into a hosts analyzer
CyrusNajmabadi Feb 8, 2025
0a9f2c8
Move more over
CyrusNajmabadi Feb 8, 2025
f80f2d4
Move more over
CyrusNajmabadi Feb 8, 2025
d5dd709
Move more over
CyrusNajmabadi Feb 8, 2025
554be89
Move more over
CyrusNajmabadi Feb 8, 2025
d4cb75c
Move more over
CyrusNajmabadi Feb 8, 2025
d763eb2
Move more over
CyrusNajmabadi Feb 8, 2025
229001c
Move more over
CyrusNajmabadi Feb 8, 2025
a8c13a3
All building
CyrusNajmabadi Feb 8, 2025
76e831d
remove method
CyrusNajmabadi Feb 8, 2025
dc94a41
remove method
CyrusNajmabadi Feb 8, 2025
af82260
remove method
CyrusNajmabadi Feb 8, 2025
56416aa
rename
CyrusNajmabadi Feb 8, 2025
b094454
Remove comments
CyrusNajmabadi Feb 8, 2025
268ce43
Simplify API
CyrusNajmabadi Feb 8, 2025
6f16789
Update src/LanguageServer/Protocol/Features/Diagnostics/EngineV2/Diag…
CyrusNajmabadi Feb 8, 2025
d9c05f9
renames
CyrusNajmabadi Feb 8, 2025
0be3864
Merge branch 'removeStateSet' of https://github.com/CyrusNajmabadi/ro…
CyrusNajmabadi Feb 8, 2025
8273332
Simplify
CyrusNajmabadi Feb 8, 2025
74553b7
Make private
CyrusNajmabadi Feb 8, 2025
71df88d
Simplify subset logic
CyrusNajmabadi Feb 8, 2025
c4dd3cf
Merge branch 'projectCompilationMap' into removeStateSet
CyrusNajmabadi Feb 8, 2025
3040c80
delete file
CyrusNajmabadi Feb 8, 2025
cde937b
Simplify data passed to diagnostic service'
CyrusNajmabadi Feb 8, 2025
4dd46df
do not pass state along
CyrusNajmabadi Feb 8, 2025
3b7a814
Simplify the computation and caching of 'CompilationWithAnalyzers' fo…
CyrusNajmabadi Feb 9, 2025
38b6b74
Merge branch 'main' into removeStateSet
CyrusNajmabadi Feb 9, 2025
7743590
Merge branch 'removeStateSet' into projectDiagBased
CyrusNajmabadi Feb 9, 2025
a3e4c64
Single filter
CyrusNajmabadi Feb 9, 2025
3c5c686
Avoid making options
CyrusNajmabadi Feb 9, 2025
809eddd
Remove inner class
CyrusNajmabadi Feb 9, 2025
126b5a9
Name
CyrusNajmabadi Feb 9, 2025
55c02e9
Remove inner class
CyrusNajmabadi Feb 9, 2025
d7c3556
Cleanup
CyrusNajmabadi Feb 9, 2025
fa379b6
xml docs
CyrusNajmabadi Feb 9, 2025
f09861a
Make local function
CyrusNajmabadi Feb 9, 2025
a01d3b5
Optimize DiagnosticService on NetCore
CyrusNajmabadi Feb 9, 2025
f3075bc
Fix
CyrusNajmabadi Feb 9, 2025
4b95269
Add culture to the extensionmanager reference to unblock d18 (#77112)
arunchndr Feb 10, 2025
9f3c6eb
Consume mibc data from VSCode profiling runs in official builds (#77044)
dibarbet Feb 10, 2025
329bb90
Remove 'state set' concept for diagnostic analysis subsystem. (#77121)
CyrusNajmabadi Feb 10, 2025
de7aa79
Merge branch 'main' into projectDiagBased
CyrusNajmabadi Feb 10, 2025
bf3a74f
Use expression body
CyrusNajmabadi Feb 10, 2025
7ef54be
inline
CyrusNajmabadi Feb 10, 2025
e2cba6c
Change cases
CyrusNajmabadi Feb 10, 2025
d4a42cf
remove temp
CyrusNajmabadi Feb 10, 2025
c59a123
No need to pass callbacks
CyrusNajmabadi Feb 10, 2025
4fa21f5
remove stale comments
CyrusNajmabadi Feb 10, 2025
98b5528
Merge branch 'projectDiagBased' into localFunctionDiags
CyrusNajmabadi Feb 10, 2025
c7f663c
Optimize DiagnosticService on NetCore (#77126)
CyrusNajmabadi Feb 10, 2025
fdcd193
Merge branch 'main' into projectDiagBased
CyrusNajmabadi Feb 10, 2025
b3b79e3
Merge branch 'projectDiagBased' into localFunctionDiags
CyrusNajmabadi Feb 10, 2025
8493177
Cache based on project state not project.
CyrusNajmabadi Feb 10, 2025
80ac906
Cache based on project state not project.
CyrusNajmabadi Feb 10, 2025
84d19cb
Merge remote-tracking branch 'upstream/main' into diagProjectState
CyrusNajmabadi Feb 10, 2025
1adf017
Add new workspace event that gives handlers the opportunity to be pro…
ToddGrun Feb 10, 2025
99d8eeb
Update PublishData.json (#77140)
akhera99 Feb 10, 2025
91f5069
Do not build Microsoft.CodeAnalysis.ExternalAccess.Copilot during sou…
333fred Feb 10, 2025
ebff826
Merge remote-tracking branch 'upstream/main' into diagProjectState
CyrusNajmabadi Feb 10, 2025
494c5e0
Update docs
CyrusNajmabadi Feb 10, 2025
8d93475
PR feedback
CyrusNajmabadi Feb 10, 2025
a070add
fix remote side
CyrusNajmabadi Feb 10, 2025
ab3ae96
Report LSP diagnostics with their severity.
JoeRobich Feb 10, 2025
d397200
Make more APIs project-based in diag service. (#77122)
CyrusNajmabadi Feb 10, 2025
dba01c3
Merge branch 'main' into localFunctionDiags
CyrusNajmabadi Feb 10, 2025
daae3d8
Fix syntax generation of explict checked operator from symbol (#77102)
CyrusNajmabadi Feb 10, 2025
2fcadee
Merge remote-tracking branch 'upstream/main' into diagProjectState
CyrusNajmabadi Feb 11, 2025
6b30476
Remove unneeded test
JoeRobich Feb 11, 2025
a3b817d
Use raw strings in tests
CyrusNajmabadi Feb 11, 2025
e1fab1c
Return LSP diagnostics with their reported severity. (#77145)
JoeRobich Feb 11, 2025
a6155bb
Fix race during shutdown of the BuildHost server
jasonmalinowski Feb 11, 2025
90522a1
Add main to release/dev18.0 flow (#77148)
akhera99 Feb 11, 2025
e46a163
Fix workspace command execution
dibarbet Feb 11, 2025
7c391a1
Merge branch 'main' into rawStrings
JoeRobich Feb 11, 2025
700edd9
Remove nested types in diagnostic analyzer service (#77124)
CyrusNajmabadi Feb 11, 2025
19c9b9e
Detect data section string literal hash collisions (#77061)
jjonescz Feb 11, 2025
e0fadb6
Use raw strings in tests (#77150)
CyrusNajmabadi Feb 11, 2025
0de4878
Update dependencies from https://github.com/dotnet/source-build-refer…
dotnet-maestro[bot] Feb 11, 2025
eeff8ea
Add Microsoft.CodeAnalysis.Contracts source package (#76997)
tmat Feb 11, 2025
afb8679
Merge remote-tracking branch 'dotnet/main' into CopilotExternalAccess
genlu Feb 11, 2025
16db1bc
Fix workspace command execution (#77152)
dibarbet Feb 11, 2025
bcce8cb
Use the new test framework for missing IDE0060 diagnostics
sharwell Feb 11, 2025
155da75
Add regression test for writing to Span<T>
sharwell Feb 11, 2025
1fa0fb7
Fix race during shutdown of the BuildHost server (#77151)
jasonmalinowski Feb 11, 2025
0b8cd8b
Accessing a property or indexer is at least a read operation
sharwell Feb 11, 2025
7cd4978
Remove unused parameter parseOptions
sharwell Feb 11, 2025
0bf62b4
Update remaining tests to use the new test library
sharwell Feb 11, 2025
f955c20
Add IVT
genlu Feb 11, 2025
c53e1e0
Multi-target LSP tests to run against .NET9
dibarbet Feb 12, 2025
c3fc118
cleanup warnings in pull diags tests
dibarbet Feb 12, 2025
9cfab2d
cleanup more warnings
dibarbet Feb 12, 2025
6781b3e
Merge remote-tracking branch 'upstream/main' into RazorUsingMoreLspTypes
davidwengier Feb 12, 2025
c8a2a0d
Enable tests in VMR
NikolaMilosavljevic Feb 12, 2025
3f2e5e2
Add analyzer redirecting API (#74820)
jjonescz Feb 12, 2025
f252374
Remove the unused property
NikolaMilosavljevic Feb 12, 2025
b0d8330
Use the new test framework for missing IDE0060 diagnostics (#77158)
sharwell Feb 12, 2025
b2d1732
Add test demonstrating issue no longer repros
CyrusNajmabadi Feb 12, 2025
81112e0
Have distinct messages for adding/removing accessibility modifiers
CyrusNajmabadi Feb 12, 2025
703574f
Share code
CyrusNajmabadi Feb 12, 2025
7b91b2f
Add semicolon
CyrusNajmabadi Feb 12, 2025
26317e4
fix more build errors and warnings
dibarbet Feb 12, 2025
b2654c8
Address review comments
genlu Feb 12, 2025
86632f1
Add test demonstrating issue no longer repros (#77185)
CyrusNajmabadi Feb 12, 2025
c988759
Enable tests in VMR (#77179)
NikolaMilosavljevic Feb 12, 2025
6a09b84
Add IsExternalInit back to Razor EA (#77186)
tmat Feb 12, 2025
36036f8
Add Copilot EA for language server (#77047)
genlu Feb 12, 2025
76b364e
refactor lsp test harness to allow different test workspaces
dibarbet Feb 12, 2025
3f873ed
remove unnecessary csproj item
dibarbet Feb 13, 2025
32a5390
Update src/EditorFeatures/Test/LanguageServer/VSTypeScriptHandlerTest…
dibarbet Feb 13, 2025
4fdbd93
Classify string fields with embedded languages if we can see their va…
CyrusNajmabadi Feb 13, 2025
38d0c0e
Add tests
CyrusNajmabadi Feb 13, 2025
ed675b4
Mention data string literal feature backport (#77076)
jjonescz Feb 13, 2025
4053035
lint
CyrusNajmabadi Feb 13, 2025
589ad23
Merge remote-tracking branch 'upstream/main' into diagProjectState
CyrusNajmabadi Feb 13, 2025
74f151e
Classify string fields with embedded languages if we can see their va…
CyrusNajmabadi Feb 13, 2025
16967dc
Update PublishData.json
akhera99 Feb 13, 2025
ef1d7fe
Update PublishData.json (#77208)
JoeRobich Feb 13, 2025
9dd780c
Multi-target LSP tests to run against .NET (#77173)
dibarbet Feb 13, 2025
7015680
Switch to UI thread to activate Semantic Search UIContext (#77195)
tmat Feb 13, 2025
659c0f9
Initial work to support FixAll in 'use interpoalted string'
CyrusNajmabadi Feb 13, 2025
dc945ec
Complete work
CyrusNajmabadi Feb 13, 2025
f2a3f7b
Revert
CyrusNajmabadi Feb 13, 2025
4a5b490
Reduce allocations in SymbolCompletionItem.GetSupportedPlatforms (#77…
ToddGrun Feb 13, 2025
b60539f
Make conditional weak table static
CyrusNajmabadi Feb 13, 2025
6357650
Only refetch from CWT if adding to it failed
CyrusNajmabadi Feb 13, 2025
a3bdd94
Update 'use interpolated string' refactoring to support fix all (#77209)
CyrusNajmabadi Feb 13, 2025
7b781d4
Only refetch from CWT if adding to it failed (#77211)
CyrusNajmabadi Feb 13, 2025
5bf4bfe
Update Semantic Search Ref assembly (#77196)
tmat Feb 13, 2025
13e9626
Make conditional weak table static (#77210)
CyrusNajmabadi Feb 13, 2025
191ee36
using snippet
akhera99 Feb 14, 2025
c86f8c2
Store checlksum
CyrusNajmabadi Feb 14, 2025
6b9b958
Fix issue parsing for-statement initializer chain with commas and no …
CyrusNajmabadi Feb 14, 2025
40b0cba
Cache based on project state not project. (#77141)
CyrusNajmabadi Feb 14, 2025
d993eb9
Remove potential leak in CachingSemanticModelProvider._providerCache …
ToddGrun Feb 14, 2025
a4f5f69
Merge in main
CyrusNajmabadi Feb 14, 2025
7017121
Merge branch 'main' into diagProjectStateFull2
CyrusNajmabadi Feb 14, 2025
62ec083
Update Compiler Breaking Changes - DotNet 9.md
CyrusNajmabadi Feb 14, 2025
d8d312d
Defer checksum computation
CyrusNajmabadi Feb 14, 2025
b0ad3f4
Update Compiler Breaking Changes - DotNet 9.md (#77231)
CyrusNajmabadi Feb 14, 2025
250126c
Cache diagnostic info based on project state not project. (#77230)
CyrusNajmabadi Feb 14, 2025
39048c8
Have distinct messages for adding vs. removing accessibility modifier…
CyrusNajmabadi Feb 14, 2025
30bae2d
Do not offer primary constructor parameters when offering to generate…
CyrusNajmabadi Feb 14, 2025
1c29926
Rename feature to 'Add or remove accessibility modifiers'
CyrusNajmabadi Feb 14, 2025
dbad668
Cleanup and revert
CyrusNajmabadi Feb 14, 2025
7c437ed
Revert
CyrusNajmabadi Feb 14, 2025
00718bf
Fix
CyrusNajmabadi Feb 14, 2025
9bd6246
Add test
CyrusNajmabadi Feb 14, 2025
add6035
Merge branch 'main' into addOrRemove
CyrusNajmabadi Feb 14, 2025
15a63a1
revert
CyrusNajmabadi Feb 14, 2025
f642e6a
Add test
CyrusNajmabadi Feb 14, 2025
c8841d7
Fix issue where hitting enter before a raw-string literal was process…
CyrusNajmabadi Feb 14, 2025
c93ec5f
remove import
CyrusNajmabadi Feb 14, 2025
da5c0c5
Semantic Snippets - using snippet (#77214)
akhera99 Feb 14, 2025
03e26e5
revert
CyrusNajmabadi Feb 14, 2025
f6fc311
Rename feature to 'Add or remove accessibility modifiers' (#77234)
CyrusNajmabadi Feb 15, 2025
6b8381c
add background color for inline hints in high contrast mode
akhera99 Feb 15, 2025
e91c871
Fix issue where hitting enter before a raw-string literal was process…
CyrusNajmabadi Feb 15, 2025
ad54fbc
Do not offer primary constructor parameters when offering to generate…
CyrusNajmabadi Feb 15, 2025
2b29799
Inline Hints - Add background for Windows high contrast mode (#77238)
akhera99 Feb 15, 2025
eecbc00
fix syncing
CyrusNajmabadi Feb 15, 2025
ccff5c5
Allow oop syncing to send over ephemeral solutions with name/filepath…
CyrusNajmabadi Feb 15, 2025
5d046a0
Properly pass progress object along in fix all provider
CyrusNajmabadi Feb 15, 2025
1315d69
Use property
CyrusNajmabadi Feb 15, 2025
abdd4cd
Simplify code
CyrusNajmabadi Feb 15, 2025
0129d0c
Simplify
CyrusNajmabadi Feb 15, 2025
1e6c551
Remove dependency on semantics
CyrusNajmabadi Feb 15, 2025
13e2a61
Simplify
CyrusNajmabadi Feb 15, 2025
9a8c310
preserve behavior
CyrusNajmabadi Feb 15, 2025
9af27d3
Remove need to use semantics in the 'move type' code refactoring prov…
CyrusNajmabadi Feb 15, 2025
567599f
Properly pass progress object along in fix all provider (#77243)
CyrusNajmabadi Feb 15, 2025
8090cf1
Remove state type from 'move type' refactoring
CyrusNajmabadi Feb 15, 2025
69e9d63
inline
CyrusNajmabadi Feb 15, 2025
6042dd3
inline
CyrusNajmabadi Feb 15, 2025
74659ba
remove more
CyrusNajmabadi Feb 15, 2025
46086b2
Semantic document
CyrusNajmabadi Feb 15, 2025
cba9de6
rename
CyrusNajmabadi Feb 15, 2025
254b024
REvert
CyrusNajmabadi Feb 15, 2025
deadb60
REvert
CyrusNajmabadi Feb 15, 2025
c127487
REvert
CyrusNajmabadi Feb 15, 2025
d862b94
Remove state type from 'move type' refactoring (#77248)
CyrusNajmabadi Feb 16, 2025
80ccf3f
Make `InterceptableLocation` implement `IEquatable<InterceptableLocat…
aradalvand Feb 17, 2025
7561e17
Allow more of Razor to use Roslyn Lsp types (#74597)
davidwengier Feb 17, 2025
a97fa11
Add missing word to the documentation file (#77259)
kkm000 Feb 18, 2025
212d206
Merge remote-tracking branch 'upstream/main' into merge-main
333fred Feb 18, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
No need to pass callbacks
  • Loading branch information
CyrusNajmabadi committed Feb 10, 2025
commit c59a123b66810a7d39aca3cdbc840b50876896a2
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ public async Task<ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnos
DocumentAnalysisExecutor executor,
ImmutableArray<DiagnosticAnalyzer> analyzers,
VersionStamp version,
Func<DiagnosticAnalyzer, DocumentAnalysisExecutor, CancellationToken, Task<ImmutableArray<DiagnosticData>>> computeAnalyzerDiagnosticsAsync,
Func<DocumentAnalysisExecutor, CancellationToken, Task<ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<DiagnosticData>>>> computeDiagnosticsNonIncrementallyAsync,
CancellationToken cancellationToken)
{
var analysisScope = executor.AnalysisScope;
Expand All @@ -68,7 +66,7 @@ public async Task<ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnos
{
// This is not a member-edit scenario, so compute full document diagnostics
// without incremental analysis.
return await computeDiagnosticsNonIncrementallyAsync(executor, cancellationToken).ConfigureAwait(false);
return await ComputeDocumentDiagnosticsCoreAsync(executor, cancellationToken).ConfigureAwait(false);
}

var (changedMember, changedMemberId, newMemberSpans, oldDocument) = changedMemberAndIdAndSpansAndDocument.Value;
Expand Down Expand Up @@ -104,7 +102,7 @@ public async Task<ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<Diagnos
if (spanBasedAnalyzers.Count == 0 && (!compilerAnalyzerData.HasValue || !compilerAnalyzerData.Value.spanBased))
{
// No incremental span based-analysis to be performed.
return await computeDiagnosticsNonIncrementallyAsync(executor, cancellationToken).ConfigureAwait(false);
return await ComputeDocumentDiagnosticsCoreAsync(executor, cancellationToken).ConfigureAwait(false);
}

// Get or create the member spans for all member nodes in the old document.
Expand Down Expand Up @@ -177,7 +175,7 @@ async Task ExecuteAnalyzersAsync(

foreach (var analyzer in analyzers)
{
var diagnostics = await computeAnalyzerDiagnosticsAsync(analyzer, executor, cancellationToken).ConfigureAwait(false);
var diagnostics = await ComputeDocumentDiagnosticsForAnalyzerCoreAsync(analyzer, executor, cancellationToken).ConfigureAwait(false);
builder.Add(analyzer, diagnostics);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,31 @@ public async Task<ImmutableArray<DiagnosticData>> GetDiagnosticsForSpanAsync(
return list.ToImmutableAndClear();
}

private static async Task<ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<DiagnosticData>>> ComputeDocumentDiagnosticsCoreAsync(
DocumentAnalysisExecutor executor,
CancellationToken cancellationToken)
{
using var _ = PooledDictionary<DiagnosticAnalyzer, ImmutableArray<DiagnosticData>>.GetInstance(out var builder);
foreach (var analyzer in executor.AnalysisScope.ProjectAnalyzers.ConcatFast(executor.AnalysisScope.HostAnalyzers))
{
var diagnostics = await ComputeDocumentDiagnosticsForAnalyzerCoreAsync(analyzer, executor, cancellationToken).ConfigureAwait(false);
builder.Add(analyzer, diagnostics);
}

return builder.ToImmutableDictionary();
}

private static async Task<ImmutableArray<DiagnosticData>> ComputeDocumentDiagnosticsForAnalyzerCoreAsync(
DiagnosticAnalyzer analyzer,
DocumentAnalysisExecutor executor,
CancellationToken cancellationToken)
{
cancellationToken.ThrowIfCancellationRequested();

var diagnostics = await executor.ComputeDiagnosticsAsync(analyzer, cancellationToken).ConfigureAwait(false);
return diagnostics?.ToImmutableArrayOrEmpty() ?? [];
}

/// <summary>
/// Get diagnostics for given span either by using cache or calculating it on the spot.
/// </summary>
Expand Down Expand Up @@ -291,8 +316,6 @@ private async Task ComputeDocumentDiagnosticsAsync(
executor,
analyzers,
version,
ComputeDocumentDiagnosticsForAnalyzerCoreAsync,
ComputeDocumentDiagnosticsCoreAsync,
cancellationToken).ConfigureAwait(false);
}
else
Expand Down Expand Up @@ -377,31 +400,6 @@ async Task<bool> IsCandidateForDeprioritizationBasedOnRegisteredActionsAsync(Dia
}
}

private async Task<ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<DiagnosticData>>> ComputeDocumentDiagnosticsCoreAsync(
DocumentAnalysisExecutor executor,
CancellationToken cancellationToken)
{
using var _ = PooledDictionary<DiagnosticAnalyzer, ImmutableArray<DiagnosticData>>.GetInstance(out var builder);
foreach (var analyzer in executor.AnalysisScope.ProjectAnalyzers.ConcatFast(executor.AnalysisScope.HostAnalyzers))
{
var diagnostics = await ComputeDocumentDiagnosticsForAnalyzerCoreAsync(analyzer, executor, cancellationToken).ConfigureAwait(false);
builder.Add(analyzer, diagnostics);
}

return builder.ToImmutableDictionary();
}

private async Task<ImmutableArray<DiagnosticData>> ComputeDocumentDiagnosticsForAnalyzerCoreAsync(
DiagnosticAnalyzer analyzer,
DocumentAnalysisExecutor executor,
CancellationToken cancellationToken)
{
cancellationToken.ThrowIfCancellationRequested();

var diagnostics = await executor.ComputeDiagnosticsAsync(analyzer, cancellationToken).ConfigureAwait(false);
return diagnostics?.ToImmutableArrayOrEmpty() ?? [];
}

private bool ShouldInclude(DiagnosticData diagnostic)
{
return diagnostic.DocumentId == _document.Id &&
Expand Down
Loading