Pure-D / serve-d

D LSP server (dlang language server protocol server)
MIT License
208 stars 49 forks source link

Changing dub config/build/arch type no longer possible #166

Closed WebFreak001 closed 2 years ago

WebFreak001 commented 2 years ago

Seems like there is some issue in the LSP router, it's seeing my input value like "debug" as a string array ["debug"] and trying to convert that to a string. Need to investigate what's going on here and add a test

WebFreak001 commented 2 years ago

turns out parameters according to JSON RPC spec may only be sent as object (parameters by name) or array (parameters by position) - so something in the vscode RPC adapter probably changed to fix this with just a string as input.

So in serve-d non-object/array params should be treated as arrays (note: this is against spec, saying they MUST be array or object, so an error should be raised, but for compatibility I'm going to allow it and treat it as a single value) and the router should handle this case.

serve-d will disallow invalid arguments and instead report an error