Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DidChangeConfigurationProvider Startup Warning #2196

Open
JustinGrote opened this issue Nov 1, 2024 · 3 comments
Open

DidChangeConfigurationProvider Startup Warning #2196

JustinGrote opened this issue Nov 1, 2024 · 3 comments

Comments

@JustinGrote
Copy link
Collaborator

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!

@JustinGrote JustinGrote transferred this issue from PowerShell/vscode-powershell Nov 1, 2024
@andyleejordan
Copy link
Member

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

@eredden
Copy link

eredden commented Jan 4, 2025

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
Copy link
Collaborator Author

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants