Skip to content

[LSP] Remove isFinalized from semantic tokens logic#60322

Closed
allisonchou wants to merge 2 commits into
dotnet:mainfrom
allisonchou:RemoveIsFinalizedLogic
Closed

[LSP] Remove isFinalized from semantic tokens logic#60322
allisonchou wants to merge 2 commits into
dotnet:mainfrom
allisonchou:RemoveIsFinalizedLogic

Conversation

@allisonchou
Copy link
Copy Markdown
Contributor

This property is currently only used by Razor - see dotnet/razor#6194 for details.
Will likely have to be dual inserted with the Razor PR

@allisonchou allisonchou requested a review from a team as a code owner March 22, 2022 20:02
@ghost ghost added the Area-IDE label Mar 22, 2022
// results but will speed up how quickly we can respond to the client's request.
var frozenDocument = document.WithFrozenPartialSemantics(cancellationToken);
var semanticModel = await frozenDocument.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
var isFinalized = document.Project.TryGetCompilation(out var compilation) && compilation == semanticModel.Compilation;
Copy link
Copy Markdown
Member

@dibarbet dibarbet Mar 22, 2022

Choose a reason for hiding this comment

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

is this because of the issue where the compilation out of proc is not necessarily finalized when the compilation in proc is? Or is checking for the compilation here just not correct?

Is this not an issue for regular C# tagger too @CyrusNajmabadi ? It looks like we use the compilation available event there as well, which I presume is coming from the in-proc version - https://sourceroslyn.io/#Microsoft.CodeAnalysis.EditorFeatures/Classification/Semantic/AbstractSemanticOrEmbeddedClassificationViewTaggerProvider.cs,65

@allisonchou
Copy link
Copy Markdown
Contributor Author

Superseded by #60484

@allisonchou allisonchou deleted the RemoveIsFinalizedLogic branch March 30, 2022 22:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants