haskell / haskell-language-server

Official haskell ide support via language server (LSP). Successor of ghcide & haskell-ide-engine.
Apache License 2.0
2.71k stars 368 forks source link

GHC Mismatch error on default install #254

Closed aschmois closed 4 years ago

aschmois commented 4 years ago

Details

Steps taken

Cleaned out all of ghc and stack and existing haskell binaries and reinstalled everything with the same result.

Error:

After letting the extension load I get "problems" on 11 random files with

{
    "resource": "/home/user/projects/work-project/library/some/foo/Bar.hs",
    "owner": "Haskell (work-project)",
    "severity": 8,
    "message": "Installation error: unable to load package `ghc-prim-0.5.3'",
    "source": "typecheck",
    "startLineNumber": 1,
    "startColumn": 1,
    "endLineNumber": 2,
    "endColumn": 1
}

Extension output:

[client] run command: "/home/user/.vscode-server/data/User/globalStorage/alanz.vscode-hie-server/haskell-language-server-0.2.1-linux-8.8.3 --lsp"
[client] debug command: "/home/user/.vscode-server/data/User/globalStorage/alanz.vscode-hie-server/haskell-language-server-0.2.1-linux-8.8.3 --lsp"
[client] server cwd: undefined
haskell-language-server version: 0.2.1.0 (GHC: 8.8.3) (PATH: /home/user/.vscode-server/data/User/globalStorage/alanz.vscode-hie-server/haskell-language-server-0.2.1-linux-8.8.3) (GIT hash: e8812c18d2be311c6b52545a0dc2b1408f8fa4b2)
Starting (haskell-language-server)LSP server...
  with arguments: Arguments {argLSP = True, argsCwd = Nothing, argFiles = [], argsVersion = False, argsShakeProfiling = Nothing, argsTesting = False, argsExamplePlugin = False, argsDebugOn = False, argsLogFile = Nothing, argsThreads = 0, argsProjectGhcVersion = False}
  with plugins: [PluginId "eval",PluginId "floskell",PluginId "ghcide",PluginId "ormolu",PluginId "pragmas",PluginId "stylish-haskell"]
  in directory: /home/user/projects/work-project
If you are seeing this in a terminal, you probably should have run ghcide WITHOUT the --lsp option!
 Started LSP server in 0.02s
2020-07-24 17:25:51.690812281 [ThreadId 21] - Opened text document: file:///home/user/projects/work-project/library/Action/Action.hs
Data.HashMap.Base.(!): key not found
CallStack (from HasCallStack):
  error, called at ./Data/HashMap/Base.hs:733:16 in unordered-containers-0.2.11.0-fad0aad3e3deab0594b70513441a5eef969fad7c39bde432b7beca5a0ea273f2:Data.HashMap.Base
  !, called at src/Development/IDE/Import/DependencyInformation.hs:107:40 in ghcide-0.2.0-inplace:Development.IDE.Import.DependencyInformation
2020-07-24 17:25:51.692437351 [ThreadId 63] - Consulting the cradle for "/home/user/projects/work-project/library/Action/Action.hs"
Output from setting up the cradle Cradle {cradleRootDir = "/home/user/projects/work-project", cradleOptsProg = CradleAction: Stack}
[Error - 5:25:51 PM] haskell-lsp:configuration parse error. NotificationMessage {_jsonrpc = "2.0", _method = WorkspaceDidChangeConfiguration, _params = DidChangeConfigurationParams {_settings = Object (fromList [("haskell",Object (fromList [("logFile",String ""),("hlintOn",Bool True),("formatOnImportOn",Bool True),("enable",Bool True),("indentationRules",Object (fromList [("enabled",Bool False)])),("liquidOn",Bool False),("languageServerVariant",String "haskell-language-server"),("serverExecutablePath",String ""),("diagnosticsOnChange",Bool True),("completionSnippetsOn",Bool True),("maxNumberOfProblems",Number 100.0),("formattingProvider",String "brittany"),("trace",Object (fromList [("server",String "off")]))]))])}} "key \"languageServerHaskell\" not found"
> Configuring GHCi with the following packages: work-project
> /home/user/projects/work-project/.stack-work/install/x86_64-linux-tinfo6/3ea20d7672e8fbf87f04e1a3aaf2eadc7ca2fa7f104aac50f76a9bb8664b27ff/8.8.3/pkgdb:/home/user/.stack/snapshots/x86_64-linux-tinfo6/3ea20d7672e8fbf87f04e1a3aaf2eadc7ca2fa7f104aac50f76a9bb8664b27ff/8.8.3/pkgdb:/home/user/.stack/programs/x86_64-linux/ghc-tinfo6-8.8.3/lib/ghc-8.8.3/package.conf.d
2020-07-24 17:26:09.290541153 [ThreadId 63] - Using interface files cache dir: /home/user/.cache/ghcide/main-1071c4a8018389024d51dabf6a57567030682bc3
2020-07-24 17:26:09.290977919 [ThreadId 63] - Making new HscEnv[main]
2020-07-24 17:26:12.174854595 [ThreadId 144] - finish: CodeAction (took 0.00s)
2020-07-24 17:26:14.017539293 [ThreadId 7831] - finish: CodeAction:PackageExports (took 1.84s)
2020-07-24 17:26:14.017718205 [ThreadId 7834] - Plugin.makeCodeLens (ideLogger)
haskell-language-server-0.2.1-linux-8.8.3: /home/user/.stack/programs/x86_64-linux/ghc-tinfo6-8.8.3/lib/ghc-8.8.3/ghc-prim-0.5.3/HSghc-prim-0.5.3.o: unknown symbol `exp'
haskell-language-server-0.2.1-linux-8.8.3: /home/user/.stack/programs/x86_64-linux/ghc-tinfo6-8.8.3/lib/ghc-8.8.3/ghc-prim-0.5.3/HSghc-prim-0.5.3.o: unknown symbol `exp'
haskell-language-server-0.2.1-linux-8.8.3: /home/user/.stack/programs/x86_64-linux/ghc-tinfo6-8.8.3/lib/ghc-8.8.3/ghc-prim-0.5.3/HSghc-prim-0.5.3.o: unknown symbol `exp'
haskell-language-server-0.2.1-linux-8.8.3: /home/user/.stack/programs/x86_64-linux/ghc-tinfo6-8.8.3/lib/ghc-8.8.3/ghc-prim-0.5.3/HSghc-prim-0.5.3.o: unknown symbol `exp'
haskell-language-server-0.2.1-linux-8.8.3: /home/user/.stack/programs/x86_64-linux/ghc-tinfo6-8.8.3/lib/ghc-8.8.3/ghc-prim-0.5.3/HSghc-prim-0.5.3.o: unknown symbol `exp'
haskell-language-server-0.2.1-linux-8.8.3: /home/user/.stack/programs/x86_64-linux/ghc-tinfo6-8.8.3/lib/ghc-8.8.3/ghc-prim-0.5.3/HSghc-prim-0.5.3.o: unknown symbol `exp'
haskell-language-server-0.2.1-linux-8.8.3: /home/user/.stack/programs/x86_64-linux/ghc-tinfo6-8.8.3/lib/ghc-8.8.3/ghc-prim-0.5.3/HSghc-prim-0.5.3.o: unknown symbol `exp'
haskell-language-server-0.2.1-linux-8.8.3: /home/user/.stack/programs/x86_64-linux/ghc-tinfo6-8.8.3/lib/ghc-8.8.3/ghc-prim-0.5.3/HSghc-prim-0.5.3.o: unknown symbol `exp'
haskell-language-server-0.2.1-linux-8.8.3: /home/user/.stack/programs/x86_64-linux/ghc-tinfo6-8.8.3/lib/ghc-8.8.3/ghc-prim-0.5.3/HSghc-prim-0.5.3.o: unknown symbol `exp'
haskell-language-server-0.2.1-linux-8.8.3: /home/user/.stack/programs/x86_64-linux/ghc-tinfo6-8.8.3/lib/ghc-8.8.3/ghc-prim-0.5.3/HSghc-prim-0.5.3.o: unknown symbol `exp'
haskell-language-server-0.2.1-linux-8.8.3: /home/user/.stack/programs/x86_64-linux/ghc-tinfo6-8.8.3/lib/ghc-8.8.3/ghc-prim-0.5.3/HSghc-prim-0.5.3.o: unknown symbol `exp'
2020-07-24 17:26:31.982351492 [ThreadId 25303] - finish: codeLens (took 17.96s)
2020-07-24 17:26:31.982836488 [ThreadId 25306] - GhcIde.hover entered (ideLogger)
2020-07-24 17:26:31.982929292 [ThreadId 25306] - Hover request at position 18:27 in file: /home/user/projects/work-project/library/Action/Action.hs
jneira commented 4 years ago

does the title of the issue continue being relevant? afaics there is no ghc mismatch...

aschmois commented 4 years ago

The linked issue does duplicate it. Closing since it's tracked there now.