Skip to content

textDocument/definition not working #2654

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

Closed
dewijones92 opened this issue Jan 29, 2022 · 26 comments
Closed

textDocument/definition not working #2654

dewijones92 opened this issue Jan 29, 2022 · 26 comments
Labels
build tool: stack CI Continuous integration type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc.. type: support User support tickets, questions, help with setup etc.

Comments

@dewijones92
Copy link

dewijones92 commented Jan 29, 2022

Your environment

Which OS do you use:
POP OS

haskell LSP server version
ce41b6459af131c845f942bd39e356f02b6306fa master, tag: 1.6.0.0

Which LSP client (editor/plugin) do you use:
emacs

Describe your project (alternative: link to the project):
stack.yaml

Steps to reproduce

Hover over noto on line 16 and try to go to it's definition
In this file https://github.com/dewijones92/helloworld/blob/master/app/Main.hs

Expected behaviour

Cursour should go to line 9 where noto is defined

Actual behaviour

nothing - the lsp server does not return the function definition location

Include debug information

[Trace - 10:51:17 PM] Sending request 'textDocument/definition - (200)'.                                                                                                                                                               
Params: {                                                                                                                                                                                                                              
  "textDocument": {                                                                                                                                                                                                                    
    "uri": "file:///home/dewi/tmp/haskellTut/helloworld/Setup.hs"                                                                                                                                                                      
  },                                                                                                                                                                                                                                   
  "position": {                                                                                                                                                                                                                        
    "line": 15,                                                                                                                                                                                                                        
    "character": 13                                                                                                                                                                                                                    
  }                                                                                                                                                                                                                                    
}                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                       
                                                                                                                                                                                                                                       
[Trace - 10:51:17 PM] Received response 'textDocument/definition - (200)' in 1ms.                                                                                                                                                      
Result: []   
@dewijones92 dewijones92 added status: needs triage type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc.. labels Jan 29, 2022
@dewijones92
Copy link
Author

not sure if I am missing something?

@drsooch
Copy link
Collaborator

drsooch commented Jan 29, 2022

Go to definition appears to be working fine for me. Can you produce a minimal reproduction i.e. an actual file to test on?

@dewijones92
Copy link
Author

@drsooch
I updated the post
thanks

@drsooch
Copy link
Collaborator

drsooch commented Jan 29, 2022

[Trace - 11:04:29 AM] Sending request 'textDocument/definition - (54)'.
Params: {
  "textDocument": {
    "uri": "file:///home/user/code/haskell/helloworld/app/Main.hs"
  },
  "position": {
    "line": 12,
    "character": 11
  }
}


[Trace - 11:04:29 AM] Received response 'textDocument/definition - (54)' in 1ms.
Result: [
  {
    "range": {
      "end": {
        "character": 4,
        "line": 6
      },
      "start": {
        "character": 0,
        "line": 6
      }
    },
    "uri": "file:///home/user/code/haskell/helloworld/app/Main.hs"
  }
]

Seems to work for me.

@drsooch
Copy link
Collaborator

drsooch commented Jan 29, 2022

Could have something to do with using Setup.hs as your file but someone else more knowledgeable than I may have a better clue.

@dewijones92
Copy link
Author

@drsooch
I have just tried in Main.hs

https://github.com/dewijones92/helloworld/blob/master/app/Main.hs

FYI it compiles and runs fine

dewi@pop-os:~/tmp/haskellTut/helloworld$ stack build && stack exec helloworld-exe
Example of Haskell Function composition
"This is an ODD number"
"This is an even Number"
dewi@pop-os:~/tmp/haskellTut/helloworld$

But the go to definition does not work


[Trace - 04:26:59 PM] Sending request 'textDocument/definition - (242)'.                                                                                                                                                               
Params: {                                                                                                                                                                                                                              
  "textDocument": {                                                                                                                                                                                                                    
    "uri": "file:///home/dewi/tmp/haskellTut/helloworld/app/Main.hs"                                                                                                                                                                   
  },                                                                                                                                                                                                                                   
  "position": {                                                                                                                                                                                                                        
    "line": 13,                                                                                                                                                                                                                        
    "character": 13                                                                                                                                                                                                                    
  }                                                                                                                                                                                                                                    
}                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                       
                                                                                                                                                                                                                                       
[Trace - 04:26:59 PM] Received response 'textDocument/definition - (242)' in 1ms.                                                                                                                                                      
Result: []                                                                                                                                                                                                                             
              

@drsooch
Copy link
Collaborator

drsooch commented Jan 29, 2022

Can you check your HLS logs when attempting to goto definition?

@dewijones92
Copy link
Author

#2654 (comment)

@drsooch here?

@drsooch
Copy link
Collaborator

drsooch commented Jan 29, 2022

should be in /tmp/hls.log that's the server trace

@michaelpj
Copy link
Collaborator

Please consult the troubleshooting section in the documentation also.

@dewijones92
Copy link
Author

@drsooch
These logs aren't that insightful 🤔

2022-01-29 18:38:11.281779619 [ThreadId 3449] DEBUG hls:        finish: C:GetHieAst:/home/dewi/tmp/haskellTut/helloworld/app/Main.hs (took 0.00s)
2022-01-29 18:38:11.281786852 [ThreadId 3452] INFO hls: finish: Pragmas.GhcSession (took 0.00s)
2022-01-29 18:38:11.281842936 [ThreadId 3455] INFO hls: finish: Pragmas.GetFileContents (took 0.00s)
2022-01-29 18:38:11.281870477 [ThreadId 3456] INFO hls: finish: Pragmas.GetParsedModule (took 0.00s)
2022-01-29 18:38:46.340739481 [ThreadId 5] INFO hls:    Live bytes: 0.00MB Heap size: 0.00MB
2022-01-29 18:39:46.40190425 [ThreadId 5] INFO hls:     Live bytes: 0.00MB Heap size: 0.00MB
2022-01-29 18:40:46.462753075 [ThreadId 5] INFO hls:    Live bytes: 0.00MB Heap size: 0.00MB
2022-01-29 18:41:46.523554105 [ThreadId 5] INFO hls:    Live bytes: 0.00MB Heap size: 0.00MB
2022-01-29 18:42:46.584590802 [ThreadId 5] INFO hls:    Live bytes: 0.00MB Heap size: 0.00MB
2022-01-29 18:43:46.645613114 [ThreadId 5] INFO hls:    Live bytes: 0.00MB Heap size: 0.00MB










2022-01-29 18:44:46.706363789 [ThreadId 5] INFO hls:    Live bytes: 0.00MB Heap size: 0.00MB
2022-01-29 18:44:48.66398958 [ThreadId 3460] DEBUG hls: Definition request at position 13:17 in file: /home/dewi/tmp/haskellTut/helloworld/app/Main.hs
2022-01-29 18:44:48.664245704 [ThreadId 3461] DEBUG hls:        finish: C:GetHieAst:/home/dewi/tmp/haskellTut/helloworld/app/Main.hs (took 0.00s)
2022-01-29 18:44:49.170494099 [ThreadId 3477] INFO hls: finish: RefineImports (took 0.00s)
2022-01-29 18:44:49.170540946 [ThreadId 3476] INFO hls: finish: importLens (took 0.00s)
2022-01-29 18:44:49.170460367 [ThreadId 3474] INFO hls: finish: GhcideCodeActions.getParsedModule (took 0.00s)
2022-01-29 18:44:49.170576822 [ThreadId 3475] INFO hls: finish: QualifyImportedNames.TypeCheck (took 0.00s)
2022-01-29 18:44:49.17059158 [ThreadId 3478] INFO hls:  finish: Pragmas.GhcSession (took 0.00s)
2022-01-29 18:44:49.17066731 [ThreadId 3479] INFO hls:  finish: Pragmas.GetFileContents (took 0.00s)
2022-01-29 18:44:49.170677078 [ThreadId 3480] INFO hls: finish: Pragmas.GetParsedModule (took 0.00s)
2022-01-29 18:44:49.170772845 [ThreadId 3483] DEBUG hls:        DocumentHighlight request at position 13:17 in file: /home/dewi/tmp/haskellTut/helloworld/app/Main.hs
2022-01-29 18:44:49.171031434 [ThreadId 3485] DEBUG hls:        finish: C:GetHieAst:/home/dewi/tmp/haskellTut/helloworld/app/Main.hs (took 0.00s)

@dewijones92
Copy link
Author

Does anybody have any idea?
thanks

@eddiemundo
Copy link
Collaborator

Try deleting cache directories. I forget exactly if there are others but there is one in ~/.cache/ghcide or whatever the xdg cache directory is.

@dewijones92
Copy link
Author

dewijones92 commented Jan 31, 2022

@eddiemundo I checked to see if there was a cache file but there isn't one

Here is the server version:

dewi@pop-os:~/tmp/haskellTut/my-project2$ /home/dewi/.local/bin/haskell-language-server-wrapper --probe-tools
haskell-language-server version: 1.6.1.0 (GHC: 9.2.1) (PATH: /home/dewi/.local/bin/haskell-language-server-wrapper) (GIT hash: 49abc74a06c8ed296d308aa7fd3e9646dcf30cb3)
Tool versions found on the $PATH
cabal:          Not found
stack:          2.7.3
ghc:            Not found

Trying on a project generated by stack new my-project2 servant
But still no luck.
Go to definition or find references never works
I am really stuck here 😢

Any tips?
Thanks

lsp logs
[Trace - 09:40:54 PM] Sending request 'initialize - (477)'.
Params: {
  "processId": null,
  "rootPath": "/home/dewi/tmp/haskellTut/my-project2",
  "clientInfo": {
    "name": "emacs",
    "version": "GNU Emacs 29.0.50 (build 21, x86_64-pc-linux-gnu, GTK+ Version 3.24.25, cairo version 1.16.0)\n of 2022-01-28"
  },
  "rootUri": "file:///home/dewi/tmp/haskellTut/my-project2",
  "capabilities": {
    "workspace": {
      "workspaceEdit": {
        "documentChanges": true,
        "resourceOperations": [
          "create",
          "rename",
          "delete"
        ]
      },
      "applyEdit": true,
      "symbol": {
        "symbolKind": {
          "valueSet": [
            1,
            2,
            3,
            4,
            5,
            6,
            7,
            8,
            9,
            10,
            11,
            12,
            13,
            14,
            15,
            16,
            17,
            18,
            19,
            20,
            21,
            22,
            23,
            24,
            25,
            26
          ]
        }
      },
      "executeCommand": {
        "dynamicRegistration": false
      },
      "didChangeWatchedFiles": {
        "dynamicRegistration": true
      },
      "workspaceFolders": true,
      "configuration": true,
      "codeLens": {
        "refreshSupport": true
      },
      "fileOperations": {
        "didCreate": false,
        "willCreate": false,
        "didRename": false,
        "willRename": false,
        "didDelete": false,
        "willDelete": false
      }
    },
    "textDocument": {
      "declaration": {
        "linkSupport": true
      },
      "definition": {
        "linkSupport": true
      },
      "implementation": {
        "linkSupport": true
      },
      "typeDefinition": {
        "linkSupport": true
      },
      "synchronization": {
        "willSave": true,
        "didSave": true,
        "willSaveWaitUntil": true
      },
      "documentSymbol": {
        "symbolKind": {
          "valueSet": [
            1,
            2,
            3,
            4,
            5,
            6,
            7,
            8,
            9,
            10,
            11,
            12,
            13,
            14,
            15,
            16,
            17,
            18,
            19,
            20,
            21,
            22,
            23,
            24,
            25,
            26
          ]
        },
        "hierarchicalDocumentSymbolSupport": true
      },
      "formatting": {
        "dynamicRegistration": true
      },
      "rangeFormatting": {
        "dynamicRegistration": true
      },
      "rename": {
        "dynamicRegistration": true,
        "prepareSupport": true
      },
      "codeAction": {
        "dynamicRegistration": true,
        "isPreferredSupport": true,
        "codeActionLiteralSupport": {
          "codeActionKind": {
            "valueSet": [
              "",
              "quickfix",
              "refactor",
              "refactor.extract",
              "refactor.inline",
              "refactor.rewrite",
              "source",
              "source.organizeImports"
            ]
          }
        },
        "resolveSupport": {
          "properties": [
            "edit",
            "command"
          ]
        },
        "dataSupport": true
      },
      "completion": {
        "completionItem": {
          "snippetSupport": true,
          "documentationFormat": [
            "markdown",
            "plaintext"
          ],
          "resolveAdditionalTextEditsSupport": true,
          "insertReplaceSupport": true,
          "deprecatedSupport": true,
          "resolveSupport": {
            "properties": [
              "documentation",
              "details",
              "additionalTextEdits",
              "command"
            ]
          },
          "insertTextModeSupport": {
            "valueSet": [
              1,
              2
            ]
          }
        },
        "contextSupport": true
      },
      "signatureHelp": {
        "signatureInformation": {
          "parameterInformation": {
            "labelOffsetSupport": true
          }
        }
      },
      "documentLink": {
        "dynamicRegistration": true,
        "tooltipSupport": true
      },
      "hover": {
        "contentFormat": [
          "markdown",
          "plaintext"
        ]
      },
      "foldingRange": {
        "dynamicRegistration": true
      },
      "callHierarchy": {
        "dynamicRegistration": false
      },
      "publishDiagnostics": {
        "relatedInformation": true,
        "tagSupport": {
          "valueSet": [
            1,
            2
          ]
        },
        "versionSupport": true
      },
      "linkedEditingRange": {
        "dynamicRegistration": true
      }
    },
    "window": {
      "workDoneProgress": true,
      "showMessage": null,
      "showDocument": {
        "support": true
      }
    }
  },
  "initializationOptions": null,
  "workDoneToken": "1"
}


[Trace - 09:40:56 PM] Received response 'initialize - (477)' in 578ms.
Result: {
  "capabilities": {
    "callHierarchyProvider": true,
    "codeActionProvider": true,
    "codeLensProvider": {
      "resolveProvider": null,
      "workDoneProgress": null
    },
    "colorProvider": null,
    "completionProvider": {
      "resolveProvider": null,
      "triggerCharacters": [
        "."
      ]
    },
    "declarationProvider": null,
    "definitionProvider": true,
    "documentFormattingProvider": true,
    "documentHighlightProvider": true,
    "documentRangeFormattingProvider": true,
    "documentSymbolProvider": true,
    "executeCommandProvider": {
      "commands": [
        "131716:importLens:ImportLensCommand",
        "131716:refineImports:RefineImportLensCommand",
        "131716:moduleName:updateModuleName",
        "131716:ghcide-completions:extendImport",
        "131716:ghcide-type-lenses:typesignature.add"
      ]
    },
    "foldingRangeProvider": null,
    "hoverProvider": true,
    "implementationProvider": null,
    "referencesProvider": true,
    "renameProvider": null,
    "selectionRangeProvider": true,
    "semanticTokensProvider": {
      "legend": {
        "tokenModifiers": [
          "declaration",
          "definition",
          "readonly",
          "static",
          "deprecated",
          "abstract",
          "async",
          "modification",
          "documentation",
          "defaultLibrary"
        ],
        "tokenTypes": [
          "type",
          "class",
          "enum",
          "interface",
          "struct",
          "typeParameter",
          "parameter",
          "variable",
          "property",
          "enumMember",
          "event",
          "function",
          "method",
          "macro",
          "keyword",
          "modifier",
          "comment",
          "string",
          "number",
          "regexp",
          "operator"
        ]
      }
    },
    "textDocumentSync": {
      "change": 2,
      "openClose": true,
      "save": {}
    },
    "typeDefinitionProvider": true,
    "workspace": {
      "workspaceFolders": {
        "changeNotifications": true,
        "supported": true
      }
    },
    "workspaceSymbolProvider": true
  }
}


[Trace - 09:40:56 PM] Sending notification 'initialized'.
Params: {}


[Trace - 09:40:56 PM] Sending notification 'workspace/didChangeConfiguration'.
Params: {
  "settings": {
    "haskell": {
      "plugin": {
        "refineImports": {
          "globalOn": true
        },
        "ghcide-type-lenses": {
          "config": {
            "mode": true
          },
          "globalOn": true
        },
        "ghcide-completions": {
          "config": {
            "snippetsOn": true,
            "autoExtendOn": true
          }
        },
        "pragmas": {
          "completionOn": true,
          "codeActionsOn": true
        },
        "tactics": {
          "config": {
            "proofstate_styling": true,
            "timeout_duration": 2,
            "max_use_ctor_actions": 5,
            "auto_gas": 4
          },
          "globalOn": true
        },
        "retrie": {
          "globalOn": true
        },
        "class": {
          "globalOn": true
        },
        "haddockComments": {
          "globalOn": true
        },
        "splice": {
          "globalOn": true
        },
        "moduleName": {
          "globalOn": true
        },
        "eval": {
          "globalOn": true
        },
        "hlint": {
          "diagnosticsOn": true,
          "codeActionsOn": true
        },
        "importLens": {
          "codeLensOn": true,
          "codeActionsOn": true
        }
      },
      "maxCompletions": 40,
      "checkProject": true,
      "formattingProvider": "ormolu"
    }
  }
}


[Trace - 09:40:56 PM] Sending notification 'textDocument/didOpen'.
Params: {
  "textDocument": {
    "uri": "file:///home/dewi/tmp/haskellTut/my-project2/src/Lib.hs",
    "languageId": "haskell",
    "version": 0,
    "text": "{-# LANGUAGE DataKinds       #-}\n{-# LANGUAGE TemplateHaskell #-}\n{-# LANGUAGE TypeOperators   #-}\nmodule Lib\n    ( startApp\n    , app\n    ) where\n\nimport Data.Aeson\nimport Data.Aeson.TH\nimport Network.Wai\nimport Network.Wai.Handler.Warp\nimport Servant\n\ndata User = User\n  { userId        :: Int\n  , userFirstName :: String\n  , userLastName  :: String\n  } deriving (Eq, Show)\n\n$(deriveJSON defaultOptions ''User)\n\ntype API = \"users\" :> Get '[JSON] [User]\n\nstartApp :: IO ()\nstartApp = run 8080 app\n\napp :: Application\napp = serve api server\n\napi :: Proxy API\napi = Proxy\n\nserver :: Server API\nserver = return users\n\nusers :: [User]\nusers = [ User 1 \"Isaac\" \"Newton\"\n        , User 2 \"Albert\" \"Einstein\"\n        ]\n"
  }
}

[Trace - 09:41:19 PM] Sending request 'textDocument/definition - (503)'.
Params: {
  "textDocument": {
    "uri": "file:///home/dewi/tmp/haskellTut/my-project2/src/Lib.hs"
  },
  "position": {
    "line": 37,
    "character": 12
  }
}


[Trace - 09:41:19 PM] Received response 'textDocument/definition - (503)' in 1ms.
Result: []


[Trace - 09:41:19 PM] Sending request 'textDocument/codeAction - (504)'.
Params: {
  "textDocument": {
    "uri": "file:///home/dewi/tmp/haskellTut/my-project2/src/Lib.hs"
  },
  "range": {
    "start": {
      "line": 37,
      "character": 12
    },
    "end": {
      "line": 37,
      "character": 12
    }
  },
  "context": {
    "diagnostics": []
  }
}


[Trace - 09:41:19 PM] Sending request 'textDocument/documentHighlight - (505)'.
Params: {
  "textDocument": {
    "uri": "file:///home/dewi/tmp/haskellTut/my-project2/src/Lib.hs"
  },
  "position": {
    "line": 37,
    "character": 12
  }
}


[Trace - 09:41:19 PM] Received response 'textDocument/documentHighlight - (505)' in 10ms.
Result: []


[Trace - 09:41:19 PM] Received response 'textDocument/codeAction - (504)' in 10ms.
Result: []


[Trace - 09:41:20 PM] Sending request 'textDocument/definition - (506)'.
Params: {
  "textDocument": {
    "uri": "file:///home/dewi/tmp/haskellTut/my-project2/src/Lib.hs"
  },
  "position": {
    "line": 37,
    "character": 12
  }
}


[Trace - 09:41:20 PM] Received response 'textDocument/definition - (506)' in 1ms.
Result: []


[Trace - 09:41:20 PM] Sending request 'textDocument/codeAction - (507)'.
Params: {
  "textDocument": {
    "uri": "file:///home/dewi/tmp/haskellTut/my-project2/src/Lib.hs"
  },
  "range": {
    "start": {
      "line": 37,
      "character": 12
    },
    "end": {
      "line": 37,
      "character": 12
    }
  },
  "context": {
    "diagnostics": []
  }
}


[Trace - 09:41:20 PM] Sending request 'textDocument/documentHighlight - (508)'.
Params: {
  "textDocument": {
    "uri": "file:///home/dewi/tmp/haskellTut/my-project2/src/Lib.hs"
  },
  "position": {
    "line": 37,
    "character": 12
  }
}


[Trace - 09:41:20 PM] Received response 'textDocument/codeAction - (507)' in 10ms.
Result: []


[Trace - 09:41:20 PM] Received response 'textDocument/documentHighlight - (508)' in 10ms.
Result: []


[Trace - 09:41:22 PM] Sending request 'textDocument/definition - (509)'.
Params: {
  "textDocument": {
    "uri": "file:///home/dewi/tmp/haskellTut/my-project2/src/Lib.hs"
  },
  "position": {
    "line": 38,
    "character": 12
  }
}


[Trace - 09:41:22 PM] Received response 'textDocument/definition - (509)' in 1ms.
Result: []


[Trace - 09:41:22 PM] Sending request 'textDocument/codeAction - (510)'.
Params: {
  "textDocument": {
    "uri": "file:///home/dewi/tmp/haskellTut/my-project2/src/Lib.hs"
  },
  "range": {
    "start": {
      "line": 38,
      "character": 12
    },
    "end": {
      "line": 38,
      "character": 12
    }
  },
  "context": {
    "diagnostics": []
  }
}


[Trace - 09:41:22 PM] Sending request 'textDocument/documentHighlight - (511)'.
Params: {
  "textDocument": {
    "uri": "file:///home/dewi/tmp/haskellTut/my-project2/src/Lib.hs"
  },
  "position": {
    "line": 38,
    "character": 12
  }
}


[Trace - 09:41:22 PM] Sending request 'textDocument/hover - (512)'.
Params: {
  "textDocument": {
    "uri": "file:///home/dewi/tmp/haskellTut/my-project2/src/Lib.hs"
  },
  "position": {
    "line": 38,
    "character": 12
  }
}


[Trace - 09:41:22 PM] Received response 'textDocument/documentHighlight - (511)' in 10ms.
Result: []


[Trace - 09:41:22 PM] Received response 'textDocument/codeAction - (510)' in 11ms.
Result: []


[Trace - 09:41:22 PM] Received response 'textDocument/hover - (512)' in 10ms.
Result: null


[Trace - 09:42:25 PM] Sending request 'textDocument/hover - (513)'.
Params: {
  "textDocument": {
    "uri": "file:///home/dewi/tmp/haskellTut/my-project2/src/Lib.hs"
  },
  "position": {
    "line": 38,
    "character": 12
  }
}


[Trace - 09:42:25 PM] Received response 'textDocument/hover - (513)' in 7ms.
Result: null


[Trace - 09:42:28 PM] Sending request 'textDocument/codeAction - (514)'.
Params: {
  "textDocument": {
    "uri": "file:///home/dewi/tmp/haskellTut/my-project2/src/Lib.hs"
  },
  "range": {
    "start": {
      "line": 40,
      "character": 0
    },
    "end": {
      "line": 40,
      "character": 0
    }
  },
  "context": {
    "diagnostics": []
  }
}


[Trace - 09:42:28 PM] Sending request 'textDocument/documentHighlight - (515)'.
Params: {
  "textDocument": {
    "uri": "file:///home/dewi/tmp/haskellTut/my-project2/src/Lib.hs"
  },
  "position": {
    "line": 40,
    "character": 0
  }
}


[Trace - 09:42:28 PM] Sending request 'textDocument/hover - (516)'.
Params: {
  "textDocument": {
    "uri": "file:///home/dewi/tmp/haskellTut/my-project2/src/Lib.hs"
  },
  "position": {
    "line": 40,
    "character": 0
  }
}


[Trace - 09:42:28 PM] Received response 'textDocument/codeAction - (514)' in 13ms.
Result: []


[Trace - 09:42:28 PM] Received response 'textDocument/documentHighlight - (515)' in 12ms.
Result: []


[Trace - 09:42:28 PM] Received response 'textDocument/hover - (516)' in 12ms.
Result: null


[Trace - 09:42:29 PM] Sending notification 'textDocument/didChange'.
Params: {
  "textDocument": {
    "uri": "file:///home/dewi/tmp/haskellTut/my-project2/src/Lib.hs",
    "version": 1
  },
  "contentChanges": [
    {
      "range": {
        "start": {
          "line": 40,
          "character": 0
        },
        "end": {
          "line": 40,
          "character": 0
        }
      },
      "rangeLength": 0,
      "text": "\n"
    }
  ]
}


[Trace - 09:42:29 PM] Sending notification 'textDocument/didChange'.
Params: {
  "textDocument": {
    "uri": "file:///home/dewi/tmp/haskellTut/my-project2/src/Lib.hs",
    "version": 2
  },
  "contentChanges": [
    {
      "range": {
        "start": {
          "line": 41,
          "character": 0
        },
        "end": {
          "line": 41,
          "character": 0
        }
      },
      "rangeLength": 0,
      "text": "  "
    }
  ]
}


[Trace - 09:42:30 PM] Sending request 'textDocument/hover - (517)'.
Params: {
  "textDocument": {
    "uri": "file:///home/dewi/tmp/haskellTut/my-project2/src/Lib.hs"
  },
  "position": {
    "line": 41,
    "character": 2
  }
}


[Trace - 09:42:30 PM] Sending request 'textDocument/documentSymbol - (518)'.
Params: {
  "textDocument": {
    "uri": "file:///home/dewi/tmp/haskellTut/my-project2/src/Lib.hs"
  }
}


[Trace - 09:42:30 PM] Sending request 'textDocument/codeAction - (519)'.
Params: {
  "textDocument": {
    "uri": "file:///home/dewi/tmp/haskellTut/my-project2/src/Lib.hs"
  },
  "range": {
    "start": {
      "line": 41,
      "character": 2
    },
    "end": {
      "line": 41,
      "character": 2
    }
  },
  "context": {
    "diagnostics": []
  }
}


[Trace - 09:42:30 PM] Sending request 'textDocument/documentHighlight - (520)'.
Params: {
  "textDocument": {
    "uri": "file:///home/dewi/tmp/haskellTut/my-project2/src/Lib.hs"
  },
  "position": {
    "line": 41,
    "character": 2
  }
}


[Trace - 09:42:30 PM] Sending request 'textDocument/codeLens - (521)'.
Params: {
  "textDocument": {
    "uri": "file:///home/dewi/tmp/haskellTut/my-project2/src/Lib.hs"
  }
}


[Trace - 09:42:30 PM] Received response 'textDocument/hover - (517)' in 17ms.
Result: null


[Trace - 09:42:30 PM] Received response 'textDocument/documentSymbol - (518)' in 16ms.
Result: []


[Trace - 09:42:30 PM] Received response 'textDocument/codeAction - (519)' in 15ms.
Result: []


[Trace - 09:42:30 PM] Received response 'textDocument/documentHighlight - (520)' in 15ms.
Result: []


[Trace - 09:42:30 PM] Received response 'textDocument/codeLens - (521)' in 3ms.
Result: []


[Trace - 09:43:27 PM] Sending request 'textDocument/codeAction - (643)'.
Params: {
  "textDocument": {
    "uri": "file:///home/dewi/tmp/haskellTut/my-project2/src/Lib.hs"
  },
  "range": {
    "start": {
      "line": 34,
      "character": 19
    },
    "end": {
      "line": 34,
      "character": 19
    }
  },
  "context": {
    "diagnostics": []
  }
}


[Trace - 09:43:27 PM] Sending request 'textDocument/documentHighlight - (644)'.
Params: {
  "textDocument": {
    "uri": "file:///home/dewi/tmp/haskellTut/my-project2/src/Lib.hs"
  },
  "position": {
    "line": 34,
    "character": 19
  }
}


[Trace - 09:43:27 PM] Received response 'textDocument/hover - (642)' in 14ms.
Result: null


[Trace - 09:43:27 PM] Received response 'textDocument/codeAction - (643)' in 12ms.
Result: []


[Trace - 09:43:27 PM] Received response 'textDocument/documentHighlight - (644)' in 12ms.
Result: []


[Trace - 09:43:27 PM] Sending request 'textDocument/definition - (645)'.
Params: {
  "textDocument": {
    "uri": "file:///home/dewi/tmp/haskellTut/my-project2/src/Lib.hs"
  },
  "position": {
    "line": 34,
    "character": 19
  }
}


[Trace - 09:43:27 PM] Received response 'textDocument/definition - (645)' in 1ms.
Result: []


[Trace - 09:43:28 PM] Sending request 'textDocument/codeAction - (646)'.
Params: {
  "textDocument": {
    "uri": "file:///home/dewi/tmp/haskellTut/my-project2/src/Lib.hs"
  },
  "range": {
    "start": {
      "line": 34,
      "character": 19
    },
    "end": {
      "line": 34,
      "character": 19
    }
  },
  "context": {
    "diagnostics": []
  }
}


[Trace - 09:43:28 PM] Sending request 'textDocument/documentHighlight - (647)'.
Params: {
  "textDocument": {
    "uri": "file:///home/dewi/tmp/haskellTut/my-project2/src/Lib.hs"
  },
  "position": {
    "line": 34,
    "character": 19
  }
}


[Trace - 09:43:28 PM] Received response 'textDocument/codeAction - (646)' in 12ms.
Result: []


[Trace - 09:43:28 PM] Received response 'textDocument/documentHighlight - (647)' in 11ms.
Result: []

@eddiemundo
Copy link
Collaborator

Assuming you've passed the --debug flag, can you try

  • deleting the hls.log
  • opening the haskell file
  • maybe tail -f the hls.log file
  • then when it stops moving, showing all of hls.log and not just a snippet?

It seems weird to me that there is no cache directory called ghcide.

@jneira
Copy link
Member

jneira commented Feb 1, 2022

It seems weird to me that there is no cache directory called ghcide.

yeah, it should be somewhere, and ~/.cache/hie-bios too

@dewijones92
Copy link
Author

dewijones92 commented Feb 1, 2022

@jneira
thanks for that. That directory exists and I have now deleted that cache

Can anyone see why features like "go to definition" aren't working? many thanks

So I tried again using
stack new my-project2 servant

I captured all the logs of the server:
[Trace - 08:32:34 PM] Sending request 'initialize - (146)'.
Params: {
  "processId": null,
  "rootPath": "/home/dewi/tmp/haskellTut/my-project2",
  "clientInfo": {
    "name": "emacs",
    "version": "GNU Emacs 29.0.50 (build 21, x86_64-pc-linux-gnu, GTK+ Version 3.24.25, cairo version 1.16.0)\n of 2022-01-28"
  },
  "rootUri": "file:///home/dewi/tmp/haskellTut/my-project2",
  "capabilities": {
    "workspace": {
      "workspaceEdit": {
        "documentChanges": true,
        "resourceOperations": [
          "create",
          "rename",
          "delete"
        ]
      },
      "applyEdit": true,
      "symbol": {
        "symbolKind": {
          "valueSet": [
            1,
            2,
            3,
            4,
            5,
            6,
            7,
            8,
            9,
            10,
            11,
            12,
            13,
            14,
            15,
            16,
            17,
            18,
            19,
            20,
            21,
            22,
            23,
            24,
            25,
            26
          ]
        }
      },
      "executeCommand": {
        "dynamicRegistration": false
      },
      "didChangeWatchedFiles": {
        "dynamicRegistration": true
      },
      "workspaceFolders": true,
      "configuration": true,
      "codeLens": {
        "refreshSupport": true
      },
      "fileOperations": {
        "didCreate": false,
        "willCreate": false,
        "didRename": false,
        "willRename": false,
        "didDelete": false,
        "willDelete": false
      }
    },
    "textDocument": {
      "declaration": {
        "linkSupport": true
      },
      "definition": {
        "linkSupport": true
      },
      "implementation": {
        "linkSupport": true
      },
      "typeDefinition": {
        "linkSupport": true
      },
      "synchronization": {
        "willSave": true,
        "didSave": true,
        "willSaveWaitUntil": true
      },
      "documentSymbol": {
        "symbolKind": {
          "valueSet": [
            1,
            2,
            3,
            4,
            5,
            6,
            7,
            8,
            9,
            10,
            11,
            12,
            13,
            14,
            15,
            16,
            17,
            18,
            19,
            20,
            21,
            22,
            23,
            24,
            25,
            26
          ]
        },
        "hierarchicalDocumentSymbolSupport": true
      },
      "formatting": {
        "dynamicRegistration": true
      },
      "rangeFormatting": {
        "dynamicRegistration": true
      },
      "rename": {
        "dynamicRegistration": true,
        "prepareSupport": true
      },
      "codeAction": {
        "dynamicRegistration": true,
        "isPreferredSupport": true,
        "codeActionLiteralSupport": {
          "codeActionKind": {
            "valueSet": [
              "",
              "quickfix",
              "refactor",
              "refactor.extract",
              "refactor.inline",
              "refactor.rewrite",
              "source",
              "source.organizeImports"
            ]
          }
        },
        "resolveSupport": {
          "properties": [
            "edit",
            "command"
          ]
        },
        "dataSupport": true
      },
      "completion": {
        "completionItem": {
          "snippetSupport": true,
          "documentationFormat": [
            "markdown",
            "plaintext"
          ],
          "resolveAdditionalTextEditsSupport": true,
          "insertReplaceSupport": true,
          "deprecatedSupport": true,
          "resolveSupport": {
            "properties": [
              "documentation",
              "details",
              "additionalTextEdits",
              "command"
            ]
          },
          "insertTextModeSupport": {
            "valueSet": [
              1,
              2
            ]
          }
        },
        "contextSupport": true
      },
      "signatureHelp": {
        "signatureInformation": {
          "parameterInformation": {
            "labelOffsetSupport": true
          }
        }
      },
      "documentLink": {
        "dynamicRegistration": true,
        "tooltipSupport": true
      },
      "hover": {
        "contentFormat": [
          "markdown",
          "plaintext"
        ]
      },
      "foldingRange": {
        "dynamicRegistration": true
      },
      "callHierarchy": {
        "dynamicRegistration": false
      },
      "publishDiagnostics": {
        "relatedInformation": true,
        "tagSupport": {
          "valueSet": [
            1,
            2
          ]
        },
        "versionSupport": true
      },
      "linkedEditingRange": {
        "dynamicRegistration": true
      }
    },
    "window": {
      "workDoneProgress": true,
      "showMessage": null,
      "showDocument": {
        "support": true
      }
    }
  },
  "initializationOptions": null,
  "workDoneToken": "1"
}


[Trace - 08:32:35 PM] Received response 'initialize - (146)' in 536ms.
Result: {
  "capabilities": {
    "callHierarchyProvider": true,
    "codeActionProvider": true,
    "codeLensProvider": {
      "resolveProvider": null,
      "workDoneProgress": null
    },
    "colorProvider": null,
    "completionProvider": {
      "resolveProvider": null,
      "triggerCharacters": [
        "."
      ]
    },
    "declarationProvider": null,
    "definitionProvider": true,
    "documentFormattingProvider": true,
    "documentHighlightProvider": true,
    "documentRangeFormattingProvider": true,
    "documentSymbolProvider": true,
    "executeCommandProvider": {
      "commands": [
        "106771:importLens:ImportLensCommand",
        "106771:refineImports:RefineImportLensCommand",
        "106771:moduleName:updateModuleName",
        "106771:ghcide-completions:extendImport",
        "106771:ghcide-type-lenses:typesignature.add"
      ]
    },
    "foldingRangeProvider": null,
    "hoverProvider": true,
    "implementationProvider": null,
    "referencesProvider": true,
    "renameProvider": null,
    "selectionRangeProvider": true,
    "semanticTokensProvider": {
      "legend": {
        "tokenModifiers": [
          "declaration",
          "definition",
          "readonly",
          "static",
          "deprecated",
          "abstract",
          "async",
          "modification",
          "documentation",
          "defaultLibrary"
        ],
        "tokenTypes": [
          "type",
          "class",
          "enum",
          "interface",
          "struct",
          "typeParameter",
          "parameter",
          "variable",
          "property",
          "enumMember",
          "event",
          "function",
          "method",
          "macro",
          "keyword",
          "modifier",
          "comment",
          "string",
          "number",
          "regexp",
          "operator"
        ]
      }
    },
    "textDocumentSync": {
      "change": 2,
      "openClose": true,
      "save": {}
    },
    "typeDefinitionProvider": true,
    "workspace": {
      "workspaceFolders": {
        "changeNotifications": true,
        "supported": true
      }
    },
    "workspaceSymbolProvider": true
  }
}


[Trace - 08:32:35 PM] Sending notification 'initialized'.
Params: {}


[Trace - 08:32:35 PM] Sending notification 'workspace/didChangeConfiguration'.
Params: {
  "settings": {
    "haskell": {
      "plugin": {
        "refineImports": {
          "globalOn": true
        },
        "ghcide-type-lenses": {
          "config": {
            "mode": true
          },
          "globalOn": true
        },
        "ghcide-completions": {
          "config": {
            "snippetsOn": true,
            "autoExtendOn": true
          }
        },
        "pragmas": {
          "completionOn": true,
          "codeActionsOn": true
        },
        "tactics": {
          "config": {
            "proofstate_styling": true,
            "timeout_duration": 2,
            "max_use_ctor_actions": 5,
            "auto_gas": 4
          },
          "globalOn": true
        },
        "retrie": {
          "globalOn": true
        },
        "class": {
          "globalOn": true
        },
        "haddockComments": {
          "globalOn": true
        },
        "splice": {
          "globalOn": true
        },
        "moduleName": {
          "globalOn": true
        },
        "eval": {
          "globalOn": true
        },
        "hlint": {
          "diagnosticsOn": true,
          "codeActionsOn": true
        },
        "importLens": {
          "codeLensOn": true,
          "codeActionsOn": true
        }
      },
      "maxCompletions": 40,
      "checkProject": true,
      "formattingProvider": "ormolu"
    }
  }
}


[Trace - 08:32:35 PM] Sending notification 'textDocument/didOpen'.
Params: {
  "textDocument": {
    "uri": "file:///home/dewi/tmp/haskellTut/my-project2/src/Lib.hs",
    "languageId": "haskell",
    "version": 0,
    "text": "{-# LANGUAGE DataKinds       #-}\n{-# LANGUAGE TemplateHaskell #-}\n{-# LANGUAGE TypeOperators   #-}\nmodule Lib\n    ( startApp\n    , app\n    ) where\n\nimport Data.Aeson\nimport Data.Aeson.TH\nimport Network.Wai\nimport Network.Wai.Handler.Warp\nimport Servant\n\ndata User = User\n  { userId        :: Int\n  , userFirstName :: String\n  , userLastName  :: String\n  } deriving (Eq, Show)\n\n$(deriveJSON defaultOptions ''User)\n\ntype API = \"users\" :> Get '[JSON] [User]\n\nstartApp :: IO ()\nstartApp = run 8080 app\n\napp :: Application\napp = serve api server\n\napi :: Proxy API\napi = Proxy\n\nserver :: Server API\nserver = return users\n\nusers :: [User]\nusers = [ User 1 \"Isaac\" \"Newton\"\n        , User 2 \"Albert\" \"Einstein\"\n        ]\n"
  }
}


[Trace - 08:32:35 PM] Sending request 'textDocument/codeLens - (147)'.
Params: {
  "textDocument": {
    "uri": "file:///home/dewi/tmp/haskellTut/my-project2/src/Lib.hs"
  }
}


[Trace - 08:32:35 PM] Sending request 'textDocument/documentSymbol - (148)'.
Params: {
  "textDocument": {
    "uri": "file:///home/dewi/tmp/haskellTut/my-project2/src/Lib.hs"
  }
}


[Trace - 08:32:35 PM] Sending request 'textDocument/codeAction - (149)'.
Params: {
  "textDocument": {
    "uri": "file:///home/dewi/tmp/haskellTut/my-project2/src/Lib.hs"
  },
  "range": {
    "start": {
      "line": 34,
      "character": 19
    },
    "end": {
      "line": 34,
      "character": 19
    }
  },
  "context": {
    "diagnostics": []
  }
}


[Trace - 08:32:35 PM] Sending request 'textDocument/documentHighlight - (150)'.
Params: {
  "textDocument": {
    "uri": "file:///home/dewi/tmp/haskellTut/my-project2/src/Lib.hs"
  },
  "position": {
    "line": 34,
    "character": 19
  }
}


[Trace - 08:32:35 PM] Sending request 'textDocument/documentSymbol - (151)'.
Params: {
  "textDocument": {
    "uri": "file:///home/dewi/tmp/haskellTut/my-project2/src/Lib.hs"
  }
}


[Trace - 08:32:35 PM] Sending notification '$/cancelRequest'.
Params: {
  "id": 149
}


[Trace - 08:32:35 PM] Sending request 'textDocument/codeAction - (152)'.
Params: {
  "textDocument": {
    "uri": "file:///home/dewi/tmp/haskellTut/my-project2/src/Lib.hs"
  },
  "range": {
    "start": {
      "line": 34,
      "character": 19
    },
    "end": {
      "line": 34,
      "character": 19
    }
  },
  "context": {
    "diagnostics": []
  }
}


[Trace - 08:32:35 PM] Sending notification '$/cancelRequest'.
Params: {
  "id": 150
}


[Trace - 08:32:35 PM] Sending request 'textDocument/documentHighlight - (153)'.
Params: {
  "textDocument": {
    "uri": "file:///home/dewi/tmp/haskellTut/my-project2/src/Lib.hs"
  },
  "position": {
    "line": 34,
    "character": 19
  }
}


[Trace - 08:32:35 PM] Sending notification '$/cancelRequest'.
Params: {
  "id": 147
}


[Trace - 08:32:35 PM] Sending request 'textDocument/codeLens - (154)'.
Params: {
  "textDocument": {
    "uri": "file:///home/dewi/tmp/haskellTut/my-project2/src/Lib.hs"
  }
}


[Trace - 08:32:35 PM] Sending notification '$/cancelRequest'.
Params: {
  "id": 154
}


[Trace - 08:32:35 PM] Sending request 'textDocument/codeLens - (155)'.
Params: {
  "textDocument": {
    "uri": "file:///home/dewi/tmp/haskellTut/my-project2/src/Lib.hs"
  }
}


[Trace - 08:32:35 PM] Received request 'client/registerCapability - (0).
Params: {
  "registrations": [
    {
      "id": "globalFileWatches",
      "method": "workspace/didChangeWatchedFiles",
      "registerOptions": {
        "watchers": [
          {
            "globPattern": "**/*.hs",
            "kind": 7
          },
          {
            "globPattern": "**/*.hs-boot",
            "kind": 7
          },
          {
            "globPattern": "**/*.lhs",
            "kind": 7
          },
          {
            "globPattern": "**/*.lhs-boot",
            "kind": 7
          }
        ]
      }
    }
  ]
}


[Trace - 08:32:35 PM] Sending response 'client/registerCapability - (0)'. Processing request took 17ms
Params: {
  "jsonrpc": "2.0",
  "id": 0,
  "result": null
}


[Trace - 08:32:35 PM] Received request 'window/workDoneProgress/create - (1).
Params: {
  "token": 0
}


[Trace - 08:32:35 PM] Sending response 'window/workDoneProgress/create - (1)'. Processing request took 0ms
Params: {
  "jsonrpc": "2.0",
  "id": 1,
  "result": null
}


[Trace - 08:32:35 PM] Received notification '$/progress'.
Params: {
  "token": 0,
  "value": {
    "cancellable": null,
    "kind": "begin",
    "title": "Setting up my-project2 (for src/Lib.hs)"
  }
}


[Trace - 08:32:35 PM] Received request 'window/workDoneProgress/create - (2).
Params: {
  "token": "32"
}


[Trace - 08:32:35 PM] Sending response 'window/workDoneProgress/create - (2)'. Processing request took 0ms
Params: {
  "jsonrpc": "2.0",
  "id": 2,
  "result": null
}


[Trace - 08:32:35 PM] Received notification '$/progress'.
Params: {
  "token": "32",
  "value": {
    "kind": "begin",
    "title": "Processing"
  }
}


[Trace - 08:32:35 PM] Received notification '$/progress'.
Params: {
  "token": "32",
  "value": {
    "kind": "report",
    "message": "1/2"
  }
}


[Trace - 08:32:36 PM] Sending notification '$/cancelRequest'.
Params: {
  "id": 152
}


[Trace - 08:32:37 PM] Received notification '$/progress'.
Params: {
  "token": 0,
  "value": {
    "kind": "end"
  }
}


[Trace - 08:32:37 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {
  "diagnostics": [
    {
      "message": "ghcide compiled against GHC 9.2.1 but currently using 8.10.7 \nThis is unsupported, ghcide must be compiled with the same GHC version as the project.",
      "range": {
        "end": {
          "character": 0,
          "line": 1
        },
        "start": {
          "character": 0,
          "line": 0
        }
      },
      "severity": 1,
      "source": "cradle"
    }
  ],
  "uri": "file:///home/dewi/tmp/haskellTut/my-project2/src/Lib.hs"
}


[Trace - 08:32:37 PM] Received response 'textDocument/documentSymbol - (148)' in 888ms.
Result: []


[Trace - 08:32:37 PM] Received response 'textDocument/documentHighlight - (153)' in 886ms.
Result: []


[Trace - 08:32:37 PM] Received response 'textDocument/documentSymbol - (151)' in 887ms.
Result: []


[Trace - 08:32:37 PM] Received response 'nil - (150)' in 0ms.
Result: []


[Trace - 08:32:37 PM] Received response 'nil - (152)' in 0ms.
Result: []


[Trace - 08:32:37 PM] Received response 'nil - (149)' in 0ms.
Result: []


[Trace - 08:32:37 PM] Received response 'nil - (147)' in 0ms.
Result: []


[Trace - 08:32:37 PM] Received response 'nil - (154)' in 0ms.
Result: []


[Trace - 08:32:37 PM] Received response 'textDocument/codeLens - (155)' in 832ms.
Result: []


[Trace - 08:32:37 PM] Received notification '$/progress'.
Params: {
  "token": "32",
  "value": {
    "kind": "end"
  }
}


[Trace - 08:32:37 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {
  "diagnostics": [],
  "uri": "file:///home/dewi/tmp/haskellTut/my-project2/src/Lib.hs",
  "version": 0
}


[Trace - 08:32:51 PM] Sending request 'textDocument/codeAction - (156)'.
Params: {
  "textDocument": {
    "uri": "file:///home/dewi/tmp/haskellTut/my-project2/src/Lib.hs"
  },
  "range": {
    "start": {
      "line": 34,
      "character": 19
    },
    "end": {
      "line": 34,
      "character": 19
    }
  },
  "context": {
    "diagnostics": []
  }
}


[Trace - 08:32:51 PM] Sending request 'textDocument/documentHighlight - (157)'.
Params: {
  "textDocument": {
    "uri": "file:///home/dewi/tmp/haskellTut/my-project2/src/Lib.hs"
  },
  "position": {
    "line": 34,
    "character": 19
  }
}


[Trace - 08:32:51 PM] Received response 'textDocument/documentHighlight - (157)' in 13ms.
Result: []


[Trace - 08:32:51 PM] Received response 'textDocument/codeAction - (156)' in 14ms.
Result: []


[Trace - 08:32:53 PM] Sending request 'textDocument/codeAction - (158)'.
Params: {
  "textDocument": {
    "uri": "file:///home/dewi/tmp/haskellTut/my-project2/src/Lib.hs"
  },
  "range": {
    "start": {
      "line": 37,
      "character": 0
    },
    "end": {
      "line": 37,
      "character": 0
    }
  },
  "context": {
    "diagnostics": []
  }
}


[Trace - 08:32:53 PM] Sending request 'textDocument/documentHighlight - (159)'.
Params: {
  "textDocument": {
    "uri": "file:///home/dewi/tmp/haskellTut/my-project2/src/Lib.hs"
  },
  "position": {
    "line": 37,
    "character": 0
  }
}


[Trace - 08:32:53 PM] Sending request 'textDocument/hover - (160)'.
Params: {
  "textDocument": {
    "uri": "file:///home/dewi/tmp/haskellTut/my-project2/src/Lib.hs"
  },
  "position": {
    "line": 37,
    "character": 0
  }
}


[Trace - 08:32:53 PM] Received response 'textDocument/codeAction - (158)' in 8ms.
Result: []


[Trace - 08:32:53 PM] Received response 'textDocument/documentHighlight - (159)' in 8ms.
Result: []


[Trace - 08:32:53 PM] Received response 'textDocument/hover - (160)' in 8ms.
Result: null


[Trace - 08:32:55 PM] Sending request 'textDocument/definition - (161)'.
Params: {
  "textDocument": {
    "uri": "file:///home/dewi/tmp/haskellTut/my-project2/src/Lib.hs"
  },
  "position": {
    "line": 37,
    "character": 0
  }
}


[Trace - 08:32:55 PM] Received response 'textDocument/definition - (161)' in 1ms.
Result: []


[Trace - 08:32:55 PM] Sending request 'textDocument/codeAction - (162)'.
Params: {
  "textDocument": {
    "uri": "file:///home/dewi/tmp/haskellTut/my-project2/src/Lib.hs"
  },
  "range": {
    "start": {
      "line": 37,
      "character": 0
    },
    "end": {
      "line": 37,
      "character": 0
    }
  },
  "context": {
    "diagnostics": []
  }
}


[Trace - 08:32:55 PM] Sending request 'textDocument/documentHighlight - (163)'.
Params: {
  "textDocument": {
    "uri": "file:///home/dewi/tmp/haskellTut/my-project2/src/Lib.hs"
  },
  "position": {
    "line": 37,
    "character": 0
  }
}


[Trace - 08:32:55 PM] Received response 'textDocument/documentHighlight - (163)' in 13ms.
Result: []


[Trace - 08:32:55 PM] Received response 'textDocument/codeAction - (162)' in 14ms.
Result: []


[Trace - 08:33:11 PM] Sending request 'textDocument/codeAction - (164)'.
Params: {
  "textDocument": {
    "uri": "file:///home/dewi/tmp/haskellTut/my-project2/src/Lib.hs"
  },
  "range": {
    "start": {
      "line": 32,
      "character": 0
    },
    "end": {
      "line": 32,
      "character": 0
    }
  },
  "context": {
    "diagnostics": []
  }
}


[Trace - 08:33:11 PM] Received response 'textDocument/codeAction - (164)' in 13ms.
Result: []


[Trace - 08:33:12 PM] Sending request 'textDocument/hover - (165)'.
Params: {
  "textDocument": {
    "uri": "file:///home/dewi/tmp/haskellTut/my-project2/src/Lib.hs"
  },
  "position": {
    "line": 33,
    "character": 0
  }
}


[Trace - 08:33:12 PM] Sending request 'textDocument/codeAction - (166)'.
Params: {
  "textDocument": {
    "uri": "file:///home/dewi/tmp/haskellTut/my-project2/src/Lib.hs"
  },
  "range": {
    "start": {
      "line": 33,
      "character": 0
    },
    "end": {
      "line": 33,
      "character": 0
    }
  },
  "context": {
    "diagnostics": []
  }
}


[Trace - 08:33:12 PM] Sending request 'textDocument/documentHighlight - (167)'.
Params: {
  "textDocument": {
    "uri": "file:///home/dewi/tmp/haskellTut/my-project2/src/Lib.hs"
  },
  "position": {
    "line": 33,
    "character": 0
  }
}


[Trace - 08:33:12 PM] Received response 'textDocument/hover - (165)' in 15ms.
Result: null


[Trace - 08:33:12 PM] Received response 'textDocument/codeAction - (166)' in 14ms.
Result: []


[Trace - 08:33:12 PM] Received response 'textDocument/documentHighlight - (167)' in 13ms.
Result: []


[Trace - 08:33:13 PM] Sending request 'textDocument/codeAction - (168)'.
Params: {
  "textDocument": {
    "uri": "file:///home/dewi/tmp/haskellTut/my-project2/src/Lib.hs"
  },
  "range": {
    "start": {
      "line": 33,
      "character": 10
    },
    "end": {
      "line": 33,
      "character": 10
    }
  },
  "context": {
    "diagnostics": []
  }
}


[Trace - 08:33:13 PM] Sending request 'textDocument/documentHighlight - (169)'.
Params: {
  "textDocument": {
    "uri": "file:///home/dewi/tmp/haskellTut/my-project2/src/Lib.hs"
  },
  "position": {
    "line": 33,
    "character": 10
  }
}


[Trace - 08:33:13 PM] Sending request 'textDocument/hover - (170)'.
Params: {
  "textDocument": {
    "uri": "file:///home/dewi/tmp/haskellTut/my-project2/src/Lib.hs"
  },
  "position": {
    "line": 33,
    "character": 10
  }
}


[Trace - 08:33:13 PM] Received response 'textDocument/documentHighlight - (169)' in 14ms.
Result: []


[Trace - 08:33:13 PM] Received response 'textDocument/codeAction - (168)' in 14ms.
Result: []


[Trace - 08:33:13 PM] Received response 'textDocument/hover - (170)' in 14ms.
Result: null


[Trace - 08:33:14 PM] Sending request 'textDocument/definition - (171)'.
Params: {
  "textDocument": {
    "uri": "file:///home/dewi/tmp/haskellTut/my-project2/src/Lib.hs"
  },
  "position": {
    "line": 33,
    "character": 10
  }
}


[Trace - 08:33:14 PM] Received response 'textDocument/definition - (171)' in 1ms.
Result: []


[Trace - 08:33:15 PM] Sending request 'textDocument/codeAction - (172)'.
Params: {
  "textDocument": {
    "uri": "file:///home/dewi/tmp/haskellTut/my-project2/src/Lib.hs"
  },
  "range": {
    "start": {
      "line": 33,
      "character": 10
    },
    "end": {
      "line": 33,
      "character": 10
    }
  },
  "context": {
    "diagnostics": []
  }
}


[Trace - 08:33:15 PM] Sending request 'textDocument/documentHighlight - (173)'.
Params: {
  "textDocument": {
    "uri": "file:///home/dewi/tmp/haskellTut/my-project2/src/Lib.hs"
  },
  "position": {
    "line": 33,
    "character": 10
  }
}


[Trace - 08:33:15 PM] Received response 'textDocument/documentHighlight - (173)' in 7ms.
Result: []


[Trace - 08:33:15 PM] Received response 'textDocument/codeAction - (172)' in 7ms.
Result: []


[Trace - 08:33:17 PM] Sending request 'textDocument/definition - (174)'.
Params: {
  "textDocument": {
    "uri": "file:///home/dewi/tmp/haskellTut/my-project2/src/Lib.hs"
  },
  "position": {
    "line": 31,
    "character": 10
  }
}


[Trace - 08:33:17 PM] Received response 'textDocument/definition - (174)' in 1ms.
Result: []


[Trace - 08:33:20 PM] Sending request 'textDocument/codeAction - (175)'.
Params: {
  "textDocument": {
    "uri": "file:///home/dewi/tmp/haskellTut/my-project2/src/Lib.hs"
  },
  "range": {
    "start": {
      "line": 26,
      "character": 0
    },
    "end": {
      "line": 26,
      "character": 0
    }
  },
  "context": {
    "diagnostics": []
  }
}


[Trace - 08:33:20 PM] Received response 'textDocument/codeAction - (175)' in 13ms.
Result: []


[Trace - 08:33:20 PM] Sending request 'textDocument/hover - (176)'.
Params: {
  "textDocument": {
    "uri": "file:///home/dewi/tmp/haskellTut/my-project2/src/Lib.hs"
  },
  "position": {
    "line": 27,
    "character": 0
  }
}


[Trace - 08:33:20 PM] Sending request 'textDocument/codeAction - (177)'.
Params: {
  "textDocument": {
    "uri": "file:///home/dewi/tmp/haskellTut/my-project2/src/Lib.hs"
  },
  "range": {
    "start": {
      "line": 27,
      "character": 0
    },
    "end": {
      "line": 27,
      "character": 0
    }
  },
  "context": {
    "diagnostics": []
  }
}


[Trace - 08:33:20 PM] Sending request 'textDocument/documentHighlight - (178)'.
Params: {
  "textDocument": {
    "uri": "file:///home/dewi/tmp/haskellTut/my-project2/src/Lib.hs"
  },
  "position": {
    "line": 27,
    "character": 0
  }
}


[Trace - 08:33:20 PM] Received response 'textDocument/hover - (176)' in 16ms.
Result: null


[Trace - 08:33:20 PM] Received response 'textDocument/codeAction - (177)' in 14ms.
Result: []


[Trace - 08:33:20 PM] Received response 'textDocument/documentHighlight - (178)' in 14ms.
Result: []


[Trace - 08:33:21 PM] Sending request 'textDocument/definition - (179)'.
Params: {
  "textDocument": {
    "uri": "file:///home/dewi/tmp/haskellTut/my-project2/src/Lib.hs"
  },
  "position": {
    "line": 25,
    "character": 22
  }
}


[Trace - 08:33:21 PM] Received response 'textDocument/definition - (179)' in 1ms.
Result: []


[Trace - 08:33:22 PM] Sending request 'textDocument/codeAction - (180)'.
Params: {
  "textDocument": {
    "uri": "file:///home/dewi/tmp/haskellTut/my-project2/src/Lib.hs"
  },
  "range": {
    "start": {
      "line": 25,
      "character": 22
    },
    "end": {
      "line": 25,
      "character": 22
    }
  },
  "context": {
    "diagnostics": []
  }
}


[Trace - 08:33:22 PM] Sending request 'textDocument/documentHighlight - (181)'.
Params: {
  "textDocument": {
    "uri": "file:///home/dewi/tmp/haskellTut/my-project2/src/Lib.hs"
  },
  "position": {
    "line": 25,
    "character": 22
  }
}


[Trace - 08:33:22 PM] Sending request 'textDocument/hover - (182)'.
Params: {
  "textDocument": {
    "uri": "file:///home/dewi/tmp/haskellTut/my-project2/src/Lib.hs"
  },
  "position": {
    "line": 25,
    "character": 22
  }
}


[Trace - 08:33:22 PM] Received response 'textDocument/documentHighlight - (181)' in 14ms.
Result: []


[Trace - 08:33:22 PM] Received response 'textDocument/codeAction - (180)' in 15ms.
Result: []


[Trace - 08:33:22 PM] Received response 'textDocument/hover - (182)' in 14ms.
Result: null

2022-02-01 20:32:34.763415554 [ThreadId 4] INFO hls:	Logging heap statistics every 60.00s
2022-02-01 20:32:34.76973635 [ThreadId 4] INFO hls:	Starting LSP server...
2022-02-01 20:32:34.769840803 [ThreadId 4] INFO hls:	If you are seeing this in a terminal, you probably should have run WITHOUT the --lsp option!
2022-02-01 20:32:34.771336647 [ThreadId 14] INFO hls:	Started LSP server in 0.00s
2022-02-01 20:32:34.77322749 [ThreadId 14] DEBUG hls:	setInitialDynFlags cradle: Cradle {cradleRootDir = "/home/dewi/tmp/haskellTut/my-project2", cradleOptsProg = CradleAction: Stack}
2022-02-01 20:32:35.538715067 [ThreadId 14] DEBUG hls:	setInitialDynFlags: No entry for "target word big endian" in "/home/dewi/.stack/programs/x86_64-linux/ghc-tinfo6-8.10.7/lib/ghc-8.10.7/settings"
2022-02-01 20:32:35.538826252 [ThreadId 14] DEBUG hls:	runSubset: True
2022-02-01 20:32:35.538892996 [ThreadId 22] DEBUG hls:	Initializing exports map from hiedb
2022-02-01 20:32:35.539096211 [ThreadId 14] INFO hls:	Registering ide configuration: IdeConfiguration {workspaceFolders = fromList [NormalizedUri 8544940764711403612 "file:///home/dewi/tmp/haskellTut/my-project2"], clientSettings = hashed Nothing}
2022-02-01 20:32:35.592571442 [ThreadId 25] DEBUG hls:	Shake session initialized
2022-02-01 20:32:35.59287905 [ThreadId 22] DEBUG hls:	Done initializing exports map from hiedb (0)
2022-02-01 20:32:35.592709427 [ThreadId 25] DEBUG hls:	Configuration changed: Object (fromList [("haskell",Object (fromList [("checkProject",Bool True),("formattingProvider",String "ormolu"),("maxCompletions",Number 40.0),("plugin",Object (fromList [("class",Object (fromList [("globalOn",Bool True)])),("eval",Object (fromList [("globalOn",Bool True)])),("ghcide-completions",Object (fromList [("config",Object (fromList [("autoExtendOn",Bool True),("snippetsOn",Bool True)]))])),("ghcide-type-lenses",Object (fromList [("config",Object (fromList [("mode",Bool True)])),("globalOn",Bool True)])),("haddockComments",Object (fromList [("globalOn",Bool True)])),("hlint",Object (fromList [("codeActionsOn",Bool True),("diagnosticsOn",Bool True)])),("importLens",Object (fromList [("codeActionsOn",Bool True),("codeLensOn",Bool True)])),("moduleName",Object (fromList [("globalOn",Bool True)])),("pragmas",Object (fromList [("codeActionsOn",Bool True),("completionOn",Bool True)])),("refineImports",Object (fromList [("globalOn",Bool True)])),("retrie",Object (fromList [("globalOn",Bool True)])),("splice",Object (fromList [("globalOn",Bool True)])),("tactics",Object (fromList [("config",Object (fromList [("auto_gas",Number 4.0),("max_use_ctor_actions",Number 5.0),("proofstate_styling",Bool True),("timeout_duration",Number 2.0)])),("globalOn",Bool True)]))]))]))])
2022-02-01 20:32:35.593184455 [ThreadId 25] DEBUG hls:	Restarting build session due to config change with queue [] for keys [GetClientSettings; ] (aborting the previous one took 0.00s)
2022-02-01 20:32:35.593197539 [ThreadId 29] DEBUG hls:	Finishing build session(exception: AsyncCancelled)
2022-02-01 20:32:35.593515606 [ThreadId 25] DEBUG hls:	Set files of interest to: fromList [(NormalizedFilePath "/home/dewi/tmp/haskellTut/my-project2/src/Lib.hs",Modified {firstOpen = True})]
2022-02-01 20:32:35.593666916 [ThreadId 25] DEBUG hls:	Restarting build session due to /home/dewi/tmp/haskellTut/my-project2/src/Lib.hs (modified) with queue [] for keys [IsFileOfInterest; /home/dewi/tmp/haskellTut/my-project2/src/Lib.hs,GetModificationTime; /home/dewi/tmp/haskellTut/my-project2/src/Lib.hs,GetClientSettings; ] (aborting the previous one took 0.00s)
2022-02-01 20:32:35.593678718 [ThreadId 38] DEBUG hls:	Finishing build session(exception: AsyncCancelled)
2022-02-01 20:32:35.59378282 [ThreadId 25] DEBUG hls:	Opened text document: file:///home/dewi/tmp/haskellTut/my-project2/src/Lib.hs
2022-02-01 20:32:35.593900568 [ThreadId 66] DEBUG hls:	DocumentHighlight request at position 35:20 in file: /home/dewi/tmp/haskellTut/my-project2/src/Lib.hs
2022-02-01 20:32:35.593920715 [ThreadId 67] DEBUG hls:	DocumentHighlight request at position 35:20 in file: /home/dewi/tmp/haskellTut/my-project2/src/Lib.hs
2022-02-01 20:32:35.594038092 [ThreadId 66] DEBUG hls:	LOOKUP UP PERSISTENT FOR: GetHieAst
2022-02-01 20:32:35.594066835 [ThreadId 67] DEBUG hls:	LOOKUP UP PERSISTENT FOR: GetHieAst
2022-02-01 20:32:35.594805339 [ThreadId 114] INFO hls:	Consulting the cradle for "src/Lib.hs"
2022-02-01 20:32:35.594929839 [ThreadId 114] WARNING hls:	No [cradle](https://github.com/mpickering/hie-bios#hie-bios) found for src/Lib.hs.
 Proceeding with [implicit cradle](https://hackage.haskell.org/package/implicit-hie).
You should ignore this message, unless you see a 'Multi Cradle: No prefixes matched' error.
2022-02-01 20:32:35.597869931 [ThreadId 137] DEBUG hls:	Output from setting up the cradle Cradle {cradleRootDir = "/home/dewi/tmp/haskellTut/my-project2", cradleOptsProg = CradleAction: Stack}
2022-02-01 20:32:36.043135327 [ThreadId 140] INFO hie-bios:	Building all executables for `my-project2' once. After a successful build of all of them, only specified executables will be rebuilt.
2022-02-01 20:32:36.04421378 [ThreadId 140] INFO hie-bios:	my-project2> initial-build-steps (lib + exe)
2022-02-01 20:32:36.222565407 [ThreadId 140] INFO hie-bios:	Configuring GHCi with the following packages: my-project2
2022-02-01 20:32:36.608427752 [ThreadId 158] INFO hie-bios:	/home/dewi/tmp/haskellTut/my-project2/.stack-work/install/x86_64-linux-tinfo6/7260a2d16a6846747d5efdaf8dbec5037f88eaa72d19dafbf47d5619c89f13d3/8.10.7/pkgdb:/home/dewi/.stack/snapshots/x86_64-linux-tinfo6/7260a2d16a6846747d5efdaf8dbec5037f88eaa72d19dafbf47d5619c89f13d3/8.10.7/pkgdb:/home/dewi/.stack/programs/x86_64-linux/ghc-tinfo6-8.10.7/lib/ghc-8.10.7/package.conf.d
2022-02-01 20:32:37.383961354 [ThreadId 114] DEBUG hls:	Session loading result: Right (ComponentOptions {componentOptions = ["-i","-odir=/home/dewi/tmp/haskellTut/my-project2/.stack-work/odir","-hidir=/home/dewi/tmp/haskellTut/my-project2/.stack-work/odir","-hide-all-packages","-i/home/dewi/tmp/haskellTut/my-project2/.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.2.1.0/build","-i/home/dewi/tmp/haskellTut/my-project2/src","-i/home/dewi/tmp/haskellTut/my-project2/.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.2.1.0/build/autogen","-i/home/dewi/tmp/haskellTut/my-project2/.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.2.1.0/build/global-autogen","-stubdir=/home/dewi/tmp/haskellTut/my-project2/.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.2.1.0/build","-package-id=aeson-1.5.6.0-DkwLMaMFAoKEbTeMR8x6ex","-package-id=base-4.14.3.0","-package-id=servant-server-0.18.3-B9IzDdk0VRqAn0iBJpXzF7","-package-id=wai-3.2.3-11TvQNeLIDpLjuhhSBw2zq","-package-id=warp-3.3.18-CE2mtiLvd5WJxa1EhHM9HM","-optP-include","-optP/home/dewi/tmp/haskellTut/my-project2/.stack-work/ghci/0b279fd7/cabal_macros.h","-ghci-script=/tmp/haskell-stack-ghci/0b734d11/ghci-script","-package-db","/home/dewi/tmp/haskellTut/my-project2/.stack-work/install/x86_64-linux-tinfo6/7260a2d16a6846747d5efdaf8dbec5037f88eaa72d19dafbf47d5619c89f13d3/8.10.7/pkgdb","-package-db","/home/dewi/.stack/snapshots/x86_64-linux-tinfo6/7260a2d16a6846747d5efdaf8dbec5037f88eaa72d19dafbf47d5619c89f13d3/8.10.7/pkgdb","-package-db","/home/dewi/.stack/programs/x86_64-linux/ghc-tinfo6-8.10.7/lib/ghc-8.10.7/package.conf.d"], componentRoot = "/home/dewi/tmp/haskellTut/my-project2", componentDependencies = ["my-project2.cabal","package.yaml","stack.yaml"]},"/home/dewi/.stack/programs/x86_64-linux/ghc-tinfo6-8.10.7/lib/ghc-8.10.7")
2022-02-01 20:32:37.408390329 [ThreadId 119] INFO hls:	finish: codeLens.GhcSession (took 1.81s)
2022-02-01 20:32:37.408513076 [ThreadId 150] INFO hls:	finish: codeLens.GhcSession (took 1.80s)
2022-02-01 20:32:37.408561045 [ThreadId 129] INFO hls:	finish: ModuleName.ghcSession (took 1.81s)
2022-02-01 20:32:37.408584147 [ThreadId 136] DEBUG hls:	LOOKUP UP PERSISTENT FOR: GhcSession
2022-02-01 20:32:37.408588586 [ThreadId 120] INFO hls:	finish: ModuleName.ghcSession (took 1.81s)
2022-02-01 20:32:37.408582294 [ThreadId 153] INFO hls:	finish: ModuleName.ghcSession (took 1.80s)
2022-02-01 20:32:37.408594587 [ThreadId 104] DEBUG hls:	LOOKUP UP PERSISTENT FOR: GhcSession
2022-02-01 20:32:37.408556677 [ThreadId 116] INFO hls:	finish: codeLens.GhcSession (took 1.81s)
2022-02-01 20:32:37.408701534 [ThreadId 118] INFO hls:	finish: importLens (took 1.81s)
2022-02-01 20:32:37.408741869 [ThreadId 92] DEBUG hls:	LOOKUP UP PERSISTENT FOR: GetParsedModule
2022-02-01 20:32:37.408843897 [ThreadId 131] INFO hls:	finish: GhcideCodeActions.getParsedModule (took 1.81s)
2022-02-01 20:32:37.408784798 [ThreadId 135] INFO hls:	finish: GhcideCodeActions.getParsedModule (took 1.81s)
2022-02-01 20:32:37.408905882 [ThreadId 91] DEBUG hls:	LOOKUP UP PERSISTENT FOR: GetParsedModule
2022-02-01 20:32:37.408920158 [ThreadId 136] INFO hls:	finish: Pragmas.GhcSession (took 1.81s)
2022-02-01 20:32:37.408972555 [ThreadId 134] INFO hls:	finish: RefineImports (took 1.81s)
2022-02-01 20:32:37.409002821 [ThreadId 121] INFO hls:	finish: importLens (took 1.81s)
2022-02-01 20:32:37.409078501 [ThreadId 133] INFO hls:	finish: RefineImports (took 1.81s)
2022-02-01 20:32:37.409183034 [ThreadId 132] INFO hls:	finish: QualifyImportedNames.TypeCheck (took 1.81s)
2022-02-01 20:32:37.409195447 [ThreadId 104] INFO hls:	finish: Pragmas.GhcSession (took 1.81s)
2022-02-01 20:32:37.409172194 [ThreadId 166] INFO hls:	finish: codeLens.TypeCheck (took 0.00s)
2022-02-01 20:32:37.409190668 [ThreadId 168] INFO hls:	finish: codeLens.TypeCheck (took 0.00s)
2022-02-01 20:32:37.409241031 [ThreadId 128] INFO hls:	finish: QualifyImportedNames.TypeCheck (took 1.81s)
2022-02-01 20:32:37.409249316 [ThreadId 165] INFO hls:	finish: codeLens.TypeCheck (took 0.00s)
2022-02-01 20:32:37.409298758 [ThreadId 92] INFO hls:	finish: Outline (took 1.81s)
2022-02-01 20:32:37.409332259 [ThreadId 101] DEBUG hls:	finish: C:GetHieAst:/home/dewi/tmp/haskellTut/my-project2/src/Lib.hs (took 1.81s)
2022-02-01 20:32:37.409369789 [ThreadId 94] DEBUG hls:	LOOKUP UP PERSISTENT FOR: MinimalImports
2022-02-01 20:32:37.409348169 [ThreadId 188] DEBUG hls:	LOOKUP UP PERSISTENT FOR: GetModSummaryWithoutTimestamps
2022-02-01 20:32:37.409341797 [ThreadId 91] INFO hls:	finish: Outline (took 1.81s)
2022-02-01 20:32:37.409382502 [ThreadId 130] DEBUG hls:	LOOKUP UP PERSISTENT FOR: MinimalImports
2022-02-01 20:32:37.409390497 [ThreadId 151] DEBUG hls:	LOOKUP UP PERSISTENT FOR: MinimalImports
2022-02-01 20:32:37.409384516 [ThreadId 99] DEBUG hls:	finish: C:GetHieAst:/home/dewi/tmp/haskellTut/my-project2/src/Lib.hs (took 1.81s)
2022-02-01 20:32:37.4094676 [ThreadId 176] INFO hls:	finish: codeLens.GetBindings (took 0.00s)
2022-02-01 20:32:37.409473881 [ThreadId 185] INFO hls:	finish: codeLens.GetBindings (took 0.00s)
2022-02-01 20:32:37.409471557 [ThreadId 193] INFO hls:	finish: codeLens.GetBindings (took 0.00s)
2022-02-01 20:32:37.409510068 [ThreadId 177] INFO hls:	finish: Pragmas.GetFileContents (took 0.00s)
2022-02-01 20:32:37.409507583 [ThreadId 172] INFO hls:	finish: Pragmas.GetFileContents (took 0.00s)
2022-02-01 20:32:37.409544251 [ThreadId 207] INFO hls:	finish: Pragmas.GetParsedModule (took 0.00s)
2022-02-01 20:32:37.40955973 [ThreadId 203] INFO hls:	finish: codeLens.GetGlobalBindingTypeSigs (took 0.00s)
2022-02-01 20:32:37.40954915 [ThreadId 208] INFO hls:	finish: Pragmas.GetParsedModule (took 0.00s)
2022-02-01 20:32:37.409562395 [ThreadId 202] INFO hls:	finish: codeLens.GetGlobalBindingTypeSigs (took 0.00s)
2022-02-01 20:32:37.409581149 [ThreadId 103] DEBUG hls:	LOOKUP UP PERSISTENT FOR: RefineImports
2022-02-01 20:32:37.409583834 [ThreadId 122] DEBUG hls:	LOOKUP UP PERSISTENT FOR: RefineImports
2022-02-01 20:32:37.409575429 [ThreadId 201] INFO hls:	finish: codeLens.GetGlobalBindingTypeSigs (took 0.00s)
2022-02-01 20:32:37.409629609 [ThreadId 152] DEBUG hls:	LOOKUP UP PERSISTENT FOR: RefineImports
2022-02-01 20:32:37.409677107 [ThreadId 188] DEBUG hls:	LOOKUP UP PERSISTENT FOR: False
2022-02-01 20:32:37.409672017 [ThreadId 94] INFO hls:	finish:  (took 1.82s)
2022-02-01 20:32:37.409706751 [ThreadId 151] INFO hls:	finish:  (took 1.80s)
2022-02-01 20:32:37.409690882 [ThreadId 130] INFO hls:	finish:  (took 1.82s)
2022-02-01 20:32:37.409757886 [ThreadId 103] INFO hls:	finish: RefineImports (took 1.82s)
2022-02-01 20:32:37.409772573 [ThreadId 122] INFO hls:	finish: RefineImports (took 1.82s)
2022-02-01 20:32:37.409783864 [ThreadId 152] INFO hls:	finish: RefineImports (took 1.80s)
2022-02-01 20:32:51.985110215 [ThreadId 225] DEBUG hls:	DocumentHighlight request at position 35:20 in file: /home/dewi/tmp/haskellTut/my-project2/src/Lib.hs
2022-02-01 20:32:51.985289636 [ThreadId 235] INFO hls:	finish: GhcideCodeActions.getParsedModule (took 0.00s)
2022-02-01 20:32:51.985421761 [ThreadId 236] INFO hls:	finish: importLens (took 0.00s)
2022-02-01 20:32:51.985428794 [ThreadId 238] INFO hls:	finish: RefineImports (took 0.00s)
2022-02-01 20:32:51.985456675 [ThreadId 237] INFO hls:	finish: Pragmas.GhcSession (took 0.00s)
2022-02-01 20:32:51.985470681 [ThreadId 240] DEBUG hls:	finish: C:GetHieAst:/home/dewi/tmp/haskellTut/my-project2/src/Lib.hs (took 0.00s)
2022-02-01 20:32:51.985497371 [ThreadId 241] INFO hls:	finish: Pragmas.GetFileContents (took 0.00s)
2022-02-01 20:32:51.985463528 [ThreadId 239] INFO hls:	finish: QualifyImportedNames.TypeCheck (took 0.00s)
2022-02-01 20:32:51.985522427 [ThreadId 243] INFO hls:	finish: Pragmas.GetParsedModule (took 0.00s)
2022-02-01 20:32:53.907996102 [ThreadId 259] INFO hls:	finish: importLens (took 0.00s)
2022-02-01 20:32:53.90797855 [ThreadId 256] INFO hls:	finish: GhcideCodeActions.getParsedModule (took 0.00s)
2022-02-01 20:32:53.908041807 [ThreadId 258] INFO hls:	finish: RefineImports (took 0.00s)
2022-02-01 20:32:53.908098101 [ThreadId 257] INFO hls:	finish: Pragmas.GhcSession (took 0.00s)
2022-02-01 20:32:53.908155998 [ThreadId 263] INFO hls:	finish: QualifyImportedNames.TypeCheck (took 0.00s)
2022-02-01 20:32:53.908173109 [ThreadId 262] DEBUG hls:	DocumentHighlight request at position 38:1 in file: /home/dewi/tmp/haskellTut/my-project2/src/Lib.hs
2022-02-01 20:32:53.908198546 [ThreadId 264] INFO hls:	finish: Pragmas.GetFileContents (took 0.00s)
2022-02-01 20:32:53.908222932 [ThreadId 270] DEBUG hls:	GhcIde.hover entered (ideLogger)
2022-02-01 20:32:53.908218283 [ThreadId 265] INFO hls:	finish: Pragmas.GetParsedModule (took 0.00s)
2022-02-01 20:32:53.908286199 [ThreadId 271] DEBUG hls:	finish: C:GetHieAst:/home/dewi/tmp/haskellTut/my-project2/src/Lib.hs (took 0.00s)
2022-02-01 20:32:53.908293071 [ThreadId 270] DEBUG hls:	Hover request at position 38:1 in file: /home/dewi/tmp/haskellTut/my-project2/src/Lib.hs
2022-02-01 20:32:53.908372648 [ThreadId 273] DEBUG hls:	finish: C:GetHieAst:/home/dewi/tmp/haskellTut/my-project2/src/Lib.hs (took 0.00s)
2022-02-01 20:32:55.189585207 [ThreadId 277] DEBUG hls:	Definition request at position 38:1 in file: /home/dewi/tmp/haskellTut/my-project2/src/Lib.hs
2022-02-01 20:32:55.189860075 [ThreadId 278] DEBUG hls:	finish: C:GetHieAst:/home/dewi/tmp/haskellTut/my-project2/src/Lib.hs (took 0.00s)
2022-02-01 20:32:55.702653561 [ThreadId 296] INFO hls:	finish: RefineImports (took 0.00s)
2022-02-01 20:32:55.702625389 [ThreadId 291] INFO hls:	finish: GhcideCodeActions.getParsedModule (took 0.00s)
2022-02-01 20:32:55.702687233 [ThreadId 293] INFO hls:	finish: QualifyImportedNames.TypeCheck (took 0.00s)
2022-02-01 20:32:55.702676152 [ThreadId 295] DEBUG hls:	DocumentHighlight request at position 38:1 in file: /home/dewi/tmp/haskellTut/my-project2/src/Lib.hs
2022-02-01 20:32:55.702852839 [ThreadId 298] INFO hls:	finish: Pragmas.GhcSession (took 0.00s)
2022-02-01 20:32:55.702855414 [ThreadId 297] INFO hls:	finish: importLens (took 0.00s)
2022-02-01 20:32:55.70294539 [ThreadId 302] INFO hls:	finish: Pragmas.GetParsedModule (took 0.00s)
2022-02-01 20:32:55.702920695 [ThreadId 300] INFO hls:	finish: Pragmas.GetFileContents (took 0.00s)
2022-02-01 20:32:55.70301001 [ThreadId 299] DEBUG hls:	finish: C:GetHieAst:/home/dewi/tmp/haskellTut/my-project2/src/Lib.hs (took 0.00s)
2022-02-01 20:33:11.663224218 [ThreadId 317] INFO hls:	finish: importLens (took 0.00s)
2022-02-01 20:33:11.663272928 [ThreadId 316] INFO hls:	finish: Pragmas.GhcSession (took 0.00s)
2022-02-01 20:33:11.663240368 [ThreadId 319] INFO hls:	finish: RefineImports (took 0.00s)
2022-02-01 20:33:11.663263551 [ThreadId 318] INFO hls:	finish: QualifyImportedNames.TypeCheck (took 0.00s)
2022-02-01 20:33:11.663242532 [ThreadId 315] INFO hls:	finish: GhcideCodeActions.getParsedModule (took 0.00s)
2022-02-01 20:33:11.66332224 [ThreadId 320] INFO hls:	finish: Pragmas.GetFileContents (took 0.00s)
2022-02-01 20:33:11.663345302 [ThreadId 321] INFO hls:	finish: Pragmas.GetParsedModule (took 0.00s)
2022-02-01 20:33:12.24109769 [ThreadId 326] DEBUG hls:	GhcIde.hover entered (ideLogger)
2022-02-01 20:33:12.24130858 [ThreadId 326] DEBUG hls:	Hover request at position 34:1 in file: /home/dewi/tmp/haskellTut/my-project2/src/Lib.hs
2022-02-01 20:33:12.241485136 [ThreadId 327] DEBUG hls:	finish: C:GetHieAst:/home/dewi/tmp/haskellTut/my-project2/src/Lib.hs (took 0.00s)
2022-02-01 20:33:12.24302308 [ThreadId 340] INFO hls:	finish: GhcideCodeActions.getParsedModule (took 0.00s)
2022-02-01 20:33:12.243085295 [ThreadId 343] INFO hls:	finish: importLens (took 0.00s)
2022-02-01 20:33:12.243058296 [ThreadId 341] INFO hls:	finish: QualifyImportedNames.TypeCheck (took 0.00s)
2022-02-01 20:33:12.243092639 [ThreadId 342] INFO hls:	finish: Pragmas.GhcSession (took 0.00s)
2022-02-01 20:33:12.243065589 [ThreadId 344] INFO hls:	finish: RefineImports (took 0.00s)
2022-02-01 20:33:12.243162138 [ThreadId 347] DEBUG hls:	DocumentHighlight request at position 34:1 in file: /home/dewi/tmp/haskellTut/my-project2/src/Lib.hs
2022-02-01 20:33:12.243265559 [ThreadId 349] INFO hls:	finish: Pragmas.GetParsedModule (took 0.00s)
2022-02-01 20:33:12.243214995 [ThreadId 348] INFO hls:	finish: Pragmas.GetFileContents (took 0.00s)
2022-02-01 20:33:12.243355255 [ThreadId 351] DEBUG hls:	finish: C:GetHieAst:/home/dewi/tmp/haskellTut/my-project2/src/Lib.hs (took 0.00s)
2022-02-01 20:33:13.03570032 [ThreadId 358] DEBUG hls:	DocumentHighlight request at position 34:11 in file: /home/dewi/tmp/haskellTut/my-project2/src/Lib.hs
2022-02-01 20:33:13.035939873 [ThreadId 369] INFO hls:	finish: importLens (took 0.00s)
2022-02-01 20:33:13.03596524 [ThreadId 372] INFO hls:	finish: RefineImports (took 0.00s)
2022-02-01 20:33:13.035967334 [ThreadId 371] INFO hls:	finish: QualifyImportedNames.TypeCheck (took 0.00s)
2022-02-01 20:33:13.03593269 [ThreadId 367] INFO hls:	finish: GhcideCodeActions.getParsedModule (took 0.00s)
2022-02-01 20:33:13.035998271 [ThreadId 368] DEBUG hls:	finish: C:GetHieAst:/home/dewi/tmp/haskellTut/my-project2/src/Lib.hs (took 0.00s)
2022-02-01 20:33:13.036032925 [ThreadId 370] INFO hls:	finish: Pragmas.GhcSession (took 0.00s)
2022-02-01 20:33:13.036125987 [ThreadId 375] INFO hls:	finish: Pragmas.GetParsedModule (took 0.00s)
2022-02-01 20:33:13.036114346 [ThreadId 374] INFO hls:	finish: Pragmas.GetFileContents (took 0.00s)
2022-02-01 20:33:13.03626812 [ThreadId 380] DEBUG hls:	GhcIde.hover entered (ideLogger)
2022-02-01 20:33:13.036367033 [ThreadId 380] DEBUG hls:	Hover request at position 34:11 in file: /home/dewi/tmp/haskellTut/my-project2/src/Lib.hs
2022-02-01 20:33:13.036536867 [ThreadId 381] DEBUG hls:	finish: C:GetHieAst:/home/dewi/tmp/haskellTut/my-project2/src/Lib.hs (took 0.00s)
2022-02-01 20:33:14.683835403 [ThreadId 385] DEBUG hls:	Definition request at position 34:11 in file: /home/dewi/tmp/haskellTut/my-project2/src/Lib.hs
2022-02-01 20:33:14.684081007 [ThreadId 386] DEBUG hls:	finish: C:GetHieAst:/home/dewi/tmp/haskellTut/my-project2/src/Lib.hs (took 0.00s)
2022-02-01 20:33:15.192396193 [ThreadId 391] DEBUG hls:	DocumentHighlight request at position 34:11 in file: /home/dewi/tmp/haskellTut/my-project2/src/Lib.hs
2022-02-01 20:33:15.192683074 [ThreadId 406] INFO hls:	finish: RefineImports (took 0.00s)
2022-02-01 20:33:15.192633142 [ThreadId 402] INFO hls:	finish: GhcideCodeActions.getParsedModule (took 0.00s)
2022-02-01 20:33:15.192735772 [ThreadId 407] INFO hls:	finish: QualifyImportedNames.TypeCheck (took 0.00s)
2022-02-01 20:33:15.192768382 [ThreadId 405] INFO hls:	finish: importLens (took 0.00s)
2022-02-01 20:33:15.192865782 [ThreadId 403] DEBUG hls:	finish: C:GetHieAst:/home/dewi/tmp/haskellTut/my-project2/src/Lib.hs (took 0.00s)
2022-02-01 20:33:15.192878776 [ThreadId 404] INFO hls:	finish: Pragmas.GhcSession (took 0.00s)
2022-02-01 20:33:15.192899034 [ThreadId 409] INFO hls:	finish: Pragmas.GetFileContents (took 0.00s)
2022-02-01 20:33:15.192963373 [ThreadId 410] INFO hls:	finish: Pragmas.GetParsedModule (took 0.00s)
2022-02-01 20:33:17.058274024 [ThreadId 414] DEBUG hls:	Definition request at position 32:11 in file: /home/dewi/tmp/haskellTut/my-project2/src/Lib.hs
2022-02-01 20:33:17.058555825 [ThreadId 415] DEBUG hls:	finish: C:GetHieAst:/home/dewi/tmp/haskellTut/my-project2/src/Lib.hs (took 0.00s)
2022-02-01 20:33:20.073586831 [ThreadId 428] INFO hls:	finish: GhcideCodeActions.getParsedModule (took 0.00s)
2022-02-01 20:33:20.073619993 [ThreadId 430] INFO hls:	finish: importLens (took 0.00s)
2022-02-01 20:33:20.073717704 [ThreadId 431] INFO hls:	finish: RefineImports (took 0.00s)
2022-02-01 20:33:20.073676487 [ThreadId 429] INFO hls:	finish: QualifyImportedNames.TypeCheck (took 0.00s)
2022-02-01 20:33:20.073732561 [ThreadId 432] INFO hls:	finish: Pragmas.GhcSession (took 0.00s)
2022-02-01 20:33:20.073766754 [ThreadId 433] INFO hls:	finish: Pragmas.GetFileContents (took 0.00s)
2022-02-01 20:33:20.073797521 [ThreadId 434] INFO hls:	finish: Pragmas.GetParsedModule (took 0.00s)
2022-02-01 20:33:20.658592888 [ThreadId 439] DEBUG hls:	GhcIde.hover entered (ideLogger)
2022-02-01 20:33:20.658807785 [ThreadId 439] DEBUG hls:	Hover request at position 28:1 in file: /home/dewi/tmp/haskellTut/my-project2/src/Lib.hs
2022-02-01 20:33:20.659035967 [ThreadId 440] DEBUG hls:	finish: C:GetHieAst:/home/dewi/tmp/haskellTut/my-project2/src/Lib.hs (took 0.00s)
2022-02-01 20:33:20.660247047 [ThreadId 453] INFO hls:	finish: GhcideCodeActions.getParsedModule (took 0.00s)
2022-02-01 20:33:20.660294986 [ThreadId 456] INFO hls:	finish: RefineImports (took 0.00s)
2022-02-01 20:33:20.660365947 [ThreadId 457] INFO hls:	finish: Pragmas.GhcSession (took 0.00s)
2022-02-01 20:33:20.660348545 [ThreadId 455] INFO hls:	finish: importLens (took 0.00s)
2022-02-01 20:33:20.660336803 [ThreadId 454] INFO hls:	finish: QualifyImportedNames.TypeCheck (took 0.00s)
2022-02-01 20:33:20.660433322 [ThreadId 461] INFO hls:	finish: Pragmas.GetFileContents (took 0.00s)
2022-02-01 20:33:20.660468827 [ThreadId 462] INFO hls:	finish: Pragmas.GetParsedModule (took 0.00s)
2022-02-01 20:33:20.660447268 [ThreadId 460] DEBUG hls:	DocumentHighlight request at position 28:1 in file: /home/dewi/tmp/haskellTut/my-project2/src/Lib.hs
2022-02-01 20:33:20.660655733 [ThreadId 464] DEBUG hls:	finish: C:GetHieAst:/home/dewi/tmp/haskellTut/my-project2/src/Lib.hs (took 0.00s)
2022-02-01 20:33:21.984952996 [ThreadId 468] DEBUG hls:	Definition request at position 26:23 in file: /home/dewi/tmp/haskellTut/my-project2/src/Lib.hs
2022-02-01 20:33:21.985218397 [ThreadId 469] DEBUG hls:	finish: C:GetHieAst:/home/dewi/tmp/haskellTut/my-project2/src/Lib.hs (took 0.00s)
2022-02-01 20:33:22.49875786 [ThreadId 475] DEBUG hls:	DocumentHighlight request at position 26:23 in file: /home/dewi/tmp/haskellTut/my-project2/src/Lib.hs
2022-02-01 20:33:22.498967659 [ThreadId 485] INFO hls:	finish: GhcideCodeActions.getParsedModule (took 0.00s)
2022-02-01 20:33:22.499071781 [ThreadId 487] DEBUG hls:	finish: C:GetHieAst:/home/dewi/tmp/haskellTut/my-project2/src/Lib.hs (took 0.00s)
2022-02-01 20:33:22.499111705 [ThreadId 486] INFO hls:	finish: Pragmas.GhcSession (took 0.00s)
2022-02-01 20:33:22.499177737 [ThreadId 489] INFO hls:	finish: importLens (took 0.00s)
2022-02-01 20:33:22.49919575 [ThreadId 490] INFO hls:	finish: QualifyImportedNames.TypeCheck (took 0.00s)
2022-02-01 20:33:22.499222891 [ThreadId 492] INFO hls:	finish: Pragmas.GetFileContents (took 0.00s)
2022-02-01 20:33:22.499251103 [ThreadId 498] DEBUG hls:	GhcIde.hover entered (ideLogger)
2022-02-01 20:33:22.499213323 [ThreadId 488] INFO hls:	finish: RefineImports (took 0.00s)
2022-02-01 20:33:22.499245843 [ThreadId 493] INFO hls:	finish: Pragmas.GetParsedModule (took 0.00s)
2022-02-01 20:33:22.499390982 [ThreadId 498] DEBUG hls:	Hover request at position 26:23 in file: /home/dewi/tmp/haskellTut/my-project2/src/Lib.hs
2022-02-01 20:33:22.499539406 [ThreadId 499] DEBUG hls:	finish: C:GetHieAst:/home/dewi/tmp/haskellTut/my-project2/src/Lib.hs (took 0.00s)
2022-02-01 20:33:34.821977968 [ThreadId 5] INFO hls:	Live bytes: 0.00MB Heap size: 0.00MB
2022-02-01 20:34:34.882780019 [ThreadId 5] INFO hls:	Live bytes: 0.00MB Heap size: 0.00MB

@drsooch
Copy link
Collaborator

drsooch commented Feb 1, 2022

Have you tried another editor?

Also, It seems odd to me that HLS is reporting 0MB of Live Bytes.

@eddiemundo
Copy link
Collaborator

It doesn't seem to load the component for some reason.

@eddiemundo
Copy link
Collaborator

eddiemundo commented Feb 1, 2022

Do you see an error anywhere like "ghcide compiled against <...> ghc but current using <..>" because otherwise it never gets to the part where it sets the cache directories for the .o .hi, and .hie files, or creates the HscEnvEq which I'm pretty sure breaks everything. If you don't see an error diagnostic then it silently does this which is interesting...

Also, I don't know how stack works I wonder if it's OK if ghc and cabal are not found when you do probe tools.

@jneira
Copy link
Member

jneira commented Feb 2, 2022

@dewijones92 i hope you dont mind i edited your comments to collapse logs, it can be done wrapping them with

<details> <summary> label </summary>

log

</details>

@jneira
Copy link
Member

jneira commented Feb 2, 2022

Do you see an error anywhere like "ghcide compiled against <...> ghc but current using <..>" because otherwise it never gets to the part where it sets the cache directories for the .o .hi, and .hie files, or creates the HscEnvEq which I'm pretty sure breaks everything. If you don't see an error diagnostic then it silently does this which is interesting...

yeah the ghcide compiled against GHC 9.2.1 but currently using 8.10.7 \nThis is unsupported, ghcide must be compiled with the same GHC version as the project. is present in logs

How did you install hls? letting the extension download it for you, via ghcup or installing it from source?

Also, I don't know how stack works I wonder if it's OK if ghc and cabal are not found when you do probe tools.

It is fine if you are loading a stack project

@dewijones92
Copy link
Author

Have you tried another editor?

Also, It seems odd to me that HLS is reporting 0MB of Live Bytes.

not yet
I am using spacemacs now btw

@dewijones92
Copy link
Author

@jneira
git cloning the repo and running
stack ./install.hs hls

dewi@pop-os:~/code/haskell-language-server$ /home/dewi/.local/bin/haskell-language-server-wrapper --probe-tools
haskell-language-server version: 1.6.1.0 (GHC: 9.2.1) (PATH: /home/dewi/.local/bin/haskell-language-server-wrapper) (GIT hash: 49abc74a06c8ed296d308aa7fd3e9646dcf30cb3)
Tool versions found on the $PATH
cabal:          Not found
stack:          2.7.3
ghc:            Not found

dewi@pop-os:~/code/haskell-language-server$

@jneira
Copy link
Member

jneira commented Feb 2, 2022

hmm stack ./install.hs hls installs by default the lastest ghc version available which is ghc-9.2.1, through stack-9.2.1.yaml
so you need to install the specific version for your current project which uses ghc-8.10.7 with stack ./install.hs hls-8.10.7
In general for each ghc you need you should so the stack ./install.hs hls-${ghcVersion}

Btw we deprecated the install script with #2491 (announced in the last release: https://github.com/haskell/haskell-language-server/releases/tag/1.6.0.0) and it will be removed soon, we will provide new instructions on how install hls from source without the script here: https://haskell-language-server.readthedocs.io/en/latest/installation.html#installation-from-source but they are not availble yet

This concrete error has an entry in the troubleshooting section: https://haskell-language-server.readthedocs.io/en/latest/troubleshooting.html#wrong-server-binary-being-used

@jneira jneira added type: support User support tickets, questions, help with setup etc. CI Continuous integration labels Feb 2, 2022
@dewijones92
Copy link
Author

@jneira
great that worked
many thanks 😄

@jneira jneira closed this as completed Feb 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build tool: stack CI Continuous integration type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc.. type: support User support tickets, questions, help with setup etc.
Projects
None yet
Development

No branches or pull requests

5 participants