haskell / lsp

Haskell library for the Microsoft Language Server Protocol
360 stars 89 forks source link

Remove pointless IO from VFS #523

Closed michaelpj closed 9 months ago

michaelpj commented 9 months ago

Setting up the VFS required IO just so it could capture a reference to a temporary directory that could be used if we wanted to write files out. This is weird and non-compositional: we can just ask the caller where they want the files, and they can make the temporary directory if they want.

neduard commented 3 weeks ago

Nice cleanup! Though consider in the future being a bit more careful with functions that are exposed in the API:

In any case, no worries - glad git bisect worked!

michaelpj commented 2 weeks ago

Hi, that's fair. I should mark this more explicitly but: the lsp packages are definitely still in an "unstable" phase of development. I have quite a lot of work that I still want to do on them, which probably means a lot more major version bumps. I realise that's not ideal, sorry.

neduard commented 2 weeks ago

No worries at all! I think as long as people can easily find when there's breaking changes they can always set pin their version and update whenever they wish. Here I think it was a bit difficult to find why compilation broke (though I'm also Haskell beginner so maybe for others it would've been more intuitive)