Skip to content
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

Template Haskell + HLS = Unexpected usage error ld-linux-x86-64.so.2: cannot open shared object file #1841

Closed
turion opened this issue May 18, 2021 · 6 comments
Labels
can-workaround component: ghcide type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..

Comments

@turion
Copy link

turion commented May 18, 2021

Your environment

Output of haskell-language-server --probe-tools or haskell-language-server-wrapper --probe-tools:
Not applicable, vscode extension installs it itself

Which OS do you use: NixOS

Which lsp-client do you use: VS Codium

Describe your project (alternative: link to the project): Reproduceable with the MWE https://github.com/FinleyMcIlwaine/hls-issue (contains hie.yaml, cabal file, cabal project)

Steps to reproduce

Create a typechecking file using template haskell

Expected behaviour

No error

Actual behaviour

On the first line, HLS says there is a typecheck error:

Unexpected usage error
ld-linux-x86-64.so.2: cannot open shared object file

Other modules dependent on this file don't get HLS started. Modules not dependent on this file work without problems.

Include debug information

Note: I've manually installed a haskell-language-server version 1.0.0.0, but not sure whether that's the same as is installed via the VSCode extension.

Execute in the root of your project the command haskell-language-server --debug . and paste the logs here:

Debug output:
haskell-language-server version: 1.0.0.0 (GHC: 8.10.4) (PATH: /nix/store/knymxg4yqwmy930flxx2pp54v7w15in0-haskell-language-server-1.0.0.0/bin/haskell-language-server)
ghcide setup tester in /home/turion/haskell/hls-issue.
Report bugs at https://github.com/haskell/haskell-language-server/issues

Step 1/4: Finding files to test in /home/turion/haskell/hls-issue
Found 1 files

Step 2/4: Looking for hie.yaml files that control setup
Found 1 cradle
  (/home/turion/haskell/hls-issue/hie.yaml)

Step 3/4: Initializing the IDE

Step 4/4: Type checking the files
2021-05-18 17:46:23.24779134 [ThreadId 4] DEBUG hls:    Set files of interest to: [(NormalizedFilePath "/home/turion/haskell/hls-issue/src/Repro.hs",OnDisk)]
2021-05-18 17:46:23.24899788 [ThreadId 42] INFO hls:    File:     
Hidden:   no
Range:    1:1-2:1
Source:   compiler
Severity: DsError
Message: 
  Internal error, getIdeGlobalExtras, no entry for IdeConfigurationVar
  CallStack (from HasCallStack):
  errorIO, called at src/Development/IDE/Core/Shake.hs:284:20 in
  ghcide-1.0.0.0-CCU8FQdWy7xEQp1wT8WvcN:Development.IDE.Core.Shake
