meraymond2/idris-ide-client

Idris2 :version unrecognised

Closed this issue · 2 comments

I'd expect this to have a message to the effect that it's unimplemented, but it's entirely unrecognised.

(:return (:error "Unrecognised command: ((:version) 18)") 17)

This crashes the reply parser since it doesn't expected :version to be able to error. That's fixable, but I want to make sure that :version is going to be implemented in v2, since it's the only command so far that isn't even recognised.

I've raised an issue describing the breaking change. My workaround for this in the vscode extension is simply not to call the function in the ide-client when it knows it's Idris 2, but it would be nice to handle that here too.

I'll leave this one open for now. I think it would be simple enough to save the protocol version to the client state when that first message comes in, and then check that before trying to send a version request. I'm not sure that I want to do that though, it doesn't really make sense for the client to let the user call that method if its a noop.

I misunderstood the problem here. The version command is implemented, but they've changed the serialisation format for commands that don't take arguments, for Idris 2. I've added a workaround in the generate definition PR (#31) because some of the new commands use a similar format.

I will update the breaking-change issue, because it is still a breaking change, just in a different manner.