haskell / lsp

Haskell library for the Microsoft Language Server Protocol
364 stars 91 forks source link

Reject messages that come in after 'shutdown' #564

Closed michaelpj closed 5 months ago

michaelpj commented 5 months ago

This is mandated by the spec so we can do it. We also expose the shutdown barrier, which I think can be convenient. For more sophisticated usecases people should just install a proper shutdown handler.

I tried to write some tests for this, but I gave up because it requires some singificant surgery on lsp-test, which stops recording messages when it receives shutdown :( I did test it quite a lot in the process of trying to make lsp-test work, though :upside_down_face: