Closed michaelpj closed 1 year ago
@thomasjm @drsooch might be of interest
@sjakobi I think you're the main maintainer of the dhall language server, which is one of the main non-HLS users of this package that I know of. I'd really appreciate your thoughts!
Guide for reviewers:
Metamodel
hierarchy, including the types for reading the metamodel and the code generation itself, which is the most gnarly part
-ddump-splices
on the Generated
module.Language.LSP.Types
hierarchy is just a cut down version of what was there before due to much of it being generated
Message
to handle some typed/untyped versions of things@sjakobi I think you're the main maintainer of the dhall language server, which is one of the main non-HLS users of this package that I know of. I'd really appreciate your thoughts!
Unfortunately, I'm not very familiar with the dhall-lsp-server
internals at all – I've mostly been bumping bounds. Maybe @Gabriella439 has thoughts on this change.
My take is that you should just do whatever you need to do. We'll figure out a way to adapt downstream
I honestly, don't think there is much to change. The TH generation seems sensible, I don't think there's much to change honestly. Codegen is pretty much straightforward, no matter what language you are using. I made some general code nit picks that honestly you can just ignore. There were one or two actual suggestions that I think are worth it. Otherwise lgtm.
Also not sure why the operator-like constructors appear like this on my Haddock. It seems to just be for Record Fields
Any update here? I'm going to address some lsp-test parts, some new features from 3.16 spec attracted me.
I have a partially-rewritten version that generates Haskell source instead. I wasn't able to get this version to work with GHC 9, and the thought of trying to make it work with multiple GHC versions made me scared. So I decided to switch to generating source. I need to finish it, basically...
Closing in favour of https://github.com/haskell/lsp/pull/478
This generates all the LSP types from the LSP metamodel, a new machine-readable format they have produced.
This requires a pretty formidable amount of TH, but in return we get a hopefully much better maintenance process, and we won't always be behind or wrong as we have been. There are also some nice touches, like on GHC >9.2 we can now actually attach doucmentation to things we generate with TH, so we can transfer all the documentation from the metamodel to Haddock.
This is going to result in a lot of churn, enough so that I think it should be a new top-major version of
lsp-types
. In particular:A |? Null
rather thanMaybe A
than there used to be.Method
/SMethod
.This still needs a bunch of work:
lsp-test
tests are broken for some reasonCodeGen
Plus a bunch of other TODOs in the code. Any help would be welcome, but here are the top things I'm interested in feedback on: