Skip to content

Commit 44fd76b

Browse files
authored
Handle clients sending "null" instead of a missing field (#543)
* Accept null in place of a missing value We sometimes see reports where HLS is not working because the client sends us slightly wrong JSON. We should follow the principle of robustness and try to accept this where we can - following the spec precisely is hard! The specific case we hadle here is accepting null to mean "missing" when null is not a valid value for the type. Currently we will treat it as a _present_ value and then fail to interpret null as a value of the type. * Mark lsp-types generated code as generated for github * typo * Fix a few more * Refactor tests a little * Changelog * Improve comment
1 parent 242644d commit 44fd76b

File tree

244 files changed

+359
-284
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

244 files changed

+359
-284
lines changed

.gitattributes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
lsp-types/generated linguist-generated=true
1+
lsp-types/generated/** linguist-generated=true

lsp-types/.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
lsp-types/generated/** linguist-generated=true

lsp-types/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## Unreleased
44

55
- Require aeson 2
6+
- Accept `null` in place of a missing field, a common mistake in spec compliance.
67

78
## 2.1.0.0 -- 2023-11-13
89

lsp-types/generated/Language/LSP/Protocol/Internal/Types/ApplyWorkspaceEditParams.hs

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lsp-types/generated/Language/LSP/Protocol/Internal/Types/ApplyWorkspaceEditResult.hs

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lsp-types/generated/Language/LSP/Protocol/Internal/Types/BaseSymbolInformation.hs

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lsp-types/generated/Language/LSP/Protocol/Internal/Types/CallHierarchyClientCapabilities.hs

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lsp-types/generated/Language/LSP/Protocol/Internal/Types/CallHierarchyIncomingCallsParams.hs

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lsp-types/generated/Language/LSP/Protocol/Internal/Types/CallHierarchyItem.hs

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lsp-types/generated/Language/LSP/Protocol/Internal/Types/CallHierarchyOptions.hs

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)