OmniSharp / OmniSharp/csharp-language-server-protocol
PartialResultToken is always `null`
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 638
- Forks
- 109
- Avg merge
- 1m
- Merged PRs (30d)
- 2
Description
I tried to stream workspace symbols and faced a problem that request.PartialResultToken and request.WorkDoneToken are always null. It is reproduced on the sample client/server from this repository and also on my small example:
class WorkspaceSymbolsHandler : WorkspaceSymbolsHandlerBase
{
public override Task<Container<SymbolInformation>> Handle(WorkspaceSymbolParams request, CancellationToken cancellationToken)
{
Debug.Assert(request.PartialResultToken != null); // always false
Debug.Assert(request.WorkDoneToken != null); // always false
var location = new Location(){
Uri = "test.uuu",
Range = new Range(0, 0, 1, 1)
};
var symbols = new List<SymbolInformation>() {
new SymbolInformation{ Name = "Symbol-1", Location = location},
new SymbolInformation{ Name = "Symbol-2", Location = location},
new SymbolInformation{ Name = "Symbol-3", Location = location},
};
return Task.FromResult<Container<SymbolInformation>>(symbols);
}
protected override WorkspaceSymbolRegistrationOptions CreateRegistrationOptions(WorkspaceSymbolCapability capability, ClientCapabilities clientCapabilities)
{
return new(){ WorkDoneProgress = true };
}
}
Do I have to do something else on the client or on the server to get a token?
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 the sample client/server mentioned in the report and trace the WorkspaceSymbolsHandler request shown in the reproduction. Compare how PartialResultToken and WorkDoneToken are sent and deserialized, then verify the expected token behavior with the sample or linked example; done means the cause and required client/server change are demonstrated.
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