Initialize feature flags in OOP early#12079
Merged
davidwengier merged 19 commits intodotnet:mainfrom Sep 14, 2025
Merged
Conversation
4b6c2ca to
540d743
Compare
034f1a4 to
5378573
Compare
5378573 to
464e379
Compare
davidwengier
commented
Aug 20, 2025
src/Razor/src/Microsoft.VisualStudio.RazorExtension/RazorPackage.cs
Outdated
Show resolved
Hide resolved
6913f2f to
6d1885d
Compare
davidwengier
added a commit
to dotnet/roslyn
that referenced
this pull request
Aug 26, 2025
~Putting this up as draft for now, gonna see if I can do a dual test insertion to confirm this makes RPS happy. The UI context is defined in dotnet/razor#12079 so its a little bit painful to validate everything together :)~ This PR does two things: 1. Makes the lifetime service Lazy, which it should have always been but I forgot. Not being lazy means Razor can't move to it, as just MEF construction causes RPS regressions. Oops! 2. Adds a ui context to control pre-initialization. This allows Razor to control whether that occurs, when, and whether it actually does anything. Until Razor is in this won't do anything, but runs in the dual test insertion (https://devdiv.visualstudio.com/DevDiv/_git/VS/pullrequest/664449) look good so far.
3513853 to
667b24b
Compare
667b24b to
805c73b
Compare
Member
DustinCampbell
left a comment
There was a problem hiding this comment.
Please take a closer look at the RemoteServiceInvoker changes.
...Razor/src/Microsoft.CodeAnalysis.Remote.Razor/Completion/RoslynCompletionListCacheWrapper.cs
Outdated
Show resolved
Hide resolved
.../src/Microsoft.CodeAnalysis.Remote.Razor/Initialization/RemoteClientInitializationService.cs
Outdated
Show resolved
Hide resolved
src/Razor/src/Microsoft.CodeAnalysis.Remote.Razor/InlayHints/RoslynInlayHintCacheWrapper.cs
Outdated
Show resolved
Hide resolved
src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/Remote/RemoteServiceInvoker.cs
Outdated
Show resolved
Hide resolved
src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/Remote/RemoteServiceInvoker.cs
Outdated
Show resolved
Hide resolved
src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/Remote/RemoteServiceInvoker.cs
Outdated
Show resolved
Hide resolved
src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/Remote/RemoteServiceInvoker.cs
Outdated
Show resolved
Hide resolved
src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/Remote/RemoteServiceInvoker.cs
Outdated
Show resolved
Hide resolved
src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/Remote/RemoteServiceInvoker.cs
Outdated
Show resolved
Hide resolved
src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/Remote/RemoteServiceInvoker.cs
Outdated
Show resolved
Hide resolved
# Conflicts: # Directory.Packages.props # eng/Version.Details.props # eng/Version.Details.xml # src/Razor/src/Microsoft.CodeAnalysis.Remote.Razor/Completion/RemoteCompletionService.cs # src/Razor/src/Microsoft.CodeAnalysis.Remote.Razor/InlayHints/RemoteInlayHintService.cs
Member
Author
|
Ended up reverting a lot of this, in particular the bad bits because we don't need them anymore. Do need to wait for dotnet/roslyn#80229 to be inserted though. Swings and roundabouts :) |
DustinCampbell
approved these changes
Sep 11, 2025
...Razor/src/Microsoft.CodeAnalysis.Remote.Razor/Completion/RoslynCompletionListCacheWrapper.cs
Outdated
Show resolved
Hide resolved
src/Razor/src/Microsoft.CodeAnalysis.Remote.Razor/InlayHints/RoslynInlayHintCacheWrapper.cs
Outdated
Show resolved
Hide resolved
src/Razor/src/Microsoft.VisualStudio.RazorExtension/RazorPackage.cs
Outdated
Show resolved
Hide resolved
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 #12069
Test insertion is all green: https://dev.azure.com/devdiv/DevDiv/_git/VS/pullrequest/665911