2021-05-18 17:46:23.249343535 [ThreadId 46] INFO hls:   Consulting the cradle for "src/Repro.hs"
Output from setting up the cradle Cradle {cradleRootDir = "/home/turion/haskell/hls-issue", cradleOptsProg = CradleAction: Cabal}
> Build profile: -w ghc-8.10.4 -O1
> In order, the following will be built (use -v for more details):
>  - hls-issue-0.1.0.0 (lib) (first run)
> Preprocessing library for hls-issue-0.1.0.0..
2021-05-18 17:46:24.901550869 [ThreadId 46] DEBUG hls:  Session loading result: Right (ComponentOptions {componentOptions = ["-fbuilding-cabal-package","-O0","-outputdir","/home/turion/.cache/hie-bios/dist-hls-issue-b63992aa2ee6c00928f07f3594b4cfc6/build/x86_64-linux/ghc-8.10.4/hls-issue-0.1.0.0/build","-odir","/home/turion/.cache/hie-bios/dist-hls-issue-b63992aa2ee6c00928f07f3594b4cfc6/build/x86_64-linux/ghc-8.10.4/hls-issue-0.1.0.0/build","-hidir","/home/turion/.cache/hie-bios/dist-hls-issue-b63992aa2ee6c00928f07f3594b4cfc6/build/x86_64-linux/ghc-8.10.4/hls-issue-0.1.0.0/build","-stubdir","/home/turion/.cache/hie-bios/dist-hls-issue-b63992aa2ee6c00928f07f3594b4cfc6/build/x86_64-linux/ghc-8.10.4/hls-issue-0.1.0.0/build","-i","-i/home/turion/.cache/hie-bios/dist-hls-issue-b63992aa2ee6c00928f07f3594b4cfc6/build/x86_64-linux/ghc-8.10.4/hls-issue-0.1.0.0/build","-isrc","-i/home/turion/.cache/hie-bios/dist-hls-issue-b63992aa2ee6c00928f07f3594b4cfc6/build/x86_64-linux/ghc-8.10.4/hls-issue-0.1.0.0/build/autogen","-i/home/turion/.cache/hie-bios/dist-hls-issue-b63992aa2ee6c00928f07f3594b4cfc6/build/x86_64-linux/ghc-8.10.4/hls-issue-0.1.0.0/build/global-autogen","-I/home/turion/.cache/hie-bios/dist-hls-issue-b63992aa2ee6c00928f07f3594b4cfc6/build/x86_64-linux/ghc-8.10.4/hls-issue-0.1.0.0/build/autogen","-I/home/turion/.cache/hie-bios/dist-hls-issue-b63992aa2ee6c00928f07f3594b4cfc6/build/x86_64-linux/ghc-8.10.4/hls-issue-0.1.0.0/build/global-autogen","-I/home/turion/.cache/hie-bios/dist-hls-issue-b63992aa2ee6c00928f07f3594b4cfc6/build/x86_64-linux/ghc-8.10.4/hls-issue-0.1.0.0/build","-optP-include","-optP/home/turion/.cache/hie-bios/dist-hls-issue-b63992aa2ee6c00928f07f3594b4cfc6/build/x86_64-linux/ghc-8.10.4/hls-issue-0.1.0.0/build/autogen/cabal_macros.h","-this-unit-id","hls-issue-0.1.0.0-inplace","-hide-all-packages","-Wmissing-home-modules","-no-user-package-db","-package-db","/home/turion/.cabal/store/ghc-8.10.4/package.db","-package-db","/home/turion/.cache/hie-bios/dist-hls-issue-b63992aa2ee6c00928f07f3594b4cfc6/packagedb/ghc-8.10.4","-package-db","/home/turion/.cache/hie-bios/dist-hls-issue-b63992aa2ee6c00928f07f3594b4cfc6/build/x86_64-linux/ghc-8.10.4/hls-issue-0.1.0.0/package.conf.inplace","-package-id","base-4.14.1.0","-package-id","plutus-contract-0.1.0.0-ac5d137f1660289873056cb75cc0097f7782a355a67483562efb1886a8a50e02","-package-id","plutus-core-0.1.0.0-2864b3043f7f735f6e13bfcd289449746cfb8cd575a1c4fe77397d1b5b8d324f","-package-id","plutus-ledger-0.1.0.0-08c3f68864b34a9484c6cdce91f9163f22422fc4a4b2a5e02c9c4f6cf8ecac84","-package-id","plutus-tx-0.1.0.0-7ce16a5c9e04cb5a6750a4adec96bea2d1ac4a8869b17682a59f8aef56e9a08c","-package-id","plutus-tx-plugin-0.1.0.0-2f4d319d823457612a1b3c270a10648a290b00e8389ad753849f0e33dd40fd23","-package-id","template-haskell-2.16.0.0","-XHaskell2010","-XExplicitForAll","-XScopedTypeVariables","-XDeriveGeneric","-XStandaloneDeriving","-XDeriveLift","-XGeneralizedNewtypeDeriving","-XDeriveFunctor","-XDeriveFoldable","-XDeriveTraversable","-XMultiParamTypeClasses","Repro","-Wall","-Wnoncanonical-monad-instances","-Wincomplete-uni-patterns","-Wincomplete-record-updates","-Wredundant-constraints","-Widentities","-fobject-code","-fno-ignore-interface-pragmas","-fno-omit-interface-pragmas","-hide-all-packages"], componentRoot = "/home/turion/haskell/hls-issue", componentDependencies = ["hls-issue.cabal","cabal.project","cabal.project.local"]},"/nix/store/54780sb2s8njy5czybcz82izkjaqgjbm-ghc-8.10.4-with-packages/lib/ghc-8.10.4")
2021-05-18 17:46:25.013983298 [ThreadId 46] INFO hls:   Using interface files cache dir: /home/turion/.cache/ghcide/hls-issue-0.1.0.0-inplace-7353435cb717f78ee2d073f4bded31ad556fc855
2021-05-18 17:46:25.014297994 [ThreadId 46] INFO hls:   Making new HscEnv[hls-issue-0.1.0.0-inplace]
2021-05-18 17:46:25.044072158 [ThreadId 46] DEBUG hls:  New Component Cache HscEnvEq: (([],Just HscEnvEq 16),fromList [("/home/turion/haskell/hls-issue/hie.yaml",Just 2021-05-18 15:22:59.819508105 UTC),("cabal.project",Just 2021-05-18 15:22:59.819508105 UTC),("cabal.project.local",Nothing),("hls-issue.cabal",Just 2021-05-18 15:22:59.819508105 UTC)])
2021-05-18 17:46:25.047506957 [ThreadId 46] DEBUG hls:  Known files updated: fromList [(TargetFile NormalizedFilePath "/home/turion/haskell/hls-issue/src/Repro.hs",["/home/turion/haskell/hls-issue/src/Repro.hs"]),(TargetModule Repro,["/home/turion/haskell/hls-issue/src/Repro.hs"])]
2021-05-18 17:46:25.047825678 [ThreadId 18] DEBUG hls:  Finishing build session(exception: AsyncCancelled)
2021-05-18 17:46:25.04796426 [ThreadId 46] DEBUG hls:   Restarting build session (aborting the previous one took 0.00s)
2021-05-18 17:46:26.511282354 [ThreadId 165] INFO hls:  finish: User TypeCheck (took 1.46s)
2021-05-18 17:46:26.513485744 [ThreadId 176] INFO hls:  finish: GetHie (took 0.00s)

Completed (1 file worked, 0 files failed)
2021-05-18 17:46:28.322719829 [ThreadId 181] INFO hls:  finish: GenerateCore (took 1.81s)

Paste the logs from the lsp-client, e.g. for VS Code

LSP logs:
2021-05-18 17:45:18.268328598 [ThreadId 5] DEBUG hls:	Received exit message
2021-05-18 17:45:18.269038767 [ThreadId 885] DEBUG hls:	Finishing build session(exception: AsyncCancelled)
haskell-language-server version: 1.1.0.0 (GHC: 8.10.4) (PATH: /home/turion/.config/VSCodium/User/globalStorage/haskell.haskell/haskell-language-server-1.1.0-linux-8.10.4) (GIT hash: f1c096927186a93d8e3ccd4fe8385cc1b070350b)
Starting (haskell-language-server)LSP server...
  with arguments: GhcideArguments {argsCommand = LSP, argsCwd = Nothing, argsShakeProfiling = Nothing, argsTesting = False, argsExamplePlugin = False, argsDebugOn = True, argsLogFile = Nothing, argsThreads = 0, argsProjectGhcVersion = False}
  with plugins: [PluginId "pragmas",PluginId "floskell",PluginId "fourmolu",PluginId "tactics",PluginId "ormolu",PluginId "stylish-haskell",PluginId "retrie",PluginId "brittany",PluginId "class",PluginId "haddockComments",PluginId "eval",PluginId "importLens",PluginId "moduleName",PluginId "hlint",PluginId "splice",PluginId "ghcide-hover-and-symbols",PluginId "ghcide-code-actions",PluginId "ghcide-completions",PluginId "ghcide-type-lenses",PluginId "ghcide-core"]
  in directory: /home/turion/haskell
 Starting LSP server...
If you are seeing this in a terminal, you probably should have run WITHOUT the --lsp option!
Started LSP server in 0.00s
setInitialDynFlags cradle: Cradle {cradleRootDir = "/home/turion/haskell", cradleOptsProg = CradleAction: Default}
2021-05-18 17:45:18.411831969 [ThreadId 5] INFO hls:	Registering ide configuration: IdeConfiguration {workspaceFolders = fromList [NormalizedUri 8311908480094108320 "file:///home/turion/haskell/haskell-language-server",NormalizedUri 1647981303636722738 "file:///home/turion/enigmanix",NormalizedUri (-4091763788783882236) "file:///home/turion/haskell",NormalizedUri 5002348294021187608 "file:///home/turion/nix/nixpkgs"], clientSettings = hashed Nothing}
2021-05-18 17:45:18.414276325 [ThreadId 37] DEBUG hls:	Configuration changed: Object (fromList [("haskell",Object (fromList [("completionSnippetsOn",Bool True),("diagnosticsOnChange",Bool True),("formatOnImportOn",Bool True),("formattingProvider",String "ormolu"),("hlintOn",Bool True),("indentationRules",Object (fromList [("enabled",Bool True)])),("languageServerVariant",String "haskell-language-server"),("liquidOn",Bool True),("logFile",String ""),("maxNumberOfProblems",Number 100.0),("serverExecutablePath",String ""),("trace",Object (fromList [("server",String "messages")])),("updateBehavior",String "keep-up-to-date")]))])
2021-05-18 17:45:18.415885224 [ThreadId 22] DEBUG hls:	Finishing build session(exception: AsyncCancelled)
2021-05-18 17:45:18.41604317 [ThreadId 37] DEBUG hls:	Restarting build session (aborting the previous one took 0.00s)
2021-05-18 17:45:18.41658123 [ThreadId 37] DEBUG hls:	Set files of interest to: [(NormalizedFilePath "/home/turion/haskell/hls-issue/src/Repro.hs",Modified {firstOpen = True})]
2021-05-18 17:45:18.416884427 [ThreadId 42] DEBUG hls:	Finishing build session(exception: AsyncCancelled)
2021-05-18 17:45:18.416977588 [ThreadId 37] DEBUG hls:	Restarting build session (aborting the previous one took 0.00s)
2021-05-18 17:45:18.417224648 [ThreadId 37] DEBUG hls:	Opened text document: file:///home/turion/haskell/hls-issue/src/Repro.hs
2021-05-18 17:45:18.417725567 [ThreadId 96] DEBUG hls:	hlint:getIdeas:file:NormalizedFilePath "/home/turion/haskell/hls-issue/src/Repro.hs"
2021-05-18 17:45:18.418339668 [ThreadId 105] INFO hls:	Consulting the cradle for "hls-issue/src/Repro.hs"
Output from setting up the cradle Cradle {cradleRootDir = "/home/turion/haskell/hls-issue", cradleOptsProg = CradleAction: Cabal}
> Build profile: -w ghc-8.10.4 -O1
> In order, the following will be built (use -v for more details):
>  - hls-issue-0.1.0.0 (lib) (first run)
> Preprocessing library for hls-issue-0.1.0.0..
2021-05-18 17:45:19.270519837 [ThreadId 105] DEBUG hls:	Session loading result: Right (ComponentOptions {componentOptions = ["-fbuilding-cabal-package","-O0","-outputdir","/home/turion/.cache/hie-bios/dist-hls-issue-b63992aa2ee6c00928f07f3594b4cfc6/build/x86_64-linux/ghc-8.10.4/hls-issue-0.1.0.0/build","-odir","/home/turion/.cache/hie-bios/dist-hls-issue-b63992aa2ee6c00928f07f3594b4cfc6/build/x86_64-linux/ghc-8.10.4/hls-issue-0.1.0.0/build","-hidir","/home/turion/.cache/hie-bios/dist-hls-issue-b63992aa2ee6c00928f07f3594b4cfc6/build/x86_64-linux/ghc-8.10.4/hls-issue-0.1.0.0/build","-stubdir","/home/turion/.cache/hie-bios/dist-hls-issue-b63992aa2ee6c00928f07f3594b4cfc6/build/x86_64-linux/ghc-8.10.4/hls-issue-0.1.0.0/build","-i","-i/home/turion/.cache/hie-bios/dist-hls-issue-b63992aa2ee6c00928f07f3594b4cfc6/build/x86_64-linux/ghc-8.10.4/hls-issue-0.1.0.0/build","-isrc","-i/home/turion/.cache/hie-bios/dist-hls-issue-b63992aa2ee6c00928f07f3594b4cfc6/build/x86_64-linux/ghc-8.10.4/hls-issue-0.1.0.0/build/autogen","-i/home/turion/.cache/hie-bios/dist-hls-issue-b63992aa2ee6c00928f07f3594b4cfc6/build/x86_64-linux/ghc-8.10.4/hls-issue-0.1.0.0/build/global-autogen","-I/home/turion/.cache/hie-bios/dist-hls-issue-b63992aa2ee6c00928f07f3594b4cfc6/build/x86_64-linux/ghc-8.10.4/hls-issue-0.1.0.0/build/autogen","-I/home/turion/.cache/hie-bios/dist-hls-issue-b63992aa2ee6c00928f07f3594b4cfc6/build/x86_64-linux/ghc-8.10.4/hls-issue-0.1.0.0/build/global-autogen","-I/home/turion/.cache/hie-bios/dist-hls-issue-b63992aa2ee6c00928f07f3594b4cfc6/build/x86_64-linux/ghc-8.10.4/hls-issue-0.1.0.0/build","-optP-include","-optP/home/turion/.cache/hie-bios/dist-hls-issue-b63992aa2ee6c00928f07f3594b4cfc6/build/x86_64-linux/ghc-8.10.4/hls-issue-0.1.0.0/build/autogen/cabal_macros.h","-this-unit-id","hls-issue-0.1.0.0-inplace","-hide-all-packages","-Wmissing-home-modules","-no-user-package-db","-package-db","/home/turion/.cabal/store/ghc-8.10.4/package.db","-package-db","/home/turion/.cache/hie-bios/dist-hls-issue-b63992aa2ee6c00928f07f3594b4cfc6/packagedb/ghc-8.10.4","-package-db","/home/turion/.cache/hie-bios/dist-hls-issue-b63992aa2ee6c00928f07f3594b4cfc6/build/x86_64-linux/ghc-8.10.4/hls-issue-0.1.0.0/package.conf.inplace","-package-id","base-4.14.1.0","-package-id","plutus-contract-0.1.0.0-ac5d137f1660289873056cb75cc0097f7782a355a67483562efb1886a8a50e02","-package-id","plutus-core-0.1.0.0-2864b3043f7f735f6e13bfcd289449746cfb8cd575a1c4fe77397d1b5b8d324f","-package-id","plutus-ledger-0.1.0.0-08c3f68864b34a9484c6cdce91f9163f22422fc4a4b2a5e02c9c4f6cf8ecac84","-package-id","plutus-tx-0.1.0.0-7ce16a5c9e04cb5a6750a4adec96bea2d1ac4a8869b17682a59f8aef56e9a08c","-package-id","plutus-tx-plugin-0.1.0.0-2f4d319d823457612a1b3c270a10648a290b00e8389ad753849f0e33dd40fd23","-package-id","template-haskell-2.16.0.0","-XHaskell2010","-XExplicitForAll","-XScopedTypeVariables","-XDeriveGeneric","-XStandaloneDeriving","-XDeriveLift","-XGeneralizedNewtypeDeriving","-XDeriveFunctor","-XDeriveFoldable","-XDeriveTraversable","-XMultiParamTypeClasses","Repro","-Wall","-Wnoncanonical-monad-instances","-Wincomplete-uni-patterns","-Wincomplete-record-updates","-Wredundant-constraints","-Widentities","-fobject-code","-fno-ignore-interface-pragmas","-fno-omit-interface-pragmas","-hide-all-packages"], componentRoot = "/home/turion/haskell/hls-issue", componentDependencies = ["hls-issue.cabal","cabal.project","cabal.project.local"]},"/nix/store/54780sb2s8njy5czybcz82izkjaqgjbm-ghc-8.10.4-with-packages/lib/ghc-8.10.4")
2021-05-18 17:45:19.391844584 [ThreadId 105] INFO hls:	Using interface files cache dir: /home/turion/.cache/ghcide/hls-issue-0.1.0.0-inplace-7353435cb717f78ee2d073f4bded31ad556fc855
2021-05-18 17:45:19.392156421 [ThreadId 105] INFO hls:	Making new HscEnv[hls-issue-0.1.0.0-inplace]
Error dynamically loading libm.so.6:
libm.so.6: cannot open shared object file: No such file or directory
2021-05-18 17:45:19.424274174 [ThreadId 105] DEBUG hls:	New Component Cache HscEnvEq: (([],Just HscEnvEq 8),fromList [("/home/turion/haskell/hls-issue/hie.yaml",Just 2021-05-18 15:22:59.819508105 UTC),("cabal.project",Nothing),("cabal.project.local",Nothing),("hls-issue.cabal",Nothing)])
2021-05-18 17:45:19.427883489 [ThreadId 105] DEBUG hls:	Known files updated: fromList [(TargetFile NormalizedFilePath "/home/turion/haskell/hls-issue/src/Repro.hs",fromList ["/home/turion/haskell/hls-issue/src/Repro.hs"]),(TargetModule Repro,fromList ["/home/turion/haskell/hls-issue/src/Repro.hs"])]
2021-05-18 17:45:19.428174115 [ThreadId 105] DEBUG hls:	Restarting build session (aborting the previous one took 0.00s)
2021-05-18 17:45:19.428287864 [ThreadId 69] DEBUG hls:	Finishing build session(exception: AsyncCancelled)
2021-05-18 17:45:19.42938058 [ThreadId 164] DEBUG hls:	hlint:getIdeas:file:NormalizedFilePath "/home/turion/haskell/hls-issue/src/Repro.hs"
2021-05-18 17:45:19.433772486 [ThreadId 205] INFO hls:	finish: Outline (took 0.01s)
2021-05-18 17:45:19.661764075 [ThreadId 229] DEBUG hls:	finish: InitialLoad (took 0.23s)
2021-05-18 17:45:20.128232684 [ThreadId 233] DEBUG hls:	src/Ide/Plugin/Eval/CodeLens.hs:149:15 "fp" "/home/turion/haskell/hls-issue/src/Repro.hs"
2021-05-18 17:45:20.12844535 [ThreadId 237] INFO hls:	finish: codeLens.TypeCheck (took 0.00s)
2021-05-18 17:45:20.128699202 [ThreadId 239] INFO hls:	finish: ModuleName.ghcSession (took 0.00s)
2021-05-18 17:45:20.128780095 [ThreadId 249] DEBUG hls:	LOOKUP UP PERSISTENT FOR: MinimalImports
2021-05-18 17:45:20.128886648 [ThreadId 249] INFO hls:	finish:  (took 0.00s)
2021-05-18 17:45:20.128921481 [ThreadId 251] INFO hls:	finish: codeLens.GetBindings (took 0.00s)
2021-05-18 17:45:20.129251388 [ThreadId 255] INFO hls:	finish: codeLens.GetGlobalBindingTypeSigs (took 0.00s)
2021-05-18 17:45:20.129877194 [ThreadId 256] INFO hls:	finish: parsed (took 0.00s)
2021-05-18 17:45:20.129931193 [ThreadId 233] DEBUG hls:	src/Ide/Plugin/Eval/CodeLens.hs:149:15 "excluded comments" "[]"
2021-05-18 17:45:20.13021822 [ThreadId 257] INFO hls:	finish: ModuleName.GetParsedModule (took 0.00s)
2021-05-18 17:45:20.130091549 [ThreadId 233] DEBUG hls:	src/Ide/Plugin/Eval/CodeLens.hs:149:15 "comments" "Comments {lineComments = fromList [], blockComments = fromList [(Range {_start = Position {_line = 0, _character = 0}, _end = Position {_line = 0, _character = 36}},RawBlockComment {getRawBlockComment = \"{-# LANGUAGE DataKinds           #-}\"}),(Range {_start = Position {_line = 1, _character = 0}, _end = Position {_line = 1, _character = 36}},RawBlockComment {getRawBlockComment = \"{-# LANGUAGE NoImplicitPrelude   #-}\"}),(Range {_start = Position {_line = 2, _character = 0}, _end = Position {_line = 2, _character = 36}},RawBlockComment {getRawBlockComment = \"{-# LANGUAGE ScopedTypeVariables #-}\"}),(Range {_start = Position {_line = 3, _character = 0}, _end = Position {_line = 3, _character = 36}},RawBlockComment {getRawBlockComment = \"{-# LANGUAGE TemplateHaskell     #-}\"})]}"
2021-05-18 17:45:20.130467123 [ThreadId 233] DEBUG hls:	src/Ide/Plugin/Eval/CodeLens.hs:149:15 "Tests" "0 tests in 4 sections 0 setups 0 lenses."
2021-05-18 17:45:20.130798145 [ThreadId 233] DEBUG hls:	src/Ide/Plugin/Eval/CodeLens.hs:149:15 "tests" "0.00s"
2021-05-18 17:45:20.130897795 [ThreadId 233] DEBUG hls:	src/Ide/Plugin/Eval/CodeLens.hs:149:15 "codeLens" "0.00s"
2021-05-18 17:45:30.31291753 [ThreadId 263] DEBUG hls:	GhcIde.hover entered (ideLogger)
2021-05-18 17:45:30.3134101 [ThreadId 263] DEBUG hls:	Hover request at position 3:35 in file: /home/turion/haskell/hls-issue/src/Repro.hs
2021-05-18 17:45:30.31383337 [ThreadId 263] DEBUG hls:	LOOKUP UP PERSISTENT FOR: GetHieAst
2021-05-18 17:45:30.314025864 [ThreadId 264] DEBUG hls:	finish: C:GetHieAst (took 0.00s)
2021-05-18 17:45:30.59330958 [ThreadId 270] DEBUG hls:	GhcIde.hover entered (ideLogger)
2021-05-18 17:45:30.593832295 [ThreadId 270] DEBUG hls:	Hover request at position 1:31 in file: /home/turion/haskell/hls-issue/src/Repro.hs
2021-05-18 17:45:30.594415246 [ThreadId 271] DEBUG hls:	finish: C:GetHieAst (took 0.00s)
2021-05-18 17:45:30.746982754 [ThreadId 288] INFO hls:	finish: Pragmas.GetParsedModule (took 0.00s)
2021-05-18 17:45:30.747238389 [ThreadId 292] DEBUG hls:	LOOKUP UP PERSISTENT FOR: TypeCheck
2021-05-18 17:45:30.747281508 [ThreadId 294] INFO hls:	finish: splice.codeAction.GitHieAst (took 0.00s)
2021-05-18 17:45:30.74735615 [ThreadId 292] INFO hls:	finish: retrie (took 0.00s)
2021-05-18 17:45:30.747370151 [ThreadId 299] INFO hls:	finish: importLens (took 0.00s)
2021-05-18 17:45:30.747362803 [ThreadId 297] INFO hls:	finish: tactic (took 0.00s)
2021-05-18 17:45:30.747417274 [ThreadId 302] INFO hls:	finish: HaddockComments.GetAnnotatedParsedSource (took 0.00s)
2021-05-18 17:45:30.747411168 [ThreadId 301] INFO hls:	finish: CodeAction (took 0.00s)
@jneira jneira added type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc.. type: template haskell related component: ghcide labels May 18, 2021
@jneira
Copy link
Member

jneira commented May 18, 2021

hi, thanks for the detailed bug report.
If you download the hls executable and put it in PATH the vscode extension will prefer it over the downloaded one by itself.
Last hls version is 1.1.0.0, I would recommend use it although is not probable it will fix the issue.
The issue reminds me somewhat #1160, in that one it is suggested to build hls from source with dynamic linking enabled, it could help in this case.

@chris-martin
Copy link

Thank you again for the workaround :)

@turion
Copy link
Author

turion commented Jun 15, 2021

What is the workaround? As far as I understand the issue is not fixed.

@jneira
Copy link
Member

jneira commented Jun 15, 2021

What is the workaround? As far as I understand the issue is not fixed.

Both things are true 🙂 : it is not fixed and we have a workaround until the definitive fix lands. The workaround is:

The issue reminds me somewhat #1160, in that one it is suggested to build hls from source with dynamic linking enabled, it could help in this case.

To see how to build hls itself with dynamic linking enabled you can take a look to the README: https://github.com/haskell/haskell-language-server#problems-with-dynamic-linking

@jneira
Copy link
Member

jneira commented Jun 15, 2021

@chris-martin thank you for confirming it (i was not totally sure if it was going to work with this one)

@jneira
Copy link
Member

jneira commented Jan 31, 2022

I am gonna close this issue as all compiler crashes seems to have the same root cause:

If any of you think the issue should not be included generically feel free to reopen it (with a brief explanation if possible)
Thanks all!

@jneira jneira closed this as completed Jan 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
can-workaround component: ghcide type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..
Projects
None yet
Development

No branches or pull requests

3 participants