Open blast-hardcheese opened 5 years ago
I wonder if this is actually an sbt issue, emitting
{"jsonrpc":"2.0","id":1,"result":{"status":"Done","channelName":"network-4","execId":1,"commandQueue":["test","shell"],"exitCode":0}}
too soon, as there's no followup Done
after the commands are executed
Yes, it looks like sbt is returning the responses in a strange order. It returns the "result" response before the log messages.
While that's totally fine in terms of LSP, sbt-client doesn't like it. sbt-client needs some way to decide that it's finished communicating with sbt and it's time to exit the process. It uses the "result" response for this, with the implicit assumption that this is the final message it will receive.
I'm not really sure what to do about this. sbt-client can't hang around forever on the off chance sbt might want to send it some more messages.
Might be worth opening an sbt issue? This behaviour does seem strange to me.
1) Set up environment:
2) Launch sbt
3) Confirm that
test
in the primary sbt shell results in an error:4) sbt-client to run
test
, confirming the expected output:5) Now, use the same sbt client to run the
foo
alias, notice that the output is lost to the aether:6) To confirm this isn't a bug in sbt, use socat as a raw jsonrpc client: