-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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 argument that was always passed the same value #77045
Conversation
@@ -30,9 +30,8 @@ private async Task<ProjectAnalysisData> GetProjectAnalysisDataAsync( | |||
try | |||
{ | |||
// PERF: We need to flip this to false when we do actual diffing. | |||
var avoidLoadingData = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
always passing true here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe remove the comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sgtm.
@@ -92,15 +92,15 @@ public DiagnosticAnalysisResult GetResult(DiagnosticAnalyzer analyzer) | |||
public bool TryGetResult(DiagnosticAnalyzer analyzer, out DiagnosticAnalysisResult result) | |||
=> Result.TryGetValue(analyzer, out result); | |||
|
|||
public static async Task<ProjectAnalysisData> CreateAsync(Project project, IEnumerable<StateSet> stateSets, bool avoidLoadingData, CancellationToken cancellationToken) | |||
public static async Task<ProjectAnalysisData> CreateAsync(Project project, ImmutableArray<StateSet> stateSets, CancellationToken cancellationToken) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
always passed true into here.
{ | ||
VersionStamp? version = null; | ||
|
||
var builder = ImmutableDictionary.CreateBuilder<DiagnosticAnalyzer, DiagnosticAnalysisResult>(); | ||
foreach (var stateSet in stateSets) | ||
{ | ||
var state = stateSet.GetOrCreateProjectState(project.Id); | ||
var result = await state.GetAnalysisDataAsync(project, avoidLoadingData, cancellationToken).ConfigureAwait(false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
always passed true into here.
@@ -67,7 +67,7 @@ public async Task<DiagnosticAnalysisResult> GetAnalysisDataAsync(Project project | |||
// PERF: avoid loading data if version is not right one. | |||
// avoid loading data flag is there as a strictly perf optimization. | |||
var version = await GetDiagnosticVersionAsync(project, cancellationToken).ConfigureAwait(false); | |||
if (avoidLoadingData && lastResult.Version != version) | |||
if (lastResult.Version != version) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so this can trivially be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
...guageServer/Protocol/Features/Diagnostics/EngineV2/DiagnosticIncrementalAnalyzer.Executor.cs
Outdated
Show resolved
Hide resolved
…nosticIncrementalAnalyzer.Executor.cs
No description provided.