Skip to content
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

Remove portions of solution crawler #72147

Merged
Merged
Show file tree
Hide file tree
Changes from 227 commits
Commits
Show all changes
233 commits
Select commit Hold shift + click to select a range
a535fdc
Merge branch 'errorListRemoval' into allPullDiagnostics
CyrusNajmabadi Jul 19, 2022
830e2b7
Merge branch 'errorListRemoval' into allPullDiagnostics
CyrusNajmabadi Aug 3, 2022
c4596d3
Merge branch 'removePushDiagnostics' into allPullDiagnostics
CyrusNajmabadi Aug 3, 2022
4c46f5c
Merge branch 'removePushDiagnostics' into allPullDiagnostics
CyrusNajmabadi Aug 23, 2022
8647ca8
Merge branch 'errorListRemoval' into allPullDiagnostics
CyrusNajmabadi Aug 23, 2022
4b5c783
Merge branch 'removePushDiagnostics' into allPullDiagnostics
CyrusNajmabadi Sep 1, 2022
7b45542
Merge branch 'errorListRemoval' into allPullDiagnostics
CyrusNajmabadi Sep 1, 2022
5fb5e96
Merge branch 'removePushDiagnostics' into allPullDiagnostics
CyrusNajmabadi Sep 13, 2022
ec03cb4
Merge branch 'errorListRemoval' into allPullDiagnostics
CyrusNajmabadi Sep 13, 2022
f6cabc2
Merge branch 'removePushDiagnostics' into allPullDiagnostics
CyrusNajmabadi Sep 13, 2022
17853a7
Merge branch 'errorListRemoval' into allPullDiagnostics
CyrusNajmabadi Sep 15, 2022
e3ec62d
Merge branch 'removePushDiagnostics' into allPullDiagnostics
CyrusNajmabadi Sep 15, 2022
0f3ad82
Merge branch 'errorListRemoval' into allPullDiagnostics
CyrusNajmabadi Sep 16, 2022
e818095
Merge branch 'removePushDiagnostics' into allPullDiagnostics
CyrusNajmabadi Oct 21, 2022
ef93f8d
Merge branch 'errorListRemoval' into allPullDiagnostics
CyrusNajmabadi Oct 21, 2022
30d76b3
Merge branch 'removePushDiagnostics' into allPullDiagnostics
CyrusNajmabadi Nov 9, 2022
709962e
Merge branch 'errorListRemoval' into allPullDiagnostics
CyrusNajmabadi Nov 9, 2022
9c11024
Merge branch 'removePushDiagnostics' into allPullDiagnostics
CyrusNajmabadi Nov 9, 2022
6e52853
Merge branch 'removePushDiagnostics' into allPullDiagnostics
CyrusNajmabadi Dec 15, 2022
12fc4bc
Merge branch 'errorListRemoval' into allPullDiagnostics
CyrusNajmabadi Dec 15, 2022
420c78c
Remove
CyrusNajmabadi Dec 15, 2022
ed9fb8c
Merge branch 'removePushDiagnostics' into allPullDiagnostics
CyrusNajmabadi Feb 8, 2023
4c5349c
Merge branch 'errorListRemoval' into allPullDiagnostics
CyrusNajmabadi Feb 8, 2023
a053be1
Merge branch 'removePushDiagnostics' into allPullDiagnostics
CyrusNajmabadi Feb 8, 2023
5d6d2b8
Merge branch 'removePushDiagnostics' into allPullDiagnostics
CyrusNajmabadi Mar 19, 2023
112d74b
Merge branch 'errorListRemoval' into allPullDiagnostics
CyrusNajmabadi Mar 19, 2023
93b93d6
Merge branch 'removePushDiagnostics' into allPullDiagnostics
CyrusNajmabadi Mar 27, 2023
15db9e3
Merge branch 'errorListRemoval' into allPullDiagnostics
CyrusNajmabadi Mar 27, 2023
8666516
Merge branch 'errorListRemoval' into allPullDiagnostics
CyrusNajmabadi Jul 18, 2023
582e695
Merge branch 'removePushDiagnostics' into allPullDiagnostics
CyrusNajmabadi Jul 18, 2023
1b28bee
Merge branch 'removePushDiagnostics' into allPullDiagnostics
CyrusNajmabadi Jul 18, 2023
f56eaa9
Merge branch 'removePushDiagnostics' into allPullDiagnostics
CyrusNajmabadi Aug 22, 2023
585a5b6
Merge branch 'errorListRemoval' into allPullDiagnostics
CyrusNajmabadi Aug 22, 2023
67060c5
Merge branch 'removePushDiagnostics' into allPullDiagnostics
CyrusNajmabadi Oct 24, 2023
2252204
Merge branch 'errorListRemoval' into allPullDiagnostics
CyrusNajmabadi Oct 24, 2023
a8e2c23
Merge branch 'errorListRemoval' into allPullDiagnostics
CyrusNajmabadi Oct 25, 2023
05ab279
Merge branch 'removePushDiagnostics' into allPullDiagnostics
CyrusNajmabadi Oct 25, 2023
f7f25cc
Merge branch 'errorListRemoval' into allPullDiagnostics
CyrusNajmabadi Oct 26, 2023
2767598
Merge branch 'removePushDiagnostics' into allPullDiagnostics
CyrusNajmabadi Oct 26, 2023
bd63986
Merge branch 'DisableTests' into allPullDiagnostics
CyrusNajmabadi Oct 26, 2023
0dc2b86
Merge branch 'removePushDiagnostics' into allPullDiagnostics
CyrusNajmabadi Nov 20, 2023
4204ff4
Merge branch 'errorListRemoval' into allPullDiagnostics
CyrusNajmabadi Nov 20, 2023
ae1739c
Merge branch 'removePushDiagnostics' into allPullDiagnostics
CyrusNajmabadi Dec 11, 2023
f8ca295
Merge branch 'errorListRemoval' into allPullDiagnostics
CyrusNajmabadi Dec 11, 2023
9661564
Merge remote-tracking branch 'upstream/main' into allPullDiagnostics
CyrusNajmabadi Dec 12, 2023
9e04fef
Merge branch 'main' into allPullDiagnostics
CyrusNajmabadi Dec 18, 2023
c287b3e
Merge branch 'main' into allPullDiagnostics
CyrusNajmabadi Dec 21, 2023
bde023f
Merge branch 'removePushDiagnostics' into allPullDiagnostics
CyrusNajmabadi Jan 14, 2024
3b327a0
Merge branch 'errorListRemoval' into allPullDiagnostics
CyrusNajmabadi Jan 14, 2024
2d7ac01
Merge branch 'removePushDiagnostics' into allPullDiagnostics
CyrusNajmabadi Jan 29, 2024
38bd0a1
Merge branch 'errorListRemoval' into allPullDiagnostics
CyrusNajmabadi Jan 29, 2024
d66d299
Merge branch 'removePushDiagnostics' into allPullDiagnostics
CyrusNajmabadi Jan 29, 2024
9036c09
Merge branch 'removePushDiagnostics' into allPullDiagnostics
CyrusNajmabadi Feb 2, 2024
78b323a
Merge branch 'errorListRemoval' into allPullDiagnostics
CyrusNajmabadi Feb 2, 2024
a1f85ba
Merge branch 'main' into allPullDiagnostics
CyrusNajmabadi Feb 5, 2024
bc88023
Merge branch 'main' into allPullDiagnostics
CyrusNajmabadi Feb 8, 2024
e1c6a04
Merge branch 'main' into allPullDiagnostics
CyrusNajmabadi Feb 8, 2024
83457e8
Merge branch 'removePushDiagnostics' into allPullDiagnostics
CyrusNajmabadi Feb 9, 2024
a1dee3c
Merge branch 'errorListRemoval' into allPullDiagnostics
CyrusNajmabadi Feb 9, 2024
1b2bc2b
Merge branch 'main' into allPullDiagnostics
CyrusNajmabadi Feb 12, 2024
4410145
fix
CyrusNajmabadi Feb 12, 2024
76888cf
Merge branch 'removeSolutionCrawler' into allPullDiagnostics
CyrusNajmabadi Feb 12, 2024
f74513b
Merge remote-tracking branch 'upstream/main' into allPullDiagnostics
CyrusNajmabadi Feb 15, 2024
ec1df0a
Remove portions of solution crawler
CyrusNajmabadi Feb 15, 2024
c0788ff
Merge branch 'removeUnitTestingType' into removeSolutionCrawlerIncrem…
CyrusNajmabadi Feb 15, 2024
ff22e7c
remove solution crawler type
CyrusNajmabadi Feb 15, 2024
ef6b8fa
remove solution crawler type
CyrusNajmabadi Feb 15, 2024
90f1598
remove solution crawler type
CyrusNajmabadi Feb 15, 2024
65c70ce
remove solution crawler type
CyrusNajmabadi Feb 15, 2024
7a11784
remove solution crawler type
CyrusNajmabadi Feb 15, 2024
207b22c
remove solution crawler type
CyrusNajmabadi Feb 15, 2024
b79e96c
remove solution crawler type
CyrusNajmabadi Feb 15, 2024
fcdff66
remove solution crawler type
CyrusNajmabadi Feb 15, 2024
7ba8f61
Merge branch 'removeUnitTestingType' into removeSolutionCrawlerIncrem…
CyrusNajmabadi Feb 15, 2024
4392802
REmove unused functionality
CyrusNajmabadi Feb 15, 2024
825de4e
REmove unused functionality
CyrusNajmabadi Feb 15, 2024
cd8f428
REmove unused functionality
CyrusNajmabadi Feb 15, 2024
872c92e
Merge branch 'main' into removeSolutionCrawlerIncremental
CyrusNajmabadi Feb 16, 2024
e6dff02
Remove unused functionality
CyrusNajmabadi Feb 16, 2024
a8682ee
Remove unused functionality
CyrusNajmabadi Feb 16, 2024
075969a
Remove unused functionality
CyrusNajmabadi Feb 16, 2024
0800057
Remove unused functionality
CyrusNajmabadi Feb 16, 2024
211d963
Remove unused functionality
CyrusNajmabadi Feb 16, 2024
ea39b88
Remove unused functionality
CyrusNajmabadi Feb 16, 2024
e758b15
Remove unused functionality
CyrusNajmabadi Feb 16, 2024
9b1cd8d
Remove unused functionality
CyrusNajmabadi Feb 16, 2024
a1b8045
Remove unused functionality
CyrusNajmabadi Feb 16, 2024
28cd397
Remove unused functionality
CyrusNajmabadi Feb 16, 2024
88d00a9
Remove unused functionality
CyrusNajmabadi Feb 16, 2024
ab895d9
Remove unused functionality
CyrusNajmabadi Feb 16, 2024
bbd3f8f
Remove unused functionality
CyrusNajmabadi Feb 16, 2024
b07bb3b
Remove unused functionality
CyrusNajmabadi Feb 16, 2024
7886069
Remove unused functionality
CyrusNajmabadi Feb 16, 2024
90a7a40
Remove unused functionality
CyrusNajmabadi Feb 16, 2024
679cba6
Remove unused functionality
CyrusNajmabadi Feb 16, 2024
19e44f3
Remove unused functionality
CyrusNajmabadi Feb 16, 2024
879505f
Remove unused functionality
CyrusNajmabadi Feb 16, 2024
3c2ad1a
Remove unused functionality
CyrusNajmabadi Feb 16, 2024
7a753d4
Remove unused functionality
CyrusNajmabadi Feb 16, 2024
4235f61
Remove unused functionality
CyrusNajmabadi Feb 16, 2024
e4a0ec7
Remove unused functionality
CyrusNajmabadi Feb 16, 2024
2e702fd
Remove unused functionality
CyrusNajmabadi Feb 16, 2024
ffdaa85
Remove unused functionality
CyrusNajmabadi Feb 16, 2024
0f74f3a
Remove unused functionality
CyrusNajmabadi Feb 16, 2024
63183a7
Remove unused functionality
CyrusNajmabadi Feb 16, 2024
198dfeb
Remove unused functionality
CyrusNajmabadi Feb 16, 2024
9b013fc
Remove unused functionality
CyrusNajmabadi Feb 16, 2024
55dc44b
Remove unused functionality
CyrusNajmabadi Feb 16, 2024
af3d72f
Merge branch 'main' into removeSolutionCrawlerIncremental
CyrusNajmabadi Feb 21, 2024
47f87c9
Merge branch 'main' into removeSolutionCrawlerIncremental
CyrusNajmabadi Feb 22, 2024
7b35feb
Merge branch 'main' into removeSolutionCrawlerIncremental
CyrusNajmabadi Feb 24, 2024
7034e9e
Merge remote-tracking branch 'upstream/main' into removeSolutionCrawl…
CyrusNajmabadi Feb 26, 2024
2b1feb7
Merge branch 'main' into removeSolutionCrawlerIncremental
CyrusNajmabadi Feb 28, 2024
8a22cec
Make file scoped
CyrusNajmabadi Mar 7, 2024
6ee97bd
Make file scoped
CyrusNajmabadi Mar 7, 2024
e01ce89
Merge branch 'fileScoped' into removeSolutionCrawlerIncremental
CyrusNajmabadi Mar 7, 2024
e288593
file scoped
CyrusNajmabadi Mar 7, 2024
971e5ae
file scoped
CyrusNajmabadi Mar 7, 2024
21ecb35
file scoped
CyrusNajmabadi Mar 7, 2024
15e39bc
file scoped
CyrusNajmabadi Mar 7, 2024
8116f2f
file scoped
CyrusNajmabadi Mar 7, 2024
3d989c0
file scoped
CyrusNajmabadi Mar 7, 2024
fc3d1d3
file scoped
CyrusNajmabadi Mar 7, 2024
3fff34c
file scoped
CyrusNajmabadi Mar 7, 2024
c229cc8
file scoped
CyrusNajmabadi Mar 7, 2024
02a6cb2
file scoped
CyrusNajmabadi Mar 7, 2024
6ad16ed
Merge branch 'errorList2' into removeSolutionCrawlerIncremental
CyrusNajmabadi Mar 7, 2024
a634166
simplify
CyrusNajmabadi Mar 7, 2024
f0a4e32
simplify
CyrusNajmabadi Mar 7, 2024
8625198
simplify
CyrusNajmabadi Mar 7, 2024
362a41c
simplify
CyrusNajmabadi Mar 7, 2024
ba5f0a6
simplify
CyrusNajmabadi Mar 7, 2024
bf3639d
simplify
CyrusNajmabadi Mar 7, 2024
f12a7d3
simplify
CyrusNajmabadi Mar 7, 2024
aad4cc3
simplify
CyrusNajmabadi Mar 7, 2024
beed166
simplify
CyrusNajmabadi Mar 7, 2024
bcf7ade
simplify
CyrusNajmabadi Mar 7, 2024
dc64a31
simplify
CyrusNajmabadi Mar 7, 2024
60e8c25
simplify
CyrusNajmabadi Mar 7, 2024
d11dad9
simplify
CyrusNajmabadi Mar 7, 2024
0cd3a33
simplify
CyrusNajmabadi Mar 7, 2024
8529020
simplify
CyrusNajmabadi Mar 7, 2024
8bb1727
simplify
CyrusNajmabadi Mar 7, 2024
ffce41b
simplify
CyrusNajmabadi Mar 7, 2024
ee46be3
simplify
CyrusNajmabadi Mar 7, 2024
8406b40
simplify
CyrusNajmabadi Mar 7, 2024
83db397
simplify
CyrusNajmabadi Mar 7, 2024
271dfe6
simplify
CyrusNajmabadi Mar 7, 2024
3736dbd
simplify
CyrusNajmabadi Mar 7, 2024
46974be
simplify
CyrusNajmabadi Mar 7, 2024
01fedd9
simplify
CyrusNajmabadi Mar 7, 2024
9e6fa99
simplify
CyrusNajmabadi Mar 7, 2024
bb72c10
simplify
CyrusNajmabadi Mar 7, 2024
e779dfa
simplify
CyrusNajmabadi Mar 7, 2024
d98087b
simplify
CyrusNajmabadi Mar 7, 2024
fee50ab
simplify
CyrusNajmabadi Mar 7, 2024
53c75fe
simplify
CyrusNajmabadi Mar 7, 2024
a0b59c3
simplify
CyrusNajmabadi Mar 7, 2024
bd0d760
simplify
CyrusNajmabadi Mar 7, 2024
a353904
simplify
CyrusNajmabadi Mar 7, 2024
7f5ce9f
simplify
CyrusNajmabadi Mar 7, 2024
5c178fc
simplify
CyrusNajmabadi Mar 7, 2024
ae88cc3
simplify
CyrusNajmabadi Mar 7, 2024
b79e41b
simplify
CyrusNajmabadi Mar 7, 2024
bf6a73e
simplify
CyrusNajmabadi Mar 7, 2024
1088b1e
simplify
CyrusNajmabadi Mar 7, 2024
9c55f85
simplify
CyrusNajmabadi Mar 7, 2024
29a9085
simplify
CyrusNajmabadi Mar 7, 2024
e26a4fa
simplify
CyrusNajmabadi Mar 7, 2024
69580e2
simplify
CyrusNajmabadi Mar 7, 2024
ccc064c
simplify
CyrusNajmabadi Mar 7, 2024
b180a57
simplify
CyrusNajmabadi Mar 7, 2024
7ecbd9a
simplify
CyrusNajmabadi Mar 7, 2024
d16f3fa
simplify
CyrusNajmabadi Mar 7, 2024
afa4b65
simplify
CyrusNajmabadi Mar 7, 2024
e8c5229
simplify
CyrusNajmabadi Mar 7, 2024
9215881
simplify
CyrusNajmabadi Mar 7, 2024
86c8455
simplify
CyrusNajmabadi Mar 7, 2024
7ab7f73
simplify
CyrusNajmabadi Mar 7, 2024
8e98c2a
simplify
CyrusNajmabadi Mar 7, 2024
1d735b3
simplify
CyrusNajmabadi Mar 7, 2024
2786a90
simplify
CyrusNajmabadi Mar 7, 2024
28ff753
simplify
CyrusNajmabadi Mar 7, 2024
48f07c5
simplify
CyrusNajmabadi Mar 7, 2024
99fbc9c
simplify
CyrusNajmabadi Mar 7, 2024
e4a8977
simplify
CyrusNajmabadi Mar 7, 2024
8df1119
simplify
CyrusNajmabadi Mar 7, 2024
f8ca81e
lint
CyrusNajmabadi Mar 7, 2024
380ca90
Fix test
CyrusNajmabadi Mar 7, 2024
8a0d58b
Fix test
CyrusNajmabadi Mar 7, 2024
5d1b92c
Fix test
CyrusNajmabadi Mar 7, 2024
f2acaad
Fix test
CyrusNajmabadi Mar 7, 2024
ecad828
Merge branch 'removeDiagFunctionality' into removeSolutionCrawlerIncr…
CyrusNajmabadi Mar 7, 2024
639a2a8
Merge branch 'removeDiagFunctionality' into removeSolutionCrawlerIncr…
CyrusNajmabadi Mar 7, 2024
5d0afaf
Merge branch 'removeDiagFunctionality' into removeSolutionCrawlerIncr…
CyrusNajmabadi Mar 7, 2024
fbc68c2
Merge branch 'removeDiagFunctionality' into removeSolutionCrawlerIncr…
CyrusNajmabadi Mar 7, 2024
1bbcfc6
Merge branch 'removeDiagFunctionality' into removeSolutionCrawlerIncr…
CyrusNajmabadi Mar 7, 2024
beeaf7a
Always make anlayzers
CyrusNajmabadi Mar 7, 2024
292244a
Remove explicit call to create analyzerS
CyrusNajmabadi Mar 7, 2024
a612d43
Remove interfae method
CyrusNajmabadi Mar 7, 2024
48281e1
remove incremental interfaces
CyrusNajmabadi Mar 7, 2024
9a4219a
Simplify
CyrusNajmabadi Mar 7, 2024
201cc17
Merge branch 'main' into removeSolutionCrawlerIncremental
CyrusNajmabadi Mar 8, 2024
0ba50f4
Fix test
CyrusNajmabadi Mar 8, 2024
b8a4252
Merge branch 'removeSolutionCrawlerIncremental' of https://github.com…
CyrusNajmabadi Mar 8, 2024
d67d9b8
Fix test
CyrusNajmabadi Mar 8, 2024
3919c90
Fix test
CyrusNajmabadi Mar 8, 2024
d80f180
Fix test
CyrusNajmabadi Mar 8, 2024
108ad64
Fix test
CyrusNajmabadi Mar 8, 2024
2f8e4e3
Fix test
CyrusNajmabadi Mar 8, 2024
615fc8e
Fix test
CyrusNajmabadi Mar 8, 2024
26a63e2
Fix test
CyrusNajmabadi Mar 8, 2024
50b59b6
REvert
CyrusNajmabadi Mar 8, 2024
5859b29
Fix test
CyrusNajmabadi Mar 8, 2024
5bcb0c9
update
CyrusNajmabadi Mar 8, 2024
cd055f2
Remove
CyrusNajmabadi Mar 8, 2024
e023df2
Docs
CyrusNajmabadi Mar 8, 2024
6ed1ed6
Fix test
CyrusNajmabadi Mar 8, 2024
07de218
Simplify
CyrusNajmabadi Mar 8, 2024
6c00395
Add back
CyrusNajmabadi Mar 8, 2024
8bb165e
Add back
CyrusNajmabadi Mar 8, 2024
71e22da
remove interface
CyrusNajmabadi Mar 8, 2024
6f8be3a
Merge remote-tracking branch 'upstream/main' into removeSolutionCrawl…
CyrusNajmabadi Mar 8, 2024
d5b3e94
lint
CyrusNajmabadi Mar 8, 2024
908bab3
Merge branch 'main' into removeSolutionCrawlerIncremental
CyrusNajmabadi Mar 9, 2024
9e7686c
Remove parameter
CyrusNajmabadi Mar 9, 2024
83b1946
Fix tet
CyrusNajmabadi Mar 9, 2024
5b866f3
Restore test
CyrusNajmabadi Mar 12, 2024
d53b35d
Add back option
CyrusNajmabadi Mar 12, 2024
02077d1
Add back option
CyrusNajmabadi Mar 12, 2024
8018bfd
Merge branch 'main' into removeSolutionCrawlerIncremental
CyrusNajmabadi Mar 12, 2024
f9899b3
Fix option
CyrusNajmabadi Mar 12, 2024
19799aa
Merge branch 'removeSolutionCrawlerIncremental' of https://github.com…
CyrusNajmabadi Mar 12, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -830,10 +830,6 @@ private static async Task TestThirdPartyCodeFixer<TCodefix, TAnalyzer>(string co
project = project.AddAnalyzerConfigDocument(".editorconfig", SourceText.From(editorconfigText), filePath: @"z:\\.editorconfig").Project;
workspace.TryApplyChanges(project.Solution);

// register this workspace to solution crawler so that analyzer service associate itself with given workspace
var incrementalAnalyzerProvider = workspace.ExportProvider.GetExportedValue<IDiagnosticAnalyzerService>() as IIncrementalAnalyzerProvider;
incrementalAnalyzerProvider.CreateIncrementalAnalyzer(workspace);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a lot of these calls were bogus. they were effectively trying to simulate the solution-crawler starting up and creating the incremental analyzer for a workspace.

we cannot depend on solution crawler for that, so now the underlying system ensures that the incremental analyzers are created on demand.


var hostdoc = workspace.Documents.Single();
var document = workspace.CurrentSolution.GetDocument(hostdoc.Id);

Expand Down Expand Up @@ -931,10 +927,6 @@ private protected static async Task AssertCodeCleanupResult(string expected, str

workspace.TryApplyChanges(solution);

// register this workspace to solution crawler so that analyzer service associate itself with given workspace
var incrementalAnalyzerProvider = workspace.ExportProvider.GetExportedValue<IDiagnosticAnalyzerService>() as IIncrementalAnalyzerProvider;
incrementalAnalyzerProvider.CreateIncrementalAnalyzer(workspace);

var hostdoc = workspace.Documents.Single();
var document = workspace.CurrentSolution.GetDocument(hostdoc.Id);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ internal CSharpInteractiveEvaluator(
_commandsFactory = commandsFactory;
_commands = commands;

_workspace = new InteractiveWindowWorkspace(hostServices, editorOptionsService.GlobalOptions);
_workspace = new InteractiveWindowWorkspace(hostServices);

_session = new InteractiveSession(
_workspace,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ internal sealed class InteractiveWindowWorkspace : InteractiveWorkspace
{
public IInteractiveWindow? Window { get; set; }

public InteractiveWindowWorkspace(HostServices hostServices, IGlobalOptionService globalOptions)
: base(hostServices, globalOptions)
public InteractiveWindowWorkspace(HostServices hostServices)
: base(hostServices)
{
}
}
Expand Down
17 changes: 1 addition & 16 deletions src/EditorFeatures/Core/Interactive/InteractiveWorkspace.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
// See the LICENSE file in the project root for more information.

using Microsoft.CodeAnalysis.Host;
using Microsoft.CodeAnalysis.Options;
using Microsoft.CodeAnalysis.SolutionCrawler;
using Microsoft.CodeAnalysis.Text;
using Microsoft.VisualStudio.Text;
using Roslyn.Utilities;
Expand All @@ -16,22 +14,9 @@ internal partial class InteractiveWorkspace : Workspace
private SourceTextContainer? _openTextContainer;
private DocumentId? _openDocumentId;

internal InteractiveWorkspace(HostServices hostServices, IGlobalOptionService globalOptions)
internal InteractiveWorkspace(HostServices hostServices)
: base(hostServices, WorkspaceKind.Interactive)
{
// register work coordinator for this workspace
if (globalOptions.GetOption(SolutionCrawlerRegistrationService.EnableSolutionCrawler))
{
Services.GetRequiredService<ISolutionCrawlerRegistrationService>().Register(this);
}
}

protected override void Dispose(bool finalize)
{
// workspace is going away. unregister this workspace from work coordinator
Services.GetRequiredService<ISolutionCrawlerRegistrationService>().Unregister(this, blockingShutdown: true);

base.Dispose(finalize);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no solution crawler, so workspaces are now decoupled from the deeply embedded concept.

}

public override bool CanOpenDocuments
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -701,12 +701,6 @@ private async ValueTask<IDifferenceViewerPreview<TDifferenceViewer>> CreateNewDi
rightWorkspace = null;
};

if (_editorOptionsService.GlobalOptions.GetOption(SolutionCrawlerRegistrationService.EnableSolutionCrawler))
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note: this was not a user visible option. We had it because i guess we just like options. Note: if this was ever something turned off it woudl break all diagnostics as well as unit testing. As an unsupported and undocumented internal option, it has just been removed.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We had it because i guess we just like options

This was primarily added to allow us to turn off solution crawler in RPS.

{
leftWorkspace?.Target.EnableSolutionCrawler();
rightWorkspace?.Target.EnableSolutionCrawler();
}

return CreateDifferenceViewerPreview(diffViewer);
}

Expand Down
6 changes: 0 additions & 6 deletions src/EditorFeatures/Core/Shared/Preview/PreviewWorkspace.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@ public PreviewWorkspace(Solution solution)
this.RaiseWorkspaceChangedEventAsync(WorkspaceChangeKind.SolutionChanged, oldSolution, newSolution);
}

public void EnableSolutionCrawler()
{
Services.GetRequiredService<ISolutionCrawlerRegistrationService>().Register(this);
}

public override bool CanApplyChange(ApplyChangesKind feature)
{
// one can manipulate preview workspace solution as mush as they want.
Expand Down Expand Up @@ -107,7 +102,6 @@ protected override void Dispose(bool finalize)
{
base.Dispose(finalize);

Services.GetRequiredService<ISolutionCrawlerRegistrationService>().Unregister(this);
ClearSolution();
}
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,29 @@
using Microsoft.CodeAnalysis.Editor.Shared.Utilities;
using Microsoft.CodeAnalysis.Host;
using Microsoft.CodeAnalysis.Host.Mef;
using Microsoft.CodeAnalysis.Options;
using Microsoft.CodeAnalysis.Remote;
using Microsoft.CodeAnalysis.Shared.TestHooks;
using Microsoft.CodeAnalysis.SolutionCrawler;
using Roslyn.Utilities;

namespace Microsoft.CodeAnalysis.LegacySolutionEvents;

/// <summary>
/// Event listener that hears about workspaces and exists solely to let unit testing continue to work using their own
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exists solely to let unit testing continue to work

Is it possible to move this type to test project?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry. By "unit testing" I don't mean "our unit tests". I mean "the unit testing team". They have a crawler to discover tests. But it's extremely trimmed down, and owned by them.

/// fork of solution crawler. Importantly, this is always active until the point that we can get unit testing to move
/// to an entirely differently (ideally 'pull') model for test discovery.
/// </summary>
[ExportEventListener(WellKnownEventListeners.Workspace, WorkspaceKind.Host), Shared]
internal sealed partial class HostLegacySolutionEventsWorkspaceEventListener : IEventListener<object>
{
private readonly IGlobalOptionService _globalOptions;
private readonly IThreadingContext _threadingContext;
private readonly AsyncBatchingWorkQueue<WorkspaceChangeEventArgs> _eventQueue;

[ImportingConstructor]
[Obsolete(MefConstruction.ImportingConstructorMessage, error: true)]
public HostLegacySolutionEventsWorkspaceEventListener(
IGlobalOptionService globalOptions,
IThreadingContext threadingContext,
IAsynchronousOperationListenerProvider listenerProvider)
{
_globalOptions = globalOptions;
_threadingContext = threadingContext;
_eventQueue = new AsyncBatchingWorkQueue<WorkspaceChangeEventArgs>(
DelayTimeSpan.Short,
Expand All @@ -44,14 +44,11 @@ public HostLegacySolutionEventsWorkspaceEventListener(

public void StartListening(Workspace workspace, object? serviceOpt)
{
if (_globalOptions.GetOption(SolutionCrawlerRegistrationService.EnableSolutionCrawler))
workspace.WorkspaceChanged += OnWorkspaceChanged;
_threadingContext.DisposalToken.Register(() =>
{
workspace.WorkspaceChanged += OnWorkspaceChanged;
_threadingContext.DisposalToken.Register(() =>
{
workspace.WorkspaceChanged -= OnWorkspaceChanged;
});
}
workspace.WorkspaceChanged -= OnWorkspaceChanged;
});
}

private void OnWorkspaceChanged(object? sender, WorkspaceChangeEventArgs e)
Expand Down
45 changes: 11 additions & 34 deletions src/EditorFeatures/Test/CodeFixes/CodeFixServiceTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,6 @@ public async Task TestGetFirstDiagnosticWithFixAsync()
var fixService = new CodeFixService(
diagnosticService, logger, fixers, SpecializedCollections.EmptyEnumerable<Lazy<IConfigurationFixProvider, CodeChangeProviderMetadata>>());

var incrementalAnalyzer = (IIncrementalAnalyzerProvider)diagnosticService;

// register diagnostic engine to solution crawler
var analyzer = incrementalAnalyzer.CreateIncrementalAnalyzer(workspace);

var reference = new MockAnalyzerReference();
var project = workspace.CurrentSolution.Projects.Single().AddAnalyzerReference(reference);
var document = project.Documents.Single();
Expand Down Expand Up @@ -302,8 +297,6 @@ private static async Task<ImmutableArray<CodeFixCollection>> GetAddedFixesAsync(
errorReportingService.OnError = message => errorReported = true;

GetDocumentAndExtensionManager(tuple.analyzerService, workspace, out var document, out var extensionManager);
var incrementalAnalyzer = (IIncrementalAnalyzerProvider)tuple.analyzerService;
var analyzer = incrementalAnalyzer.CreateIncrementalAnalyzer(workspace);
var reference = new MockAnalyzerReference(codefix, ImmutableArray.Create(diagnosticAnalyzer));
var project = workspace.CurrentSolution.Projects.Single().AddAnalyzerReference(reference);
document = project.Documents.Single();
Expand Down Expand Up @@ -408,10 +401,8 @@ private static void GetDocumentAndExtensionManager(
MockAnalyzerReference? analyzerReference = null,
TextDocumentKind documentKind = TextDocumentKind.Document)
{
var incrementalAnalyzer = (IIncrementalAnalyzerProvider)diagnosticService;

// register diagnostic engine to solution crawler
diagnosticIncrementalAnalyzer = (DiagnosticIncrementalAnalyzer)incrementalAnalyzer.CreateIncrementalAnalyzer(workspace)!;
diagnosticIncrementalAnalyzer = diagnosticService.CreateIncrementalAnalyzer(workspace)!;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the core interfaces went away, so this became strongly typed. teh tests just test calling through teh actual DiagnosticService and DiagnosticIncrementalAnalyzers now.


var reference = analyzerReference ?? new MockAnalyzerReference();
var project = workspace.CurrentSolution.Projects.Single().AddAnalyzerReference(reference);
Expand Down Expand Up @@ -794,11 +785,6 @@ private static async Task<ImmutableArray<CodeFixCollection>> GetNuGetAndVsixCode
var fixService = new CodeFixService(
diagnosticService, logger, vsixFixers, SpecializedCollections.EmptyEnumerable<Lazy<IConfigurationFixProvider, CodeChangeProviderMetadata>>());

var incrementalAnalyzer = (IIncrementalAnalyzerProvider)diagnosticService;

// register diagnostic engine to solution crawler
var analyzer = incrementalAnalyzer.CreateIncrementalAnalyzer(workspace);

diagnosticAnalyzer ??= new MockAnalyzerReference.MockDiagnosticAnalyzer();
var analyzers = ImmutableArray.Create<DiagnosticAnalyzer>(diagnosticAnalyzer);
var reference = new MockAnalyzerReference(nugetFixer, analyzers);
Expand Down Expand Up @@ -1022,7 +1008,6 @@ public AdditionalFileFixerWithoutDocumentKindsAndExtensions() : base(nameof(Addi
[Theory, CombinatorialData]
public async Task TestGetFixesWithDeprioritizedAnalyzerAsync(
DeprioritizedAnalyzer.ActionKind actionKind,
bool testWithCachedDiagnostics,
bool diagnosticOnFixLineInPriorSnapshot,
bool editOnFixLine,
bool addNewLineWithEdit)
Expand All @@ -1042,7 +1027,7 @@ public async Task TestGetFixesWithDeprioritizedAnalyzerAsync(
// of the heuristic where we compare intersecting diagnostics across document snapshots only if both
// snapshots have the same number of lines.

var expectDeprioritization = GetExpectDeprioritization(actionKind, testWithCachedDiagnostics, diagnosticOnFixLineInPriorSnapshot, addNewLineWithEdit);
var expectDeprioritization = GetExpectDeprioritization(actionKind, diagnosticOnFixLineInPriorSnapshot, addNewLineWithEdit);

var priorSnapshotFixLine = diagnosticOnFixLineInPriorSnapshot ? "int x1 = 0;" : "System.Console.WriteLine();";
var code = $@"
Expand Down Expand Up @@ -1073,7 +1058,8 @@ void M()
// Trigger background analysis to ensure analyzer diagnostics are computed and cached.
// We enable full solution analysis so the 'AnalyzeDocumentAsync' doesn't skip analysis based on whether the document is active/open.
workspace.GlobalOptions.SetGlobalOption(SolutionCrawlerOptionsStorage.BackgroundAnalysisScopeOption, LanguageNames.CSharp, BackgroundAnalysisScope.FullSolution);
await diagnosticIncrementalAnalyzer.AnalyzeDocumentAsync(sourceDocument, bodyOpt: null!, InvocationReasons.DocumentChanged, CancellationToken.None);

await diagnosticIncrementalAnalyzer.ForceAnalyzeProjectAsync(sourceDocument.Project, CancellationToken.None);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AnalzyeDocument went away, but we stilll have ForceAnalyzeProject (called when the user invokes "Run code analysis on project). So these tests could remain, just using that entrypoint to help simulate the behavior here.

await VerifyCachedDiagnosticsAsync(sourceDocument, expectedCachedDiagnostic: diagnosticOnFixLineInPriorSnapshot, testSpan, diagnosticIncrementalAnalyzer);

// Compute and apply code edit
Expand Down Expand Up @@ -1103,12 +1089,9 @@ void M()
? root.DescendantNodes().OfType<CodeAnalysis.CSharp.Syntax.VariableDeclarationSyntax>().First().Span
: root.DescendantNodes().OfType<CodeAnalysis.CSharp.Syntax.InvocationExpressionSyntax>().First().Span;

if (testWithCachedDiagnostics)
{
// Trigger background analysis to ensure analyzer diagnostics are computed and cached.
await diagnosticIncrementalAnalyzer.AnalyzeDocumentAsync(sourceDocument, bodyOpt: null!, InvocationReasons.DocumentChanged, CancellationToken.None);
await VerifyCachedDiagnosticsAsync(sourceDocument, expectedCachedDiagnostic: !expectedNoFixes, testSpan, diagnosticIncrementalAnalyzer);
}
await diagnosticIncrementalAnalyzer.GetDiagnosticsAsync(
sourceDocument.Project.Solution, sourceDocument.Project.Id, sourceDocument.Id, includeSuppressedDiagnostics: true, includeNonLocalDocumentDiagnostics: true, CancellationToken.None);
await diagnosticIncrementalAnalyzer.GetTestAccessor().TextDocumentOpenAsync(sourceDocument);

var lowPriorityAnalyzers = new ConcurrentSet<DiagnosticAnalyzer>();
var priorityProvider = new SuggestedActionPriorityProvider(CodeActionRequestPriority.Default, lowPriorityAnalyzers);
Expand Down Expand Up @@ -1144,31 +1127,25 @@ void M()

static bool GetExpectDeprioritization(
DeprioritizedAnalyzer.ActionKind actionKind,
bool testWithCachedDiagnostics,
bool diagnosticOnFixLineInPriorSnapshot,
bool addNewLineWithEdit)
{
// We expect de-prioritization of analyzer from 'Normal' to 'Low' bucket only if following conditions are met:
// 1. There are no cached diagnostics from background analysis, i.e. 'testWithCachedDiagnostics == false'.
// 2. We have an expensive analyzer that registers SymbolStart/End or SemanticModel actions, both of which have a broad analysis scope.
// 3. Either of the below is true:
// 1. We have an expensive analyzer that registers SymbolStart/End or SemanticModel actions, both of which have a broad analysis scope.
// 2. Either of the below is true:
// a. We do not have an analyzer diagnostic reported in the prior document snapshot on the edited line OR
// b. Number of lines in the prior document snapshot differs from number of lines in the current document snapshot,
// i.e. we added a new line with the edit and 'addNewLineWithEdit = true'.

// Condition 1
if (testWithCachedDiagnostics)
return false;

// Condition 2
if (actionKind is not (DeprioritizedAnalyzer.ActionKind.SymbolStartEnd or DeprioritizedAnalyzer.ActionKind.SemanticModel))
return false;

// Condition 3(a)
// Condition 2(a)
if (!diagnosticOnFixLineInPriorSnapshot)
return true;

// Condition 3(b)
// Condition 2(b)
return addNewLineWithEdit;
}

Expand Down
Loading
Loading