www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.ide - serve-d.exe bug

reply Loire <hgfks jdsf.com> writes:
serve-d_0.7.6-windows-x86_64

A successful shutdown request/response and then a request
```JS
{"jsonrpc":"2.0","id":6,"method":"exit"}
```
gave a response
```JS
{"error":{"code":-32601,"data":null,"message":"Request method 
exit not found"},"id":6,"jsonrpc":"2.0"}
```
https://microsoft.github.io/language-server-protocol/specifications/specification-3-14/#exit
Mar 13
next sibling parent Observer <anonymous observer.com> writes:
On Wednesday, 13 March 2024 at 21:48:02 UTC, Loire wrote:
 {"error":{"code":-32601,"data":null,"message":"Request method 
 exit not found"},"id":6,"jsonrpc":"2.0"}
This appears to have been fixed in the latest beta version as that version does correctly respond to an exit request.
Mar 15
prev sibling parent WebFreak001 <d.forum webfreak.org> writes:
On Wednesday, 13 March 2024 at 21:48:02 UTC, Loire wrote:
 serve-d_0.7.6-windows-x86_64

 A successful shutdown request/response and then a request
 ```JS
 {"jsonrpc":"2.0","id":6,"method":"exit"}
 ```
 gave a response
 ```JS
 {"error":{"code":-32601,"data":null,"message":"Request method 
 exit not found"},"id":6,"jsonrpc":"2.0"}
 ```
 https://microsoft.github.io/language-server-protocol/specifications/specification-3-14/#exit
you specified an `"id"`, which makes this a request and not a notification (thus the "Request method not found" error), which would require a response. Remove the `"id"` to make it a notification like the spec says, then serve-d will handle it properly. Also you are looking at an old spec version there - it's easy to miss updates on it if you e.g. bookmark the pages, so a friendly reminder to check that you are implementing the right spec version right now.
Mar 21