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

LSPServerOutputFilter filtering valid initialize progress messages #1390

Open
JustinGrote opened this issue Nov 10, 2024 · 2 comments
Open

Comments

@JustinGrote
Copy link

Reproduce (per the provided sample in this repo)

                    .OnInitialize(
                        (languageServer, initializeParams, cancellationToken) =>
                        {
                            if (languageServer.WorkDoneManager.IsSupported)
                            {
                                initializeProgress = languageServer.WorkDoneManager.For(
                                    initializeParams,
                                    new WorkDoneProgressBegin()
                                    {
                                        Title = "Initializing PowerShell Editor Services",
                                        Percentage = 0,
                                    }
                                );
                            }
etc.

Expected

Progress messages with the initialize worktoken arrive and surfaced on the client as per the initialize spec

Actual

Filtered by LspServerOutputFilter

2024-11-09 18:23:18.598 [trace] Params: {
    "type": 2,
    "message": "OmniSharp.Extensions.LanguageServer.Server.LspServerOutputFilter: Tried to send request or notification before initialization was completed and will be sent later OutgoingNotification { Method = $/progress, Params = ProgressParams { Token = 23da5d56-3261-4793-9561-e91663a356e6, Value = {\r\n  \"title\": \"Initializing PowerShell Editor Services\",\r\n  \"percentage\": 0,\r\n  \"kind\": \"begin\"\r\n} }, TraceParent = , TraceState =  } | @Request='OutgoingNotification { Method = $/progress, Params = ProgressParams { Token = 23da5d56-3261-4793-9561-e91663a356e6, Value = {\r\n  \"title\": \"Initializing PowerShell Editor Services\",\r\n  \"percentage\": 0,\r\n  \"kind\": \"begin\"\r\n} }, TraceParent = , TraceState =  }'"
}
2024-11-09 18:23:18.606 [trace] ◀️ notification 'window/logMessage'.
2024-11-09 18:23:18.606 [trace] Params: {
    "type": 2,
    "message": "OmniSharp.Extensions.LanguageServer.Server.LspServerOutputFilter: Tried to send request or notification before initialization was completed and will be sent later OutgoingNotification { Method = $/progress, Params = ProgressParams { Token = 23da5d56-3261-4793-9561-e91663a356e6, Value = {\r\n  \"percentage\": 50,\r\n  \"kind\": \"report\",\r\n  \"message\": \"Fetching PSES Internal Host\"\r\n} }, TraceParent = , TraceState =  } | @Request='OutgoingNotification { Method = $/progress, Params = ProgressParams { Token = 23da5d56-3261-4793-9561-e91663a356e6, Value = {\r\n  \"percentage\": 50,\r\n  \"kind\": \"report\",\r\n  \"message\": \"Fetching PSES Internal Host\"\r\n} }, TraceParent = , TraceState =  }'"
}
@andyleejordan
Copy link
Contributor

Unfortunately I have to say: don't expect a fix any time soon. This project is treading water sadly.

@JustinGrote
Copy link
Author

@andyleejordan wasn't counting on it, just noting for prosperity since I found it :)

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

2 participants