Skip to content

DidChangeConfigurationProvider Startup Warning #2196

Open
@JustinGrote

Description

@JustinGrote

This message often comes up on startup of PSES, I think something in the configuration provider startup is triggering it and it probably should be cleaned up.
[Warn - 10:15:02 PM] OmniSharp.Extensions.LanguageServer.Server.Configuration.DidChangeConfigurationProvider: No ConfigurationItems have been defined, configuration won't surface any configuration from the client!

Activity

andyleejordan

andyleejordan commented on Nov 4, 2024

@andyleejordan
Member

@JustinGrote I have wondered for years what this means and decided it couldn't be breaking anything 😅

eredden

eredden commented on Jan 4, 2025

@eredden

I apologize if this happens to be a necropost, but I was able to find the code that produces this log at line 100 of the DidChangeConfigurationProvider.cs file of the csharp-language-server-protocol repository by OmniSharp. The program appears to check a hashset of ConfigurationItem values and produces the startup warning when no configuration items are found.

I am not quite sure where the ConfigurationItem class is defined as I do not have .NET installed on my machine nor have I installed any of the packages that the csharp-language-server-protocol requires. I don't use C# at all, so I would not be a good resource to ask regardless. I just figured this bit of digging might help get this issue pointed in the right direction.

Here are the excerpts of code from DidChangeConfigurationProvider.cs mentioned in the first paragraph:

private readonly HashSet<ConfigurationItem> _configurationItems = new HashSet<ConfigurationItem>();

. . .

private IObservable<System.Reactive.Unit> GetWorkspaceConfiguration()
        {
 
        . . .

            if (_configurationItems.Count == 0)
            {
                _logger.LogWarning("No ConfigurationItems have been defined, configuration won't surface any configuration from the client!");

                OnReload();
                return Empty<System.Reactive.Unit>();
            }

        . . .

}
JustinGrote

JustinGrote commented on Jan 4, 2025

@JustinGrote
CollaboratorAuthor

It's an open issue so it's not a necro! We do know it produces at this point, what we need to find out which are the circumstances when no config items are present, and have an explicit exclusion for those. This is a good warning to have to catch bugs, but we aren't sure if the situation it is presenting is "normal" or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @andyleejordan@JustinGrote@eredden

        Issue actions

          DidChangeConfigurationProvider Startup Warning · Issue #2196 · PowerShell/PowerShellEditorServices