-
-
Notifications
You must be signed in to change notification settings - Fork 367
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
Accept the legacy "languageServerHaskell" config name #243
Accept the legacy "languageServerHaskell" config name #243
Conversation
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.
LGTM
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.
LGTM
This also requires a bump to lsp-test to fix a test, and drops the trick that the wrapper tests used to find the wrapper executable since it was just confusing
4d0b201
to
405bbc0
Compare
Need to read in those test results as a file, since the CPP preprocessor trips on those multiline strings Also use @?= instead of `shouldBe`, since the exception thrown by it gets caught by tasty and is pretty printed
405bbc0
to
95560b1
Compare
I have a feeling the CircleCI tests are failing because of some .stack-work/cache issue, which I can't seem to invalidate the cache for anyway.
The tests are passing locally anyway and this is a pretty important fix, so merging anyway |
The bug was caused by broken transitivity of the comparison function used to sort spans. Nested spans were meant to be sorted in innermost-first order, with the first (innermost) one being used to get type information about the symbol at a given position. Because the comparison function considered any two non-nested spans to be EQ, the sort could incorrectly conclude (by transitivity) that two nested spans were equal, and thus leave them in incorrect relative order. This resulted in the innermost span sometimes not appearing at the front of the list of spans which enclose a given point, and hover reporting the type of a bigger expression in which the point appeared. The solution imposes ordering on non-nested spans by comparing their starting positions, thus fixing transitivity. Fixes #237 (... probably along with a bunch of other little bugs caused by the same mistake).
This also requires a bump to lsp-test to fix a test, and drops the
trick that the wrapper tests used to find the wrapper executable since
it was just confusing