Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Fix #3787 __Issue:__ Completion items were coming with `null` value in the JSON, for example: ``` { ... 'c': null, ... } ``` (Note that the completion item JSON format uses a condensed field name to minimize data over the wire, see: https://github.com/onivim/vscode-exthost/blob/fc0cb0ba738b856da6ab36d0efe0aa3446959a98/src/vs/workbench/api/common/extHost.protocol.ts#L1383) This was causing parsing to fail. __Defect:__ Our parser was expecting the `detail` field (along with others) to either be present as a string or not present at all. The parser wasn't resilient in the case where the field was there, but `null`. __Fix:__ Instead of using `field.optional`, use `field.withDefault` along with a `None` default value. __Future work:__ Potentially `field.optional` should just work like this out-of-the-box... __Todo:__ - [x] Changes entry
- Loading branch information