Skip to content

Conversation

@davidwengier
Copy link
Member

Since Roslyn uses dynamic registration for configuration change requests, Razor can't. Even if we could, as a document-less request, it couldn't be routed to us anyway. So this exposes a hook for us through our EA.

Razor side is at dotnet/razor#11800

Part of dotnet/razor#11759

@davidwengier davidwengier requested a review from a team as a code owner April 29, 2025 05:15
@ghost ghost added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Apr 29, 2025
{
public ILspService CreateILspService(LspServices lspServices, WellKnownLspServerKinds serverKind)
{
return new RazorConfigurationChangedService(cohostConfigurationChangedService);
Copy link
Member

Choose a reason for hiding this comment

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

You might be teaching me something here. When exporting via the factory, does the service get registered for each of the interfaces that it implements? Or does something else tie this to IOnConfigurationChanged?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, but its not specific to factories. The magic is here I believe:

InterfaceNames = Array.ConvertAll(serviceType.GetInterfaces(), t => t.AssemblyQualifiedName!);
(and then
if (lazyService.Metadata.InterfaceNames.Contains(typeof(T).AssemblyQualifiedName!))
when they are retreived)

…ionChangedServiceFactory.cs

Co-authored-by: David Barbet <dibarbet@gmail.com>
@davidwengier davidwengier merged commit 15ec676 into dotnet:main Apr 30, 2025
25 checks passed
@davidwengier davidwengier deleted the RazorDidChange branch April 30, 2025 04:05
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Apr 30, 2025
davidwengier added a commit to dotnet/razor that referenced this pull request May 2, 2025
#11800)

Part of #11759

This cleans up `IClientSettingsManager` and puts it back to its previous
state, removing `IClientSettingsReader` at the same time, and also
implements a hook for VS Code to get notified when the VS Code
configuration changes, and to read the settings as appropriate.

Needs a bump to dotnet/roslyn#78364 before it
will build
@RikkiGibson RikkiGibson modified the milestones: Next, 18.0 P1 Aug 19, 2025
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 VSCode

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants