dotnet / dotnet/vscode-csharp

Build diagnostics not showing for large projects with Full Solution Analysis (FSA)

Open
#6,606 9 comments 1 reaction 1 assignee Claimed by @dibarbet View on GitHub
Dominant language
TypeScript
Stars
3.1k
Forks
737
Avg merge
18h 40m
Merged PRs (30d)
31

Description

There are two types of diagnostics reported by C#/Devkit extensions. Some are live diagnostics reported by analyzers and some are build diagnostics reported by the build. Live diagnostics may be computed for open files only, or for every file via full solution analysis.

Full solution analysis (FSA) can be slow for large projects. Due to deduping of build and live diagnostics, if FSA is on build diagnostics are ignored unless they are "build-only" (i.e. cannot be reported live). This means that for large projects, where FSA may be slow to return results, it may take a long time for legitimate problems to appear in the problem window.

## Steps to reproduce

1. Open a large project. Modify dotnet.backgroundAnalysis.analyzerDiagnosticsScope and dotnet.backgroundAnalysis.compilerDiagnosticsScope to "fullSolution"
2. Reload the project
3. Run the build

## Expected behavior
I should see diagnostics as soon as they are available. If the build completes before FSA, I see all the build diagnostics. If FSA finishes first, I see all the live diagnostics.

## Actual behavior
Although the build has completed, I don't see problems until they are reported by FSA.
 
Related to work https://github.com/dotnet/vscode-csharp/issues/5728

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.