Skip to content

Conversation

@CyrusNajmabadi
Copy link
Member

@CyrusNajmabadi CyrusNajmabadi commented Apr 10, 2024

Previously, this could lead to 'stuck' diagnostics in the error list if FSA was on, but was then turned off. Only a restart would remove them. Now, you can turn FSA off, and existnig errors in closed files should disappear.

@CyrusNajmabadi CyrusNajmabadi requested a review from a team as a code owner April 10, 2024 18:47
@ghost ghost added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Apr 10, 2024
@CyrusNajmabadi CyrusNajmabadi requested a review from dibarbet April 10, 2024 18:47
_globalOptions.SetGlobalOption(SolutionCrawlerOptionsStorage.BackgroundAnalysisScopeOption, InternalLanguageNames.TypeScript,
openFilesOnly ? BackgroundAnalysisScope.OpenFiles : BackgroundAnalysisScope.FullSolution);
_globalOptions.SetGlobalOption(SolutionCrawlerOptionsStorage.CompilerDiagnosticsScopeOption, InternalLanguageNames.TypeScript,
openFilesOnly ? CompilerDiagnosticsScope.OpenFiles : CompilerDiagnosticsScope.FullSolution);
Copy link
Member Author

Choose a reason for hiding this comment

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

both these options are checked, so both need to change in order to get proper behavior corresponding to the single switch TS has.

if (!seenDiagnosticSourceIds.Contains(projectOrDocumentId) &&
!removedResults.Contains(previousDiagnosticParams))
{
progress.Report(CreateRemovedReport(previousDiagnosticParams.TextDocument));
Copy link
Member

Choose a reason for hiding this comment

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

Might be good to note here that we're creating a removed report because as far as the client is concerned for diagnostics - the document is removed.

We don't want to create an empty report as that might mean the client thinks we're still reporting diagnostics for it (but with 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.

sounds good.

@@ -22,427 +23,424 @@
using Xunit.Abstractions;
using LSP = Roslyn.LanguageServer.Protocol;

namespace Microsoft.CodeAnalysis.LanguageServer.UnitTests.Diagnostics
Copy link
Member Author

Choose a reason for hiding this comment

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

view with whitespace off.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants