Skip to content
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

Merged
merged 2 commits into from
Jul 27, 2020

Conversation

lukel97
Copy link
Collaborator

@lukel97 lukel97 commented Jul 27, 2020

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

@lukel97 lukel97 requested a review from alanz July 27, 2020 13:03
Copy link
Collaborator

@alanz alanz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Collaborator

@fendor fendor left a 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
@lukel97 lukel97 force-pushed the accept-legacy-config-section-name branch 3 times, most recently from 4d0b201 to 405bbc0 Compare July 27, 2020 22:25
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
@lukel97 lukel97 force-pushed the accept-legacy-config-section-name branch from 405bbc0 to 95560b1 Compare July 27, 2020 22:37
@lukel97
Copy link
Collaborator Author

lukel97 commented Jul 27, 2020

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.

Output from setting up the cradle Cradle {cradleRootDir = "/root/build", cradleOptsProg = CradleAction: Stack}
> Unable to get a write lock on the Pantry database, waiting...
> Acquired the Pantry database write lock

The tests are passing locally anyway and this is a pretty important fix, so merging anyway

@lukel97 lukel97 merged commit 0aae68b into haskell:master Jul 27, 2020
@lukel97 lukel97 mentioned this pull request Jul 29, 2020
@rybern rybern mentioned this pull request Jul 30, 2020
pepeiborra pushed a commit that referenced this pull request Dec 27, 2020
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).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants