-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update to depend on lsp-2.4.0.0
#1762
Conversation
Towards #1350. This is a giant pain in the butt. Lots of names, function signatures, etc. changed and there doesn't seem to be any documentation/migration guide explaining how to update.
No idea if it actually works, probably not
Co-authored-by: Restyled.io <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for slogging through this.
Approving but I won't have time to try it out for a while.
@kostmo No worries, thanks! Everything I've tried seems to work, so I'll merge and of course we can open an issue if you discover any regressions later. |
Have to merge manually since the mergify configuration changed. |
Update to use the
lsp-2.4
API. Closes #1350.Initially I hoped that any
lsp-2.x
would work. However, theSeverDefinition
record changed in2.2
so I initially set that as a lower bound. But then it turns out that2.4
changed which module it is importingRope
from; since we work with ropes in theHover
module it matters since we have to import the matching module. Updating to the newRope
type also required some changes as the API provided by the newRope.Mixed
module is a bit different than the old module, so we would not even be able to easily put in CPP to conditionally depend on the right rope module depending on thelsp
version. Finally, this means dropping support for GHC 9.0 sincelsp-2.4
does not support it.Along the way I also fixed a minor issue related to showing type information returned by the LSP server, so that it uses
prettyTypeLine
to display the type on a single line (in my editor, when the type does not use a single line it gets cut off). For comparison see also #1610.This refactoring was a big pain because a lot of things (names of types and constructors, locations of exports, etc...) changed from 1.x to 2.x, but there was not much in the way of documenting what had changed. =( I am pretty sure that all functionality has been preserved but I would appreciate independent confirmation.
This is also a prerequisite for updating other dependencies such as the
base
version (I will open a follow-up PR soon) since the oldlsp-1.x
versions do not allow many newer versions of various dependencies.