haskell / haskell-language-server

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

Evaluation throws an error when running HLS via nix #2471

Closed korayal closed 2 years ago

korayal commented 2 years ago

I run my AOC project via nix, which runs perfectly.

But when I try to evaluate a comment, I get an error.

Your environment

Which OS do you use: Ubuntu 21.10 Which lsp-client do you use: emacs & lsp-haskell Describe your project (alternative: link to the project): https://github.com/korayal/AOC2021

Steps to reproduce

Try evaluating the snippet below:

-- >>> "test"

Expected behaviour

-- "test"

Actual behaviour

-- <command line>: /nix/store/z56jcx3j1gfyk4sv7g8iaan0ssbdkhz1-glibc-2.33-56/lib/libc.so.6: undefined symbol: _dl_catch_error_ptr, version GLIBC_PRIVATE

Include debug information

Execute in the root of your project the command haskell-language-server-wrapper --debug . and paste the logs here: (if you are using the vscode extension check the executable location here)

Debug output: ``` Found "/home/korayal/Workspace/AOC/2021/hie.yaml" for "/home/korayal/Workspace/AOC/2021/a" Run entered for haskell-language-server-wrapper(haskell-language-server-wrapper) Version 1.5.1.0 x86_64 ghc-8.10.7 Current directory: /home/korayal/Workspace/AOC/2021 Operating system: linux Arguments: ["--debug"] Cradle directory: /home/korayal/Workspace/AOC/2021 Cradle type: Cabal Tool versions found on the $PATH cabal: 3.6.2.0 stack: 2.5.1 ghc: 8.10.7 Consulting the cradle to get project GHC version... Project GHC version: 8.10.7 haskell-language-server exe candidates: ["haskell-language-server-8.10.7","haskell-language-server"] Launching haskell-language-server exe at:/nix/store/2qqwpjf4cwf33gqbnrmzz0dd8jpl5z0n-haskell-language-server-1.5.1.0/bin/haskell-language-server haskell-language-server version: 1.5.1.0 (GHC: 8.10.7) (PATH: /nix/store/2qqwpjf4cwf33gqbnrmzz0dd8jpl5z0n-haskell-language-server-1.5.1.0/bin/haskell-language-server) ghcide setup tester in /home/korayal/Workspace/AOC/2021. Report bugs at https://github.com/haskell/haskell-language-server/issues Step 1/4: Finding files to test in /home/korayal/Workspace/AOC/2021 Found 13 files Step 2/4: Looking for hie.yaml files that control setup Found 1 cradle (/home/korayal/Workspace/AOC/2021/hie.yaml) Step 3/4: Initializing the IDE 2021-12-12 12:27:11.503130986 [ThreadId 7] DEBUG hls: Initializing exports map from hiedb Step 4/4: Type checking the files 2021-12-12 12:27:11.505912903 [ThreadId 81] INFO hls: Consulting the cradle for "src/AOC2021/Day11.hs" 2021-12-12 12:27:11.50622545 [ThreadId 81] DEBUG hls: Output from setting up the cradle Cradle {cradleRootDir = "/home/korayal/Workspace/AOC/2021", cradleOptsProg = CradleAction: Cabal} 2021-12-12 12:27:11.512814205 [ThreadId 7] DEBUG hls: Done initializing exports map from hiedb (906) 2021-12-12 12:27:11.550775399 [ThreadId 89] INFO hie-bios: Build profile: -w ghc-8.10.7 -O1 2021-12-12 12:27:11.550902802 [ThreadId 89] INFO hie-bios: In order, the following will be built (use -v for more details): 2021-12-12 12:27:11.555259746 [ThreadId 89] INFO hie-bios: - aoc2021-0.0.0.0 (lib) (first run) 2021-12-12 12:27:11.615618292 [ThreadId 89] INFO hie-bios: Preprocessing library for aoc2021-0.0.0.0.. 2021-12-12 12:27:11.65105541 [ThreadId 81] DEBUG hls: Session loading result: Right (ComponentOptions {componentOptions = ["-fbuilding-cabal-package","-O0","-outputdir","/home/korayal/.cache/hie-bios/dist-2021-d46774b24a1524fabfe6d44c2558e489/build/x86_64-linux/ghc-8.10.7/aoc2021-0.0.0.0/build","-odir","/home/korayal/.cache/hie-bios/dist-2021-d46774b24a1524fabfe6d44c2558e489/build/x86_64-linux/ghc-8.10.7/aoc2021-0.0.0.0/build","-hidir","/home/korayal/.cache/hie-bios/dist-2021-d46774b24a1524fabfe6d44c2558e489/build/x86_64-linux/ghc-8.10.7/aoc2021-0.0.0.0/build","-stubdir","/home/korayal/.cache/hie-bios/dist-2021-d46774b24a1524fabfe6d44c2558e489/build/x86_64-linux/ghc-8.10.7/aoc2021-0.0.0.0/build","-i","-i/home/korayal/.cache/hie-bios/dist-2021-d46774b24a1524fabfe6d44c2558e489/build/x86_64-linux/ghc-8.10.7/aoc2021-0.0.0.0/build","-isrc","-i/home/korayal/.cache/hie-bios/dist-2021-d46774b24a1524fabfe6d44c2558e489/build/x86_64-linux/ghc-8.10.7/aoc2021-0.0.0.0/build/autogen","-i/home/korayal/.cache/hie-bios/dist-2021-d46774b24a1524fabfe6d44c2558e489/build/x86_64-linux/ghc-8.10.7/aoc2021-0.0.0.0/build/global-autogen","-I/home/korayal/.cache/hie-bios/dist-2021-d46774b24a1524fabfe6d44c2558e489/build/x86_64-linux/ghc-8.10.7/aoc2021-0.0.0.0/build/autogen","-I/home/korayal/.cache/hie-bios/dist-2021-d46774b24a1524fabfe6d44c2558e489/build/x86_64-linux/ghc-8.10.7/aoc2021-0.0.0.0/build/global-autogen","-I/home/korayal/.cache/hie-bios/dist-2021-d46774b24a1524fabfe6d44c2558e489/build/x86_64-linux/ghc-8.10.7/aoc2021-0.0.0.0/build","-optP-include","-optP/home/korayal/.cache/hie-bios/dist-2021-d46774b24a1524fabfe6d44c2558e489/build/x86_64-linux/ghc-8.10.7/aoc2021-0.0.0.0/build/autogen/cabal_macros.h","-this-unit-id","aoc2021-0.0.0.0-inplace","-hide-all-packages","-Wmissing-home-modules","-no-user-package-db","-package-db","/home/korayal/.cabal/store/ghc-8.10.7/package.db","-package-db","/home/korayal/.cache/hie-bios/dist-2021-d46774b24a1524fabfe6d44c2558e489/packagedb/ghc-8.10.7","-package-db","/home/korayal/.cache/hie-bios/dist-2021-d46774b24a1524fabfe6d44c2558e489/build/x86_64-linux/ghc-8.10.7/aoc2021-0.0.0.0/package.conf.inplace","-package-id","attoparsec-0.13.2.5-2Y2uFe9qofi7P2GNaHA8y5","-package-id","base-4.14.3.0","-package-id","base16-bytestring-1.0.2.0-4uEreLBAb4sId4vXaU1KFZ","-package-id","base64-bytestring-1.1.0.0-GBjG18cSV97YL3IyjtJFG","-package-id","binary-0.8.8.0","-package-id","bytestring-0.10.12.0","-package-id","bytestring-trie-0.2.5.3-67uisVshQdY7M4gwVKTjt4","-package-id","conduit-1.3.4.2-ENVQ2jJAx9QGRAV7lz5FN2","-package-id","containers-0.6.5.1","-package-id","directory-1.3.6.0","-package-id","dlist-1.0-DfSJiQK14jl1NJ1DncWHr2","-package-id","errors-2.3.0-BhSV4wsNQe5EaXe5iEXAU4","-package-id","lens-4.19.2-3HsKWTkBbBI7vmHzly1Bzf","-package-id","matrix-0.3.6.1-64im9dMJj7iE5lUgOfMxv9","-package-id","matrix-lens-0.1.0.0-GuzDrN16rUG7fv4AtSPpZx","-package-id","memory-0.15.0-EMCKRb89UubC3qqFetWNBn","-package-id","mono-traversable-1.0.15.3-3zrdBu8jVZJniNdzF5bFG","-package-id","monoid-extras-0.6.1-Cz3Rd4YeCa99Um4FZ698ja","-package-id","random-1.2.0-4yTZ53A8d79AtqKspztz45","-package-id","relude-0.7.0.0-46Qz7V2sJiqCkP14gLRSM9","-package-id","text-1.2.4.1","-package-id","time-1.9.3","-package-id","unordered-containers-0.2.15.0-Ji1ToZkABrL4gJ1GuDm5yr","-package-id","vector-0.12.3.1-GuyXuhm5vkg2DJyR57RlvI","-XHaskell2010","-XDeriveDataTypeable","-XDeriveGeneric","-XEmptyDataDecls","-XFlexibleContexts","-XFlexibleInstances","-XGADTs","-XGeneralizedNewtypeDeriving","-XMultiParamTypeClasses","-XNoImplicitPrelude","-XNoMonomorphismRestriction","-XOverloadedStrings","-XQuasiQuotes","-XRankNTypes","-XRecordWildCards","-XNamedFieldPuns","-XTupleSections","-XTypeFamilies","-XCPP","-XTypeOperators","-XDataKinds","-XScopedTypeVariables","-XBangPatterns","-XFunctionalDependencies","-XPolyKinds","-XTypeInType","-XInstanceSigs","-XDeriveFunctor","-XLambdaCase","-XMultiWayIf","-XDerivingStrategies","AOC2021.Day01","AOC2021.Day02","AOC2021.Day03","AOC2021.Day04","AOC2021.Day05","AOC2021.Day06","AOC2021.Day07","AOC2021.Day08","AOC2021.Day09","AOC2021.Day10","AOC2021.Day11","AOC2021.DayXXX","AOC2021.Prelude","Paths_aoc2021","-Wall","-hide-all-packages"], componentRoot = "/home/korayal/Workspace/AOC/2021", componentDependencies = ["aoc2021.cabal","cabal.project","cabal.project.local"]},"/nix/store/d7sry5fkrfq2qx7dn6h3lzqcbhq4qi3z-ghc-8.10.7-with-packages/lib/ghc-8.10.7") 2021-12-12 12:27:11.704264398 [ThreadId 81] INFO hls: Using interface files cache dir: /home/korayal/.cache/ghcide/aoc2021-0.0.0.0-inplace-7e6b2f98d4f010d7b2032369ec684285d2c48067 2021-12-12 12:27:11.704569279 [ThreadId 81] INFO hls: Making new HscEnv[aoc2021-0.0.0.0-inplace] 2021-12-12 12:27:11.713226917 [ThreadId 81] DEBUG hls: New Component Cache HscEnvEq: (([],Just HscEnvEq 5),fromList [("/home/korayal/Workspace/AOC/2021/hie.yaml",Just 2021-12-02 22:57:20.797557562 UTC),("aoc2021.cabal",Just 2021-12-11 15:58:10.97905984 UTC),("cabal.project",Nothing),("cabal.project.local",Nothing)]) 2021-12-12 12:27:11.743998531 [ThreadId 81] DEBUG hls: Known files updated: fromList [(TargetModule AOC2021.DayXXX,fromList ["/home/korayal/Workspace/AOC/2021/src/AOC2021/DayXXX.hs"]),(TargetModule AOC2021.Day09,fromList ["/home/korayal/Workspace/AOC/2021/src/AOC2021/Day09.hs"]),(TargetModule AOC2021.Day02,fromList ["/home/korayal/Workspace/AOC/2021/src/AOC2021/Day02.hs"]),(TargetModule AOC2021.Day03,fromList ["/home/korayal/Workspace/AOC/2021/src/AOC2021/Day03.hs"]),(TargetModule Paths_aoc2021,fromList ["/home/korayal/.cache/hie-bios/dist-2021-d46774b24a1524fabfe6d44c2558e489/build/x86_64-linux/ghc-8.10.7/aoc2021-0.0.0.0/build/autogen/Paths_aoc2021.hs"]),(TargetModule AOC2021.Day05,fromList ["/home/korayal/Workspace/AOC/2021/src/AOC2021/Day05.hs"]),(TargetModule AOC2021.Day11,fromList ["/home/korayal/Workspace/AOC/2021/src/AOC2021/Day11.hs"]),(TargetModule AOC2021.Prelude,fromList ["/home/korayal/Workspace/AOC/2021/src/AOC2021/Prelude.hs"]),(TargetModule AOC2021.Day10,fromList ["/home/korayal/Workspace/AOC/2021/src/AOC2021/Day10.hs"]),(TargetModule AOC2021.Day08,fromList ["/home/korayal/Workspace/AOC/2021/src/AOC2021/Day08.hs"]),(TargetModule AOC2021.Day01,fromList ["/home/korayal/Workspace/AOC/2021/src/AOC2021/Day01.hs"]),(TargetFile NormalizedFilePath "/home/korayal/Workspace/AOC/2021/src/AOC2021/Day11.hs",fromList ["/home/korayal/Workspace/AOC/2021/src/AOC2021/Day11.hs"]),(TargetModule AOC2021.Day04,fromList ["/home/korayal/Workspace/AOC/2021/src/AOC2021/Day04.hs"]),(TargetModule AOC2021.Day06,fromList ["/home/korayal/Workspace/AOC/2021/src/AOC2021/Day06.hs"]),(TargetModule AOC2021.Day07,fromList ["/home/korayal/Workspace/AOC/2021/src/AOC2021/Day07.hs"])] 2021-12-12 12:27:11.74440286 [ThreadId 10] DEBUG hls: Finishing build session(exception: AsyncCancelled) 2021-12-12 12:27:11.744470127 [ThreadId 81] DEBUG hls: Restarting build session due to new component with queue ["User TypeCheck"] for keys [GetKnownTargets; ,GhcSessionIO; ] (aborting the previous one took 0.00s) 2021-12-12 12:27:11.745338754 [ThreadId 123] DEBUG hls: hlint:getIdeas:file:NormalizedFilePath "/home/korayal/Workspace/AOC/2021/src/AOC2021/Day08.hs" 2021-12-12 12:27:11.745468871 [ThreadId 135] DEBUG hls: hlint:getIdeas:file:NormalizedFilePath "/home/korayal/Workspace/AOC/2021/src/AOC2021/Day02.hs" 2021-12-12 12:27:11.74551642 [ThreadId 134] DEBUG hls: hlint:getIdeas:file:NormalizedFilePath "/home/korayal/Workspace/AOC/2021/src/AOC2021/Day01.hs" 2021-12-12 12:27:11.745558813 [ThreadId 133] DEBUG hls: hlint:getIdeas:file:NormalizedFilePath "/home/korayal/Workspace/AOC/2021/src/AOC2021/Day04.hs" 2021-12-12 12:27:11.745607537 [ThreadId 132] DEBUG hls: hlint:getIdeas:file:NormalizedFilePath "/home/korayal/Workspace/AOC/2021/src/AOC2021/Prelude.hs" 2021-12-12 12:27:11.745706926 [ThreadId 131] DEBUG hls: hlint:getIdeas:file:NormalizedFilePath "/home/korayal/Workspace/AOC/2021/src/AOC2021/DayXXX.hs" 2021-12-12 12:27:11.745751582 [ThreadId 130] DEBUG hls: hlint:getIdeas:file:NormalizedFilePath "/home/korayal/Workspace/AOC/2021/src/AOC2021/Day07.hs" 2021-12-12 12:27:11.745782289 [ThreadId 129] DEBUG hls: hlint:getIdeas:file:NormalizedFilePath "/home/korayal/Workspace/AOC/2021/src/AOC2021/Day09.hs" 2021-12-12 12:27:11.745810216 [ThreadId 128] DEBUG hls: hlint:getIdeas:file:NormalizedFilePath "/home/korayal/Workspace/AOC/2021/src/AOC2021/Day10.hs" 2021-12-12 12:27:11.745838004 [ThreadId 127] DEBUG hls: hlint:getIdeas:file:NormalizedFilePath "/home/korayal/Workspace/AOC/2021/src/AOC2021/Day03.hs" 2021-12-12 12:27:11.745864676 [ThreadId 126] DEBUG hls: hlint:getIdeas:file:NormalizedFilePath "/home/korayal/Workspace/AOC/2021/src/AOC2021/Day06.hs" 2021-12-12 12:27:11.745892168 [ThreadId 125] DEBUG hls: hlint:getIdeas:file:NormalizedFilePath "/home/korayal/Workspace/AOC/2021/src/AOC2021/Day05.hs" 2021-12-12 12:27:11.74592056 [ThreadId 124] DEBUG hls: hlint:getIdeas:file:NormalizedFilePath "/home/korayal/Workspace/AOC/2021/src/AOC2021/Day11.hs" 2021-12-12 12:27:12.12143221 [ThreadId 123] INFO hls: File: /home/korayal/Workspace/AOC/2021/src/AOC2021/Day08.hs Hidden: no Range: 82:36-82:53 Source: hlint Severity: DsInfo Message: Use concatMapFound:concat . fmap sndWhy not:concatMap snd File: /home/korayal/Workspace/AOC/2021/src/AOC2021/Day08.hs Hidden: no Range: 96:54-96:86 Source: hlint Severity: DsInfo Message: Redundant bracket Found: \ s -> (cmap ^? ix (sort $ T.unpack s)) Why not: \ s -> cmap ^? ix (sort $ T.unpack s) 2021-12-12 12:27:12.462996589 [ThreadId 128] INFO hls: File: /home/korayal/Workspace/AOC/2021/src/AOC2021/Day10.hs Hidden: no Range: 53:54-55:51 Source: hlint Severity: DsInfo Message: Replace case with maybe Found: case nonEmpty xs of Nothing -> CResult_Complete Just newXS -> CResult_Incomplete newXS Why not: (maybe CResult_Complete CResult_Incomplete (nonEmpty xs)) File: /home/korayal/Workspace/AOC/2021/src/AOC2021/Day10.hs Hidden: no Range: 101:7-103:25 Source: hlint Severity: DsInfo Message: Use mapMaybe Found: catMaybes . fmap incomplete . fmap iterateChunks Why not: mapMaybe incomplete . fmap iterateChunks File: /home/korayal/Workspace/AOC/2021/src/AOC2021/Day10.hs Hidden: no Range: 102:7-103:25 Source: hlint Severity: DsInfo Message: Functor law Found: fmap incomplete . fmap iterateChunks Why not: fmap (incomplete . iterateChunks) 2021-12-12 12:27:12.582222215 [ThreadId 124] INFO hls: File: /home/korayal/Workspace/AOC/2021/src/AOC2021/Day11.hs Hidden: no Range: 44:9-44:10 Source: hlint Severity: DsInfo Message: Redundant $Found:print $ inputWhy not:print input 2021-12-12 12:27:12.668146758 [ThreadId 125] INFO hls: File: /home/korayal/Workspace/AOC/2021/src/AOC2021/Day05.hs Hidden: no Range: 31:10-35:19 Source: hlint Severity: DsInfo Message: Use <$> Found: do x <- decimal _ <- char ',' y <- decimal pure $ Point x y Why not: do x <- decimal _ <- char ',' Point x <$> decimal File: /home/korayal/Workspace/AOC/2021/src/AOC2021/Day05.hs Hidden: no Range: 38:9-42:20 Source: hlint Severity: DsInfo Message: Use <$> Found: do p1 <- pointP _ <- string " -> " p2 <- pointP pure $ Edge p1 p2 Why not: do p1 <- pointP _ <- string " -> " Edge p1 <$> pointP 2021-12-12 12:27:13.131632012 [ThreadId 204] INFO hls: File: /home/korayal/Workspace/AOC/2021/src/AOC2021/Day11.hs Hidden: no Range: 44:9-44:10 Source: hlint Severity: DsInfo Message: Redundant $Found:print $ inputWhy not:print input File: /home/korayal/Workspace/AOC/2021/src/AOC2021/Day11.hs Hidden: no Range: 6:1-6:20 Source: typecheck Severity: DsWarning Message: The import of ‘Control.Lens’ is redundant except perhaps to import instances from ‘Control.Lens’ To import instances alone, use: import Control.Lens() File: /home/korayal/Workspace/AOC/2021/src/AOC2021/Day11.hs Hidden: no Range: 10:1-10:24 Source: typecheck Severity: DsWarning Message: The import of ‘Data.Matrix.Lens’ is redundant except perhaps to import instances from ‘Data.Matrix.Lens’ To import instances alone, use: import Data.Matrix.Lens() File: /home/korayal/Workspace/AOC/2021/src/AOC2021/Day11.hs Hidden: no Range: 11:1-11:32 Source: typecheck Severity: DsWarning Message: The qualified import of ‘Data.Text’ is redundant except perhaps to import instances from ‘Data.Text’ To import instances alone, use: import Data.Text() File: /home/korayal/Workspace/AOC/2021/src/AOC2021/Day11.hs Hidden: no Range: 27:15-27:24 Source: typecheck Severity: DsWarning Message: In the use of ‘undefined’ (imported from AOC2021.Prelude, but defined in Relude.Debug): "'undefined' function remains in code" File: /home/korayal/Workspace/AOC/2021/src/AOC2021/Day11.hs Hidden: no Range: 31:15-31:24 Source: typecheck Severity: DsWarning Message: In the use of ‘undefined’ (imported from AOC2021.Prelude, but defined in Relude.Debug): "'undefined' function remains in code" 2021-12-12 12:27:13.348203997 [ThreadId 108] INFO hls: finish: User TypeCheck (took 1.60s) 2021-12-12 12:27:13.45471736 [ThreadId 819] INFO hls: finish: GetHie (took 0.11s) 2021-12-12 12:27:13.455150993 [ThreadId 883] INFO hls: finish: GenerateCore (took 0.00s) Completed (13 files worked, 0 files failed) ```

Paste the logs from the lsp-client, you can check instructions about for VS Code here

LSP logs: ``` 2021-12-12 12:24:45.758437274 [ThreadId 4127] DEBUG hls: src/Ide/Plugin/Eval/CodeLens.hs:121:15 "fp" "/home/korayal/Workspace/AOC/2021/src/AOC2021/Day11.hs" 2021-12-12 12:24:45.758520629 [ThreadId 4130] INFO hls: finish: codeLens.TypeCheck (took 0.00s) 2021-12-12 12:24:45.758622146 [ThreadId 4132] INFO hls: finish: codeLens.GetBindings (took 0.00s) 2021-12-12 12:24:45.758656821 [ThreadId 4131] INFO hls: finish: Wingman.getIdeDynflags.GetModSummaryWithoutTimestamps (took 0.00s) 2021-12-12 12:24:45.758735663 [ThreadId 4133] INFO hls: finish: ModuleName.ghcSession (took 0.00s) 2021-12-12 12:24:45.758759748 [ThreadId 4135] INFO hls: finish: Wingman.codeLensProvider.GetAnnotatedParsedSource (took 0.00s) 2021-12-12 12:24:45.759003583 [ThreadId 4137] INFO hls: finish: Wingman.codeLensProvider.GetBindings (took 0.00s) 2021-12-12 12:24:45.759038199 [ThreadId 4140] INFO hls: finish: Wingman.emptyCaseScrutinees.TypeCheck (took 0.00s) 2021-12-12 12:24:45.759175345 [ThreadId 4136] INFO hls: finish: eval.GetParsedModuleWithComments (took 0.00s) 2021-12-12 12:24:45.75925145 [ThreadId 4134] INFO hls: finish: codeLens.GetGlobalBindingTypeSigs (took 0.00s) 2021-12-12 12:24:45.759327799 [ThreadId 4143] INFO hls: finish: Wingman.emptyCaseScrutinees.GhcSessionDeps (took 0.00s) 2021-12-12 12:24:45.759298227 [ThreadId 4144] INFO hls: finish: ModuleName.GetParsedModule (took 0.00s) 2021-12-12 12:24:45.759265041 [ThreadId 4127] DEBUG hls: src/Ide/Plugin/Eval/CodeLens.hs:121:15 "comments" "Comments {lineComments = fromList [(Range {_start = Position {_line = 2, _character = 0}, _end = Position {_line = 2, _character = 80}},RawLineComment {getRawLineComment = \"--------------------------------------------------------------------------------\"}),(Range {_start = Position {_line = 13, _character = 0}, _end = Position {_line = 13, _character = 80}},RawLineComment {getRawLineComment = \"--------------------------------------------------------------------------------\"}),(Range {_start = Position {_line = 24, _character = 0}, _end = Position {_line = 24, _character = 80}},RawLineComment {getRawLineComment = \"--------------------------------------------------------------------------------\"}),(Range {_start = Position {_line = 28, _character = 0}, _end = Position {_line = 28, _character = 80}},RawLineComment {getRawLineComment = \"--------------------------------------------------------------------------------\"}),(Range {_start = Position {_line = 32, _character = 0}, _end = Position {_line = 32, _character = 80}},RawLineComment {getRawLineComment = \"--------------------------------------------------------------------------------\"}),(Range {_start = Position {_line = 36, _character = 0}, _end = Position {_line = 36, _character = 19}},RawLineComment {getRawLineComment = \"-- >>> print \\\"test\\\"\"}),(Range {_start = Position {_line = 37, _character = 0}, _end = Position {_line = 37, _character = 152}},RawLineComment {getRawLineComment = \"-- : /nix/store/z56jcx3j1gfyk4sv7g8iaan0ssbdkhz1-glibc-2.33-56/lib/libc.so.6: undefined symbol: _dl_catch_error_ptr, version GLIBC_PRIVATE\"}),(Range {_start = Position {_line = 45, _character = 2}, _end = Position {_line = 45, _character = 21}},RawLineComment {getRawLineComment = \"-- mapM_ print $ do\"}),(Range {_start = Position {_line = 46, _character = 2}, _end = Position {_line = 46, _character = 47}},RawLineComment {getRawLineComment = \"-- map ($ input) [answer1Pure, answer2Pure]\"})], blockComments = fromList []}" 2021-12-12 12:24:45.759654242 [ThreadId 4127] DEBUG hls: src/Ide/Plugin/Eval/CodeLens.hs:121:15 "Tests" "1 tests in 6 sections 0 setups 1 lenses." 2021-12-12 12:24:45.759874703 [ThreadId 4127] DEBUG hls: src/Ide/Plugin/Eval/CodeLens.hs:121:15 "tests" "0.00s" 2021-12-12 12:24:45.759948702 [ThreadId 4127] DEBUG hls: src/Ide/Plugin/Eval/CodeLens.hs:121:15 "codeLens" "0.00s" ```
korayal commented 2 years ago

Right after creating this ticket, I found out that I am not passing the pkgs to the hls-nix derivation (which builds HLS with --enable-executable-dynamic flag) in my project's shell.nix. Which would mean, I'm using different nixpkgs for both my project and HLS which could be causing this.

The build takes forever, so I'll update this ticket if I get any success.

korayal commented 2 years ago

Yup, that was exactly the reason. inheriting the actual project's nixpkgs did the trick.

Closing the ticket.