OmniSharp / OmniSharp/csharp-language-server-protocol
LSPServerOutputFilter filtering valid initialize progress messages
Open
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 638
- Forks
- 109
- Avg merge
- 1m
- Merged PRs (30d)
- 2
Description
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 = }'"
}
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with LspServerOutputFilter and the initialization handling implicated by the log, then reproduce the provided sample using the initialize progress messages. Done means valid $/progress notifications from initialization reach the client instead of being filtered or delayed incorrectly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100