Use frozen-partial semantics when producing semantic classifications#51704
Merged
4 commits merged intodotnet:mainfrom Mar 8, 2021
Merged
Use frozen-partial semantics when producing semantic classifications#517044 commits merged intodotnet:mainfrom
4 commits merged intodotnet:mainfrom
Conversation
Member
|
@CyrusNajmabadi The optimization seems wise, but once we do have a proper compilation, do we refresh? or is this going to result in classifications being "stuck" and never completed until an edit or something else that forces a recompute? (now I say this as somebody who thinks they noticed a stuck classification yesterday so this may not be making problems worse, or it's not enough of a bug to matter...) |
jasonmalinowski
approved these changes
Mar 5, 2021
Member
jasonmalinowski
left a comment
There was a problem hiding this comment.
Approved, with the caveat that I wonder if this is introducing a bug. But that might not matter.
Contributor
Author
|
THe major question would be: will this result in a notification that the workspace had changed. It may not, which is indeed a potential problem. Will take offline to dsicuss with you. |
jasonmalinowski
approved these changes
Mar 5, 2021
src/EditorFeatures/Core/Implementation/Classification/CompilationAvailableTaggerEventSource.cs
Outdated
Show resolved
Hide resolved
src/EditorFeatures/Core/Implementation/Classification/CompilationAvailableTaggerEventSource.cs
Outdated
Show resolved
Hide resolved
This pull request was closed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes https://dev.azure.com/devdiv/DevDiv/_workitems/edit/1284416
Normal semantics may take a very long time to compute for a document. Particularly during project load, or in multi-lang cases (due to building skeleton assemblies). This waiting does not help, and actively hinders the classification experience as it means that we have to wait for all bg compilation work to finish for that project before getting semantic classifications.
With frozen partial semantics though, we snap the state of hte project wherever we are in BG compilation (i.e. however far along we are with parsing files and loading metadata). This allows us to at least classify what we understand so far, allowing more accurate classifications to be returned gradually as we understand more of the project.
For a multi-lang case, we'd be able to get classifications for all types parsed in that lang, and all normal metadata refs. Only things like symbols from skeletons would take a little bit longer.