Enable CodeActions support for XAML#52129
Merged
mgoertz-msft merged 1 commit intodotnet:mainfrom Mar 25, 2021
Merged
Conversation
…tionCache. The handlers are actually shared with Roslyn as is. Switch to using a path to DocumentId cache in the XamlProjectService to avoid unnecessary and sometimes dangerous transitions to the main thread during TrackDocument calls.
dibarbet
approved these changes
Mar 25, 2021
Member
There was a problem hiding this comment.
This looks fine, just wanted to make you aware of the limitations - anything that is not an ApplyChangesOperation code action will be run as a command on the server. So it is a little fragile if the server makes changes to files the client has open in non-apply changes
Additionally, the server must switch to the UI thread to apply the command. This can cause deadlocks when using LSP locally, see #51951
Contributor
Author
|
Thanks @dibarbet. I did run into an LSP deadlock when expanding the lightbulb which prompted me to change the TrackOpenDocument code to avoid unnecessary thread transitions, but I can see how this could become an issue if CodeActions themselves do a SwitchToMainThreadAsync. Hmm... |
Merged
333fred
added a commit
to 333fred/roslyn
that referenced
this pull request
Mar 25, 2021
* upstream/main: (75 commits) Split BoundInterpolatedString into BoundInterpolatedString and BoundUnconvertedInterpolatedString (dotnet#52061) Combine VB comparers into one, and combine VB and C# comparers together (dotnet#51834) Use OptimizedVSCompletionList in LSP scenarios. F5 Hot Reload (dotnet#52101) Fix typescript shim Add tests for lazy syntax trees coming from the GeneratorDriver React to code review feedback. Simplify the lazy-initalization pattern used in GetRoot Remove an unnecessary override. (dotnet#52140) Update issue number (dotnet#52130) Enable CodeActions support for XAML using its own provider and CodeActionCache. The handlers are actually shared with Roslyn as is. (dotnet#52129) Add RestrictedIVT to dotnet watch to Features (dotnet#52087) Don't try to highlight operators (dotnet#52041) Use `null` instead of empty signature helps in LSP Use member type for relational pattern even in error cases (dotnet#51950) Update src/VisualStudio/Xaml/Impl/Implementation/LanguageServer/Extensions/SymbolExtensions.cs Use new QuickInfoUtilities helper Rebuild API shape (dotnet#52079) Added position parameter name Updated XAML QuickInfo to show more info like C# by using ISymbolDisplayService and adding more documentation parts. ...
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.
Enable CodeActions support for XAML using its own provider and CodeActionCache. The handlers are actually shared with Roslyn as is.
Switch to using a path to DocumentId cache in the XamlProjectService to avoid unnecessary and sometimes dangerous transitions to the main thread during TrackOpenDocument calls.