Skip to content

Use null instead of empty signature helps in LSP#52126

Merged
3 commits merged intomainfrom
nimullen/signaturehelp
Mar 25, 2021
Merged

Use null instead of empty signature helps in LSP#52126
3 commits merged intomainfrom
nimullen/signaturehelp

Conversation

@NTaylorMullen
Copy link
Copy Markdown

  • The LSP specification requires that signatures be provided. Currently Roslyn breaks this LSP contract by returning a new signature help item. It should be returning null
    image

- The LSP specification requires that `signatures` be provided. Currently Roslyn breaks this LSP contract by returning a new signature help item. It should be returning `null`
@NTaylorMullen NTaylorMullen requested a review from a team as a code owner March 24, 2021 22:59
@ghost ghost added the Area-IDE label Mar 24, 2021
Copy link
Copy Markdown
Member

@dibarbet dibarbet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 thanks for the change, just needs nullable annotations update

var document = context.Document;
if (document == null)
{
return new LSP.SignatureHelp();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the nullable annotations need to be updated for the method signature + implementing signature, also in the entry point here - https://github.com/dotnet/roslyn/blob/main/src/VisualStudio/Core/Def/Implementation/LanguageClient/InProcLanguageServer.cs#L426

@NTaylorMullen
Copy link
Copy Markdown
Author

thanks for the change, just needs nullable annotations update

You mean I can't just open up the GitHUb editor and submit PRs like this? 😆

Copy link
Copy Markdown

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto-approval


[ExportLspRequestHandler(LiveShareConstants.TypeScriptContractName, Methods.TextDocumentSignatureHelpName)]
internal class TypeScriptSignatureHelpHandlerShim : SignatureHelpHandler, ILspRequestHandler<TextDocumentPositionParams, SignatureHelp, Solution>
internal class TypeScriptSignatureHelpHandlerShim : SignatureHelpHandler, ILspRequestHandler<TextDocumentPositionParams, SignatureHelp?, Solution>
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh yeah forgot about these. Are these dead yet @uniqueiniquity ? Should we just remove them

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, was out of the office for a few days.
Signature help definitely is, though I think others aren't (e.g. navbar stuff).

@ghost ghost merged commit 034641f into main Mar 25, 2021
@ghost ghost deleted the nimullen/signaturehelp branch March 25, 2021 21:58
@ghost ghost added this to the Next milestone Mar 25, 2021
@allisonchou allisonchou modified the milestones: Next, 16.10.P2 Mar 29, 2021
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants