Allow `null` for optional values.
See original GitHub issueI have implemented hierarchical outlining in my language server and vscode calls it on ctrl-shift-o, but it is never displaying it, only “No symbols found”. Log:
2018-08-26T15:23:40.449:app.d:processRequest:77 Calling provideDocumentSymbols
[Trace - 3:23:40 PM] Received response 'textDocument/documentSymbol - (24)' in 17ms.
Result: [
{
"children": [],
"deprecated": false,
"detail": null,
"kind": 12,
"name": "main",
"range": {
"end": {
"character": 0,
"line": 19
},
"start": {
"character": 0,
"line": 9
}
},
"selectionRange": {
"end": {
"character": 0,
"line": 9
},
"start": {
"character": 0,
"line": 9
}
}
}
]
The outline panel is also not showing anything.
Version: "vscode-languageclient": "^5.0.1"
(tsc complained about some issues in vscode failing to compile but I think this should be unaffected?), edit: fixed these by updating vscode engine to 1.26.0
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (6 by maintainers)
Top Results From Across the Web
Optional for definitely null values in Java 8 - Stack Overflow
Optional for definitely null values in Java 8 [duplicate] ; 1. Use ofNullable , of does not allow the value to be null....
Read more >10. Handling nulls with Optional - Java 8 tutorial!
You can create an optional object from a nullable value using the static factoy method Optional.ofNullable . The advantage over using this method...
Read more >Handling null: optional and nullable types - A Java geek
The reason for the NPE is calling a method or accessing an attribute of an object that has not been initialized. var value...
Read more >Java: Why not allow nulls in methods to represent optional ...
In general it is a bad idea to use null to indicate an optional value. It is a bad idea whether it is...
Read more >[Feature Request] Allow Nulls for Optional Fields #266 - GitHub
Optional fields would accept null values. Actual Behavior. The error noted above. Metadata. Typsense Version: 0.19.0. OS: MacOS 11.2.3.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Makes sense to me to also allow ‘null’
my server is implemented in D, where empty strings and arrays are equal to a null slice (0 length, null ptr), which is serialized by the json serializer I use by default to
null
. I have now added a custom serialization policy for the structs in question but I think it would be nice if the parser would be a bit more leniant on allowing null on values, especially because when using fixed data types in some languages it might not really be possible to define policies like ignoring unchanged values without a lot of hassle.