提交 8a76200f 编写于 作者: M Manish Vasani

Fix incorrectly resolved conflicts

上级 6971285f
......@@ -435,8 +435,8 @@ private async Task ReportPreviousProjectErrorsIfRequiredAsync(ProjectId projectI
private async Task SetLiveErrorsForProjectAsync(ProjectId projectId, InProgressState state, CancellationToken cancellationToken)
{
var diagnostics = state.GetLiveErrorsForProject(projectId, cancellationToken);
await SetLiveErrorsForProjectAsync(projectId, diagnostics).ConfigureAwait(false);
var diagnostics = state.GetLiveErrorsForProject(projectId);
await SetLiveErrorsForProjectAsync(projectId, diagnostics, cancellationToken).ConfigureAwait(false);
state.MarkLiveErrorsReported(projectId);
}
......@@ -702,7 +702,7 @@ IEnumerable<ProjectId> GetProjectsWithErrors()
}
}
public ImmutableArray<DiagnosticData> GetLiveErrorsForProject(ProjectId projectId, CancellationToken cancellationToken)
public ImmutableArray<DiagnosticData> GetLiveErrorsForProject(ProjectId projectId)
{
var project = Solution.GetRequiredProject(projectId);
......@@ -711,7 +711,7 @@ public ImmutableArray<DiagnosticData> GetLiveErrorsForProject(ProjectId projectI
using var _ = ArrayBuilder<DiagnosticData>.GetInstance(out var builder);
foreach (var (diagnostic, _) in diagnostics)
{
if (IsLive(project, diagnostic, cancellationToken))
if (IsLive(project, diagnostic))
{
builder.Add(diagnostic);
}
......@@ -732,7 +732,7 @@ public void AddError(DocumentId key, DiagnosticData diagnostic)
public void AddError(ProjectId key, DiagnosticData diagnostic)
=> AddError(_projectMap, key, diagnostic);
private bool IsLive(Project project, DiagnosticData diagnosticData, CancellationToken cancellationToken)
private bool IsLive(Project project, DiagnosticData diagnosticData)
{
// REVIEW: current design is that we special case compiler analyzer case and we accept only document level
// diagnostic as live. otherwise, we let them be build errors. we changed compiler analyzer accordingly as well
......@@ -744,7 +744,7 @@ private bool IsLive(Project project, DiagnosticData diagnosticData, Cancellation
return false;
}
if (IsSupportedLiveDiagnosticId(project, diagnosticData.Id, cancellationToken))
if (IsSupportedLiveDiagnosticId(project, diagnosticData.Id))
{
return true;
}
......@@ -804,8 +804,6 @@ ImmutableHashSet<string> ComputeSupportedLiveDiagnosticIds()
foreach (var analyzersPerReference in project.Solution.State.Analyzers.CreateDiagnosticAnalyzersPerReference(project))
{
cancellationToken.ThrowIfCancellationRequested();
foreach (var analyzer in analyzersPerReference.Value)
{
var diagnosticIds = infoCache.GetNonCompilationEndDiagnosticDescriptors(analyzer).Select(d => d.Id);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册