-
Notifications
You must be signed in to change notification settings - Fork 437
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Return None instead of "" for empty hover results
Summary: Empty hover results have historically been returning the empty string. This is ok for the UX and our telemetry metrics, but not ideal for chronicle metrics as they count this as a successful response. By sending `null` instead of the empty string, we fix these metrics. See the [LSP spec](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#languageServerProtocol) for more details. The special casing in pyre_language_server is necessary because my testing of [exclude](lidatong/dataclasses-json#187) seems to not work. It still encodes as {} instead of `None`. | Why not make an alias for `LspHoverResponse` = `NonEmptyLspHoverResponse | None`? This isn't ideal for usability since our static method `from_pyre_hover_responses` would be on the `NonEmptyLspHoverResponse`. Reviewed By: grievejia Differential Revision: D48253814 fbshipit-source-id: 358ae59e3172dd7566e4806730a0cee72b0746d5
- Loading branch information
1 parent
1afca29
commit e21527d
Showing
6 changed files
with
48 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters