Skip to content
This repository has been archived by the owner on Oct 7, 2020. It is now read-only.

HLint and neovim errors #390

Closed
nponeccop opened this issue Dec 6, 2017 · 8 comments
Closed

HLint and neovim errors #390

nponeccop opened this issue Dec 6, 2017 · 8 comments

Comments

@nponeccop
Copy link
Contributor

No description provided.

@nponeccop
Copy link
Contributor Author

nponeccop commented Dec 6, 2017

@unode wrote:

I have a similar output with neovim:

haskell-lsp:Starting up server ...
2017-12-03 23:28:10.631805731 [ThreadId 11] - ---> {"jsonrpc":"2.0","id":0,"method":"initialize","params":{"initializationOptions":null,"processId":26881,"rootUri":"file:///home/ralves/projects/PERSONAL/mdo","trace":"off","rootPath":"/home/ralves/projects/PERSONAL/mdo","capabilities":{"workspace":{"applyEdit":true},"textDocument":{"completion":{"completionItem":{"snippetSupport":true}}}}}}
2017-12-03 23:28:10.63207521 [ThreadId 11] - haskell-lsp:initializeRequestHandler: setting current dir to project root:/home/ralves/projects/PERSONAL/mdo
2017-12-03 23:28:10.652009095 [ThreadId 12] - <--2--{"result":{"capabilities":{"textDocumentSync":{"openClose":true,"change":2,"willSave":false,"willSaveWaitUntil":false,"save":{"includeText":false}},"hoverProvider":true,"completionProvider":{"resolveProvider":true,"triggerCharacters":["."]},"definitionProvider":true,"referencesProvider":true,"documentHighlightProvider":true,"documentSymbolProvider":true,"codeActionProvider":true,"documentFormattingProvider":true,"documentRangeFormattingProvider":true,"renameProvider":true,"executeCommandProvider":{"commands":["applyrefact:applyOne","hare:demote"]}}},"jsonrpc":"2.0","id":0}
2017-12-03 23:28:10.653922498 [ThreadId 11] - ---> {"jsonrpc":"2.0","method":"workspace/didChangeConfiguration","params":{"settings":{}}}
2017-12-03 23:28:10.654131091 [ThreadId 15] - reactor:didChangeConfiguration notification:NotificationMessage {_jsonrpc = "2.0", _method = WorkspaceDidChangeConfiguration, _params = DidChangeConfigurationParams {_settings = Object (fromList [])}}
2017-12-03 23:28:10.654192277 [ThreadId 12] - <--2--{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":1,"message":"haskell-lsp:didChangeConfiguration error. NotificationMessage {_jsonrpc = \"2.0\", _method = WorkspaceDidChangeConfiguration, _params = DidChangeConfigurationParams {_settings = Object (fromList [])}} \"key \\\"languageServerHaskell\\\" not present\""}}
2017-12-03 23:28:10.654216426 [ThreadId 15] - reactor:didChangeConfiguration diagsOn:True
2017-12-03 23:28:10.661275569 [ThreadId 11] - ---> {"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"version":1,"uri":"file:///home/ralves/projects/PERSONAL/mdo/app/Main.hs","languageId":"haskell","text":"module Main where\n\nimport qualified Data.Text.IO as T\nimport Lib\n\nmain :: IO ()\nmain = do\n    let path = \"test/data/input.mdo\"\n    sample <- T.readFile path\n    print $ parseMarkdown sample\n"}}}
2017-12-03 23:28:10.661444378 [ThreadId 15] - ****** reactor: processing NotDidOpenTextDocument
2017-12-03 23:28:10.682954531 [ThreadId 14] - dispatcherP: top of loop
2017-12-03 23:28:10.683037408 [ThreadId 14] - got request with id: Nothing
2017-12-03 23:28:10.713295897 [ThreadId 14] - dispatcherP: top of loop
2017-12-03 23:28:10.713382303 [ThreadId 14] - got request with id: Nothing
2017-12-03 23:28:10.713423055 [ThreadId 14] - Processing request as version matches
2017-12-03 23:28:13.391913306 [ThreadId 11] - ---> {"jsonrpc":"2.0","id":1,"method":"textDocument/hover","params":{"position":{"line":9,"character":12},"textDocument":{"uri":"file:///home/ralves/projects/PERSONAL/mdo/app/Main.hs"}}}
2017-12-03 23:28:18.649855943 [ThreadId 11] - ---> {"jsonrpc":"2.0","id":2,"method":"textDocument/hover","params":{"position":{"line":9,"character":12},"textDocument":{"uri":"file:///home/ralves/projects/PERSONAL/mdo/app/Main.hs"}}}
2017-12-03 23:28:23.79664855 [ThreadId 11] - 
haskell-lsp:Got EOF, exiting 1 ...

Above was with Version 0.1.0.0, Git revision 19d5494f519934c0208d6816fcee7545e6aef443 (1092 commits) x86_64 from alanz@19d5494

Using current master has the same result.


@unode wrote:

Removed all log files, restarted neovim and this is what I get:

# LanguageClient.log

11:33:51 WARNING [MainThread] Unknown parameter key: rootPath
11:33:51 WARNING [MainThread] Unknown parameter key: settingsPath
11:33:51 WARNING [MainThread] register completion manager source failed. Error: NvimError(b'Error calling function.',)
# LanguageServer.log

hie: user error (Failed to find requested hint files:
  /home/unode/system/bin/data/hlint.yaml
)

/home/unode/system/bin is where hie's binary is located. No clue why it would be looking for hlint configuration there.

# hie.log (hie started with -l /tmp/hie.log

2017-12-05 11:33:51.579909239 [ThreadId 11] - Setting home directory:/home/unode
2017-12-05 11:33:51.580081626 [ThreadId 11] - run entered for HIE Version 0.1.0.0, Git revision 34900cc444bb0a7f512ac92e9aaf9cb52ff37899 (1090 commits) x86_64
2017-12-05 11:33:51.580162899 [ThreadId 11] - Current directory:/home/unode
2017-12-05 11:33:51.580217049 [ThreadId 11] - 




haskell-lsp:Starting up server ...
2017-12-05 11:33:51.580525296 [ThreadId 11] - ---> {"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":9804,"trace":"off","initializationOptions":null,"rootPath":"/home/unode/projects/PERSONAL/mdo","rootUri":"file:///home/unode/projects/PERSONAL/mdo","capabilities":{"textDocument":{"completion":{"completionItem":{"snippetSupport":true}}},"workspace":{"applyEdit":true}}}}
2017-12-05 11:33:51.580757874 [ThreadId 11] - haskell-lsp:initializeRequestHandler: setting current dir to project root:/home/unode/projects/PERSONAL/mdo
2017-12-05 11:33:51.600756134 [ThreadId 12] - <--2--{"result":{"capabilities":{"textDocumentSync":{"openClose":true,"change":2,"willSave":false,"willSaveWaitUntil":false,"save":{"includeText":false}},"hoverProvider":true,"completionProvider":{"resolveProvider":true,"triggerCharacters":["."]},"definitionProvider":true,"referencesProvider":true,"documentHighlightProvider":true,"documentSymbolProvider":true,"codeActionProvider":true,"documentFormattingProvider":true,"documentRangeFormattingProvider":true,"renameProvider":true,"executeCommandProvider":{"commands":["applyrefact:applyOne","hare:demote"]}}},"jsonrpc":"2.0","id":0}
2017-12-05 11:33:51.602974501 [ThreadId 11] - ---> {"jsonrpc":"2.0","method":"workspace/didChangeConfiguration","params":{"settings":{}}}
2017-12-05 11:33:51.603174737 [ThreadId 15] - reactor:didChangeConfiguration notification:NotificationMessage {_jsonrpc = "2.0", _method = WorkspaceDidChangeConfiguration, _params = DidChangeConfigurationParams {_settings = Object (fromList [])}}
2017-12-05 11:33:51.603210302 [ThreadId 12] - <--2--{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":1,"message":"haskell-lsp:didChangeConfiguration error. NotificationMessage {_jsonrpc = \"2.0\", _method = WorkspaceDidChangeConfiguration, _params = DidChangeConfigurationParams {_settings = Object (fromList [])}} \"key \\\"languageServerHaskell\\\" not present\""}}
2017-12-05 11:33:51.603268992 [ThreadId 15] - reactor:didChangeConfiguration diagsOn:True
2017-12-05 11:33:51.605519488 [ThreadId 11] - ---> {"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"file:///home/unode/projects/PERSONAL/mdo/app/Main.hs","text":"module Main where\n\nimport qualified Data.Text.IO as T\nimport Lib\n\nmain :: IO ()\nmain = do\n    let path = \"test/data/input.mdo\"\n    sample <- T.readFile path\n    print $ parseMarkdown sample\n","languageId":"haskell","version":1}}}
2017-12-05 11:33:51.6057192 [ThreadId 15] - ****** reactor: processing NotDidOpenTextDocument
2017-12-05 11:33:58.828788744 [ThreadId 11] - ---> {"jsonrpc":"2.0","id":1,"method":"textDocument/documentSymbol","params":{"textDocument":{"uri":"file:///home/unode/projects/PERSONAL/mdo/app/Main.hs"}}}
2017-12-05 11:33:58.828957108 [ThreadId 15] - reactor:got Document symbol request:RequestMessage {_jsonrpc = "2.0", _id = IdInt 1, _method = TextDocumentDocumentSymbol, _params = DocumentSymbolParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///home/unode/projects/PERSONAL/mdo/app/Main.hs"}}}}
2017-12-05 11:34:00.072089232 [ThreadId 11] - ---> {"jsonrpc":"2.0","id":2,"method":"textDocument/hover","params":{"textDocument":{"uri":"file:///home/unode/projects/PERSONAL/mdo/app/Main.hs"},"position":{"line":9,"character":12}}}
2017-12-05 11:34:00.072273401 [ThreadId 15] - reactor:got HoverRequest:RequestMessage {_jsonrpc = "2.0", _id = IdInt 2, _method = TextDocumentHover, _params = TextDocumentPositionParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///home/unode/projects/PERSONAL/mdo/app/Main.hs"}}, _position = Position {_line = 9, _character = 12}}}
2017-12-05 11:34:00.072371419 [ThreadId 15] - reactor:HoverRequest done
2017-12-05 11:34:00.072433696 [ThreadId 12] - <--2--{"result":{"contents":[]},"jsonrpc":"2.0","id":2}
2017-12-05 11:34:02.02046922 [ThreadId 11] - ---> {"jsonrpc":"2.0","id":3,"method":"textDocument/hover","params":{"textDocument":{"uri":"file:///home/unode/projects/PERSONAL/mdo/app/Main.hs"},"position":{"line":9,"character":12}}}
2017-12-05 11:34:02.020664491 [ThreadId 15] - reactor:got HoverRequest:RequestMessage {_jsonrpc = "2.0", _id = IdInt 3, _method = TextDocumentHover, _params = TextDocumentPositionParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///home/unode/projects/PERSONAL/mdo/app/Main.hs"}}, _position = Position {_line = 9, _character = 12}}}
2017-12-05 11:34:02.020760422 [ThreadId 15] - reactor:HoverRequest done
2017-12-05 11:34:02.020819814 [ThreadId 12] - <--2--{"result":{"contents":[]},"jsonrpc":"2.0","id":3}
2017-12-05 11:34:08.538997335 [ThreadId 11] - ---> {"jsonrpc":"2.0","id":4,"method":"textDocument/hover","params":{"textDocument":{"uri":"file:///home/unode/projects/PERSONAL/mdo/app/Main.hs"},"position":{"line":9,"character":12}}}
2017-12-05 11:34:08.539194881 [ThreadId 15] - reactor:got HoverRequest:RequestMessage {_jsonrpc = "2.0", _id = IdInt 4, _method = TextDocumentHover, _params = TextDocumentPositionParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///home/unode/projects/PERSONAL/mdo/app/Main.hs"}}, _position = Position {_line = 9, _character = 12}}}
2017-12-05 11:34:08.539283108 [ThreadId 15] - reactor:HoverRequest done
2017-12-05 11:34:08.539340039 [ThreadId 12] - <--2--{"result":{"contents":[]},"jsonrpc":"2.0","id":4}
2017-12-05 11:34:11.158553092 [ThreadId 11] - ---> {"jsonrpc":"2.0","id":5,"method":"textDocument/documentSymbol","params":{"textDocument":{"uri":"file:///home/unode/projects/PERSONAL/mdo/app/Main.hs"}}}
2017-12-05 11:34:11.158741791 [ThreadId 15] - reactor:got Document symbol request:RequestMessage {_jsonrpc = "2.0", _id = IdInt 5, _method = TextDocumentDocumentSymbol, _params = DocumentSymbolParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///home/unode/projects/PERSONAL/mdo/app/Main.hs"}}}}
2017-12-05 11:34:13.385815522 [ThreadId 11] - ---> {"jsonrpc":"2.0","id":6,"method":"textDocument/hover","params":{"textDocument":{"uri":"file:///home/unode/projects/PERSONAL/mdo/app/Main.hs"},"position":{"line":9,"character":12}}}
2017-12-05 11:34:13.385995091 [ThreadId 15] - reactor:got HoverRequest:RequestMessage {_jsonrpc = "2.0", _id = IdInt 6, _method = TextDocumentHover, _params = TextDocumentPositionParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///home/unode/projects/PERSONAL/mdo/app/Main.hs"}}, _position = Position {_line = 9, _character = 12}}}
2017-12-05 11:34:13.386093024 [ThreadId 15] - reactor:HoverRequest done
2017-12-05 11:34:13.386130451 [ThreadId 12] - <--2--{"result":{"contents":[]},"jsonrpc":"2.0","id":6}
2017-12-05 11:34:28.832721923 [ThreadId 14] - dispatcherP: top of loop
2017-12-05 11:34:28.832824336 [ThreadId 14] - got request with id: Nothing
2017-12-05 11:34:29.749025289 [ThreadId 14] - dispatcherP: top of loop
2017-12-05 11:34:29.749137125 [ThreadId 14] - got request with id: Nothing
2017-12-05 11:34:29.749405924 [ThreadId 14] - Processing request as version matches
2017-12-05 11:34:36.73431197 [ThreadId 11] - ---> {"jsonrpc":"2.0","id":7,"method":"textDocument/hover","params":{"textDocument":{"uri":"file:///home/unode/projects/PERSONAL/mdo/app/Main.hs"},"position":{"line":9,"character":12}}}
2017-12-05 11:34:38.924529921 [ThreadId 11] - ---> {"jsonrpc":"2.0","id":8,"method":"textDocument/hover","params":{"textDocument":{"uri":"file:///home/unode/projects/PERSONAL/mdo/app/Main.hs"},"position":{"line":9,"character":12}}}
2017-12-05 11:35:07.523791321 [ThreadId 11] - ---> {"jsonrpc":"2.0","id":9,"method":"textDocument/hover","params":{"textDocument":{"uri":"file:///home/unode/projects/PERSONAL/mdo/app/Main.hs"},"position":{"line":9,"character":12}}}
2017-12-05 11:35:12.044216457 [ThreadId 11] - 
haskell-lsp:Got EOF, exiting 1 ...


@nponeccop
Copy link
Contributor Author

nponeccop commented Dec 19, 2017

@unode The languageClient.log messages are all harmless:

  • The first two indicate that hie sends non-standard keys in json data (it does so because vscode does)
  • The last one just indicates that vim completion manager (which is optional) is not installed. The check is done in LanguageServer by catching an exception, so the message is ugly.

The hlint message in LanguageServer.log is a duplicate of #400 . As a temporary workaround don't delete hie's .stack-work dir once it is built (or delete all but the 2 files mentioned in the linked issue)

Please check that the latest hie works with this workaround applied. Note that you need a --stack-yaml option for ghc-8.0.2 now as the default is for 8.2.2. If hie works we'll close this issue as a duplicate.

@unode
Copy link

unode commented Jan 14, 2018

I can't reproduce this anymore with the instructions provided. But I'm having other issues.

Since both haskell-ide-engine and LanguageClient.neovim are moving quite fast these days, I'll wait for an official release for further tests.

Thanks for the support!

@marmistrz
Copy link

marmistrz commented Mar 22, 2018

I have just encountered a similar problem:

2018-03-22 19:16:06.459937798 [ThreadId 4] - Setting home directory:/home/marcin
2018-03-22 19:16:06.474877885 [ThreadId 4] - run entered for HIE Version 0.1.0.0, Git revision dd262b8283b3584d9d106bc842eae894826495ca (1205 commits) x86_64 ghc-8.2.2
2018-03-22 19:16:06.478484921 [ThreadId 4] - Current directory:/home/marcin
hie: user error (Failed to find requested hint files:
  /usr/bin/data/hlint.yaml
)
Using hoogle db at: /home/marcin/.hoogle/default-haskell-5.0.16.hoo

HIE worked today in the morning. Arch Linux, ghc 8.2.2

@nponeccop
Copy link
Contributor Author

@marmistrz This is actually #400. Basically, don't delete hlint.yaml from the HIE build dir

@marmistrz
Copy link

marmistrz commented Mar 26, 2018

I've just deleted ~/.stack and HIE got broken. So it's not only the thing of not deleting the build root.

@alanz
Copy link
Collaborator

alanz commented Dec 24, 2018

Is this still a problem?

@alanz alanz added this to the Some time milestone Dec 24, 2018
@unode
Copy link

unode commented Dec 29, 2018

I haven't used nvim with hie in a while. Feel free to close.

@alanz alanz closed this as completed Dec 29, 2018
@alanz alanz modified the milestones: Some time, 2018-12 Dec 29, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants