Skip to content

The response to textDocument/signatureHelp is not per spec #1324

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

Closed
rwols opened this issue Jul 8, 2020 · 8 comments · Fixed by OmniSharp/csharp-language-server-protocol#258
Labels

Comments

@rwols
Copy link

rwols commented Jul 8, 2020

:: --> PowerShellEditorServices textDocument/signatureHelp(7): {'position': {'line': 0, 'character': 8}, 'textDocument': {'uri': 'file:///Users/raoulwols/Library/Application%20Support/Sublime%20Text%203/Packages/LSP-PowerShellEditorServices/test.ps1'}}
:: <<< PowerShellEditorServices 7: {'signatures': None}

The value of the signatures key should be an array (so not an array | null).
If there are no signatures available, you can send null instead of {"signatures": null}.

@ghost ghost added the Needs: Triage Maintainer attention needed! label Jul 8, 2020
@TylerLeonhardt
Copy link
Member

Looks like this is the line where we're doing it wrong:

if (parameterSets == null)
{
return new SignatureHelp();
}

I guess we can just return null... although... maybe new SignatureHelp() should create an empty array for Signatures...

cc @david-driscoll

@ghost ghost added the Needs: Maintainer Attention Maintainer attention needed! label Jul 8, 2020
@TylerLeonhardt
Copy link
Member

btw @rwols what client are you using?

@rwols
Copy link
Author

rwols commented Jul 8, 2020

I'm using this plugin for SublimeText. I'm actually working on a convenience plugin that installs/updates the server here.

@rwols
Copy link
Author

rwols commented Jul 8, 2020

maybe new SignatureHelp() should create an empty array for Signatures...

That is certainly also a possibility.

@TylerLeonhardt
Copy link
Member

@rwols if you want to contribute a call out to LSP-PowerShellEditorServices in our README that'd be awesome :)

rwols added a commit to sublimelsp/LSP that referenced this issue Jul 9, 2020
- The "tags" in a CompletionItem response are null (invalid per spec)
- The "signatures" in a textDocument/signatureHelp response is null (invalid per spec)

See: PowerShell/PowerShellEditorServices#1324
See: PowerShell/PowerShellEditorServices#1325

Co-authored-by: Предраг Николић / Predrag Nikolic <[email protected]>
@SydneyhSmith SydneyhSmith added Area-Language Server Issue-Bug A bug to squash. and removed Needs: Maintainer Attention Maintainer attention needed! Needs: Triage Maintainer attention needed! labels Jul 9, 2020
@TylerLeonhardt
Copy link
Member

fix out for this ^

@ghost ghost added the Needs: Maintainer Attention Maintainer attention needed! label Jul 9, 2020
@TylerLeonhardt TylerLeonhardt removed the Needs: Maintainer Attention Maintainer attention needed! label Jul 9, 2020
@TylerLeonhardt
Copy link
Member

This is fixed. Automation will rev the version of the library that we use and it'll be in the next version of PSES

@ghost ghost added the Needs: Maintainer Attention Maintainer attention needed! label Jul 9, 2020
@TylerLeonhardt TylerLeonhardt removed the Needs: Maintainer Attention Maintainer attention needed! label Jul 9, 2020
@rwols
Copy link
Author

rwols commented Jul 9, 2020

Thanks for the quick fix! I'm still busy getting things working for Windows, I'll make a PR for a call-out when the plugin is ready :)

@ghost ghost added the Needs: Maintainer Attention Maintainer attention needed! label Jul 9, 2020
@TylerLeonhardt TylerLeonhardt removed the Needs: Maintainer Attention Maintainer attention needed! label Jul 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants