Closed
Description
Subject of the issue
Module with TH code used for generating Persistent entities shows the following error:
Unexpected usage error\n/nix/store/nwsn18fysga1n5s0bj4jp4wfwvlbx8b1-glibc-2.30/lib/libpthread.so: symbol __write_nocancel version GLIBC_PRIVATE not defined in file libc.so.6 with link time reference
It is very similar to the issue that was once solved here (the same file with no changes) https://github.com/haskell/ghcide/issues/581
Your environment
- Output of
haskell-language-server --probe-tools
orhaskell-language-server-wrapper --probe-tools
haskell-language-server version: 0.4.0.0 (GHC: 8.8.2) (PATH: /home/superfabio/.vscode-server/data/User/globalStorage/haskell.haskell/haskell-language-server-0.4.0-linux-8.8.2) (GIT hash: 0a18edde24923251a148cbbc0ae993a6aac83b9c)
Tool versions found on the $PATH
cabal: Not found
stack: 2.3.1
ghc: 8.0.2
- Which lsp-client do you use
VS Code
- Describe your project
https://github.com/fabioluz/tripper - be aware it uses nix. If you don't have nix, it might take a bit to compile the first time.
Steps to reproduce
Wait for HLS to initialize.
Expected behaviour
No errors should be shown? Intellisense should work normally.
Actual behaviour
Errors are shown in the console. Intellisense is not working correctly.
Include debug information
Execute in the root of your project the command haskell-language-server --debug .
and paste the logs here:
Debug output:
haskell-language-server version: 0.4.0.0 (GHC: 8.8.2) (PATH: /home/superfabio/.vscode-server/data/User/globalStorage/haskell.haskell/haskell-language-server-0.4.0-linux-8.8.2) (GIT hash: 0a18edde24923251a148cbbc0ae993a6aac83b9c)
(haskell-language-server)Ghcide setup tester in /home/superfabio/projects/ride-rio.
Report bugs at https://github.com/haskell/haskell-language-server/issues
Tool versions found on the $PATH
cabal: Not found
stack: 2.3.1
ghc: 8.0.2
Step 1/4: Finding files to test in /home/superfabio/projects/ride-rio
Found 21 files
Step 2/4: Looking for hie.yaml files that control setup
Found 1 cradle
Step 3/4: Initializing the IDE
Step 4/4: Type checking the files
[INFO] Consulting the cradle for "/home/superfabio/projects/ride-rio/test/Spec.hs"
Output from setting up the cradle Cradle {cradleRootDir = "/home/superfabio/projects/ride-rio", cradleOptsProg = CradleAction: Stack}
> Using main module: 1. Package `tripper' component tripper:exe:tripper-exe with main-is file: /home/superfabio/projects/ride-rio/app/Main.hs
> The following GHC options are incompatible with GHCi and have not been passed to it: -threaded
> Configuring GHCi with the following packages: tripper
> /home/superfabio/projects/ride-rio/.stack-work/install/x86_64-linux-nix/1e40d600a21178f87759f864a4596beae8df2fd811b0ed288be21955b37339bd/8.8.2/pkgdb:/home/superfabio/.stack/snapshots/x86_64-linux-nix/1e40d600a21178f87759f864a4596beae8df2fd811b0ed288be21955b37339bd/8.8.2/pkgdb:/nix/store/i70c2gjy0kzhfzbwfsbkhj9d9n61hb7p-ghc-8.8.2/lib/ghc-8.8.2/package.conf.d
[INFO] Using interface files cache dir: /home/superfabio/.cache/ghcide/main-78a2e90bda2e3789e935afa855ae450410f41bf1
[INFO] Making new HscEnv[main]
[INFO] Consulting the cradle for "/home/superfabio/projects/ride-rio/Setup.hs"
Output from setting up the cradle Cradle {cradleRootDir = "/home/superfabio/projects/ride-rio", cradleOptsProg = CradleAction: Stack}
File: /home/superfabio/projects/ride-rio/test/Spec.hs
Hidden: no
Range: 1:8-1:10
Source: typecheck
Severity: DsError
Message: Not in scope: type constructor or class ‘IO’
File: /home/superfabio/projects/ride-rio/src/Tripper/Models.hs
Hidden: no
Range: 1:0-2:0
Source: typecheck
Severity: DsError
Message:
Unexpected usage error
/nix/store/nwsn18fysga1n5s0bj4jp4wfwvlbx8b1-glibc-2.30/lib/libpthread.so: symbol __write_nocancel
version GLIBC_PRIVATE not defined in file libc.so.6 with link time reference
> Using main module: 1. Package `tripper' component tripper:exe:tripper-exe with main-is file: /home/superfabio/projects/ride-rio/app/Main.hs
> The following GHC options are incompatible with GHCi and have not been passed to it: -threaded
> Configuring GHCi with the following packages: tripper
> /home/superfabio/projects/ride-rio/.stack-work/install/x86_64-linux-nix/1e40d600a21178f87759f864a4596beae8df2fd811b0ed288be21955b37339bd/8.8.2/pkgdb:/home/superfabio/.stack/snapshots/x86_64-linux-nix/1e40d600a21178f87759f864a4596beae8df2fd811b0ed288be21955b37339bd/8.8.2/pkgdb:/nix/store/i70c2gjy0kzhfzbwfsbkhj9d9n61hb7p-ghc-8.8.2/lib/ghc-8.8.2/package.conf.d
[INFO] Using interface files cache dir: /home/superfabio/.cache/ghcide/main-78a2e90bda2e3789e935afa855ae450410f41bf1
[INFO] Using interface files cache dir: /home/superfabio/.cache/ghcide/main-78a2e90bda2e3789e935afa855ae450410f41bf1
[INFO] Making new HscEnv[main,main]
File: /home/superfabio/projects/ride-rio/Setup.hs
Hidden: no
Range: 1:7-1:26
Source: not found
Severity: DsError
Message:
Could not load module ‘Distribution.Simple’
It is a member of the hidden package ‘Cabal-3.0.1.0’.
You can run ‘:set -package Cabal’ to expose it.
(Note: this unloads all the modules in the current scope.)
[INFO] finish: User TypeCheck (took 0.89s)
Files that failed:
* /home/superfabio/projects/ride-rio/Setup.hs
* /home/superfabio/projects/ride-rio/app/Main.hs
* /home/superfabio/projects/ride-rio/src/Tripper/Main.hs
* /home/superfabio/projects/ride-rio/src/Tripper/Models.hs
* /home/superfabio/projects/ride-rio/src/Tripper/Server.hs
* /home/superfabio/projects/ride-rio/src/Tripper/Feature/Auth/Server.hs
* /home/superfabio/projects/ride-rio/src/Tripper/Feature/Auth/Types.hs
* /home/superfabio/projects/ride-rio/src/Tripper/Feature/Client/DB.hs
* /home/superfabio/projects/ride-rio/src/Tripper/Feature/Client/Server.hs
* /home/superfabio/projects/ride-rio/src/Tripper/Feature/User/DB.hs
* /home/superfabio/projects/ride-rio/src/Tripper/Feature/User/Server.hs
* /home/superfabio/projects/ride-rio/src/Tripper/Feature/User/Types.hs
* /home/superfabio/projects/ride-rio/test/Spec.hs
Completed (8 files worked, 13 files failed)
haskell-language-server-0.4.0-linux-8.8.2: allocatestack.c:384: advise_stack_range: Assertion `freesize < size' failed.
Aborted
Paste the logs from the lsp-client, e.g. for VS Code
LSP logs:
[client] run command: "/home/superfabio/.vscode-server/data/User/globalStorage/haskell.haskell/haskell-language-server-0.4.0-linux-8.8.2 --lsp"
[client] debug command: "/home/superfabio/.vscode-server/data/User/globalStorage/haskell.haskell/haskell-language-server-0.4.0-linux-8.8.2 --lsp"
[client] server cwd: undefined
haskell-language-server version: 0.4.0.0 (GHC: 8.8.2) (PATH: /home/superfabio/.vscode-server/data/User/globalStorage/haskell.haskell/haskell-language-server-0.4.0-linux-8.8.2) (GIT hash: 0a18edde24923251a148cbbc0ae993a6aac83b9c)
Starting (haskell-language-server)LSP server...
with arguments: LspArguments {argLSP = True, argsCwd = Nothing, argFiles = [], argsShakeProfiling = Nothing, argsTesting = False, argsExamplePlugin = False, argsDebugOn = False, argsLogFile = Nothing, argsThreads = 0, argsProjectGhcVersion = False}
with plugins: [PluginId "brittany",PluginId "eval",PluginId "floskell",PluginId "fourmolu",PluginId "ghcide",PluginId "importLens",PluginId "ormolu",PluginId "pragmas",PluginId "retrie",PluginId "stylish-haskell"]
in directory: /home/superfabio/projects/ride-rio
If you are seeing this in a terminal, you probably should have run ghcide WITHOUT the --lsp option!
Started LSP server in 0.00s
2020-09-09 18:27:53.8879311 [ThreadId 25] - Opened text document: file:///home/superfabio/projects/ride-rio/src/Tripper/Feature/Shared/Error.hs
2020-09-09 18:27:53.8894477 [ThreadId 74] - Data.HashMap.Internal.(!): key not found
CallStack (from HasCallStack):
error, called at ./Data/HashMap/Internal.hs:753:16 in unordered-containers-0.2.12.0-ee238bdcbdb407634d69853d9c1f729d7eeed23222d0def9f5d9e1b764c5d32e:Data.HashMap.Internal
!, called at src/Development/IDE/Import/DependencyInformation.hs:107:40 in ghcide-0.2.0-inplace:Development.IDE.Import.DependencyInformation
2020-09-09 18:27:53.8900381 [ThreadId 77] - Consulting the cradle for "/home/superfabio/projects/ride-rio/src/Tripper/Feature/Shared/Error.hs"
Output from setting up the cradle Cradle {cradleRootDir = "/home/superfabio/projects/ride-rio", cradleOptsProg = CradleAction: Stack}
2020-09-09 18:27:53.9529617 [ThreadId 25] - Closed text document: file:///home/superfabio/projects/ride-rio/src/Tripper/Feature/Shared/Error.hs
2020-09-09 18:27:53.9977033 [ThreadId 25] - Opened text document: file:///home/superfabio/projects/ride-rio/src/Tripper/Feature/Shared/Types.hs
2020-09-09 18:27:54.8399421 [ThreadId 25] - Closed text document: file:///home/superfabio/projects/ride-rio/src/Tripper/Feature/Shared/Types.hs
2020-09-09 18:27:54.8720528 [ThreadId 25] - Opened text document: file:///home/superfabio/projects/ride-rio/src/Tripper/Feature/User/Server.hs
> Using main module: 1. Package `tripper' component tripper:exe:tripper-exe with main-is file: /home/superfabio/projects/ride-rio/app/Main.hs
> The following GHC options are incompatible with GHCi and have not been passed to it: -threaded
> Configuring GHCi with the following packages: tripper
> /home/superfabio/projects/ride-rio/.stack-work/install/x86_64-linux-nix/1e40d600a21178f87759f864a4596beae8df2fd811b0ed288be21955b37339bd/8.8.2/pkgdb:/home/superfabio/.stack/snapshots/x86_64-linux-nix/1e40d600a21178f87759f864a4596beae8df2fd811b0ed288be21955b37339bd/8.8.2/pkgdb:/nix/store/i70c2gjy0kzhfzbwfsbkhj9d9n61hb7p-ghc-8.8.2/lib/ghc-8.8.2/package.conf.d
2020-09-09 18:27:59.060296 [ThreadId 77] - Using interface files cache dir: /home/superfabio/.cache/ghcide/main-78a2e90bda2e3789e935afa855ae450410f41bf1
2020-09-09 18:27:59.060608 [ThreadId 77] - Making new HscEnv[main]
2020-09-09 18:27:59.144848 [ThreadId 256] - finish: CodeAction (took 0.00s)
2020-09-09 18:27:59.1457237 [ThreadId 265] - Data.HashMap.Internal.(!): key not found
CallStack (from HasCallStack):
error, called at ./Data/HashMap/Internal.hs:753:16 in unordered-containers-0.2.12.0-ee238bdcbdb407634d69853d9c1f729d7eeed23222d0def9f5d9e1b764c5d32e:Data.HashMap.Internal
!, called at src/Development/IDE/Import/DependencyInformation.hs:107:40 in ghcide-0.2.0-inplace:Development.IDE.Import.DependencyInformation
2020-09-09 18:27:59.1459168 [ThreadId 265] - Data.HashMap.Internal.(!): key not found
CallStack (from HasCallStack):
error, called at ./Data/HashMap/Internal.hs:753:16 in unordered-containers-0.2.12.0-ee238bdcbdb407634d69853d9c1f729d7eeed23222d0def9f5d9e1b764c5d32e:Data.HashMap.Internal
!, called at src/Development/IDE/Import/DependencyInformation.hs:107:40 in ghcide-0.2.0-inplace:Development.IDE.Import.DependencyInformation
2020-09-09 18:27:59.1493324 [ThreadId 314] - finish: CodeAction (took 0.00s)
2020-09-09 18:27:59.1496005 [ThreadId 314] - finish: CodeAction (took 0.00s)
2020-09-09 18:27:59.1498051 [ThreadId 314] - Data.HashMap.Internal.(!): key not found
CallStack (from HasCallStack):
error, called at ./Data/HashMap/Internal.hs:753:16 in unordered-containers-0.2.12.0-ee238bdcbdb407634d69853d9c1f729d7eeed23222d0def9f5d9e1b764c5d32e:Data.HashMap.Internal
!, called at src/Development/IDE/Import/DependencyInformation.hs:107:40 in ghcide-0.2.0-inplace:Development.IDE.Import.DependencyInformation
2020-09-09 18:27:59.1499546 [ThreadId 314] - Data.HashMap.Internal.(!): key not found
CallStack (from HasCallStack):
error, called at ./Data/HashMap/Internal.hs:753:16 in unordered-containers-0.2.12.0-ee238bdcbdb407634d69853d9c1f729d7eeed23222d0def9f5d9e1b764c5d32e:Data.HashMap.Internal
!, called at src/Development/IDE/Import/DependencyInformation.hs:107:40 in ghcide-0.2.0-inplace:Development.IDE.Import.DependencyInformation
2020-09-09 18:27:59.1501554 [ThreadId 314] - finish: CodeAction (took 0.00s)