-
-
Notifications
You must be signed in to change notification settings - Fork 389
Help debugging HLS! #237
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
Comments
Hi, can you paste the full log from the output window? It could be that the session didn't get set up correctly which doesn't always produce obvious errors. You can also get some more debugging information if you can find the path to the haskell-language-server binary, which should be in the output window somewhere, and running that in the terminal in the root directory of your project with no arguments |
Hi bubba, here's the log:
Interestingly, by running manually hls wrapper without arguments I get:
Looks like the error is: ** How can this be possible? I have just compiled the tool with |
Yes, if you are using GHC 8.8.2, you should build hls-8.8.2 to use HLS with the compiler. |
My fault! Issue resolved. Thanks |
With that said, should we maybe get rid of the |
I think another thing that could be really helpful would be having such an error reported in vscode (output). |
* Cleaner Show instance for SpanInfo This helped with debugging #237, so maybe it's worth keeping. * Stylistic fixes
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).
Hi there,
I'm experiencing weird problems while running hls on a library I'm working on. From vscode I'm not able to see any special problem. I've checked the output, everything seems to be right, but then nothing happens. Mouse over doesn't work, even though from the log I can't see errors:
2020-07-26 09:54:40.164255 [ThreadId 276] - Hover request at position 42:9 in file: /Users/admin/GitLab/vegoia-tree-lib/src/Vegoia/DecisionTree/Model.hs
2020-07-26 09:54:40.365894 [ThreadId 279] - GhcIde.hover entered (ideLogger)
What's the correct way to run HLS with --debug option? Didn't find any help from the documentation. Do I need to run a special wrapper, or is there a way from vscode to run hls in debug+verbose mode?
I forgot to mention that the haskell-ide-engine tool does work instead.
Thanks,
N.
The text was updated successfully, but these errors were encountered: