-
-
Notifications
You must be signed in to change notification settings - Fork 412
Description
Your environment
Which OS do you use:
Ubuntu 21.10
Which version of GHC do you use and how did you install it:
ghc-9.2.3 with nix
How is your project built (alternative: link to the project):
nix-shell --run 'cabal build'
Which LSP client (editor/plugin) do you use:
VS Codium+vscode-haskell
Which version of HLS do you use and how did you install it:
haskell-language-server version: 1.7.0.0 (GHC: 9.2.3) from nix
Have you configured HLS in any way (especially: a hie.yaml file):
run it inside of nix-shell
Steps to reproduce
- enter the
nix-shellfor my project- the project has FFI and has
extra-libraries: FLACin the cabal file to link against libFLAC - the project has a custom src/Prelude.hs and has
mixins: base hiding (Prelude)in the cabal file (I'm not sure if this is relevant or not)
- the project has FFI and has
cabal buildandcabal runboth successfully build the projecthaskell-language-server --debugfails with "user specified .o/.so/.DLL could not be loaded (libFLAC.so: cannot open shared object file: No such file or directory)" (more details below)
Expected behaviour
haskell-language-server should find libFLAC where cabal build finds it at /nix/store/qrd180mlgjlxzdiwzm91slxl0q82vm1b-flac-1.3.4/lib/libFLAC.so, and succeed.
Actual behaviour
haskell-language-server fails to build src/Prelude.hs, and as a result fails to build all hs files in the project.
Debug information
haskell-language-server --debug
No 'hie.yaml' found. Try to discover the project type!
Run entered for haskell-language-server-wrapper(haskell-language-server-wrapper) Version 1.7.0.0 x86_64 ghc-9.2.3
Current directory: /home/__username__/__project__
Operating system: linux
Arguments: ["--debug"]
Cradle directory: /home/__username__/__project__
Cradle type: Cabal
Tool versions found on the $PATH
cabal: 3.6.2.0
stack: Not found
ghc: 9.2.3
Consulting the cradle to get project GHC version...
Project GHC version: 9.2.3
haskell-language-server exe candidates: ["haskell-language-server-9.2.3","haskell-language-server"]
Launching haskell-language-server exe at:/nix/store/y3rppxvn6gn11h2jx0c18nw072mpd1s9-haskell-language-server-1.7.0.0/bin/haskell-language-server-9.2.3
2022-07-26T00:41:37.045448Z | Info | No log file specified; using stderr.
2022-07-26T00:41:37.045741Z | Info | haskell-language-server version: 1.7.0.0 (GHC: 9.2.3) (PATH: /nix/store/y3rppxvn6gn11h2jx0c18nw072mpd1s9-haskell-language-server-1.7.0.0/bin/haskell-language-server)
2022-07-26T00:41:37.045998Z | Info | Directory: /home/__username__/__project__
2022-07-26T00:41:37.046099Z | Info | Logging heap statistics every 60.00s
ghcide setup tester in /home/__username__/__project__.
Report bugs at https://github.com/haskell/haskell-language-server/issues
Step 1/4: Finding files to test in /home/__username__/__project__
Found 9 files
Step 2/4: Looking for hie.yaml files that control setup
Found 1 cradle
()
Step 3/4: Initializing the IDE
2022-07-26T00:41:37.049316Z | Debug | Initializing exports map from hiedb
2022-07-26T00:41:37.049571Z | Debug | Shake session initialized
Step 4/4: Type checking the files
2022-07-26T00:41:37.049688Z | Debug | Done initializing exports map from hiedb. Size: 0
2022-07-26T00:41:37.050590Z | Info | Cradle path: src/Sound/Pulse/Conduit.hs
2022-07-26T00:41:37.050646Z | Warning | No [cradle](https://github.com/mpickering/hie-bios#hie-bios) found for src/Sound/Pulse/Conduit.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-07-26T00:41:37.052019Z | Debug | Cradle: Cradle {cradleRootDir = "/home/__username__/__project__", cradleOptsProg = CradleAction: Cabal}
2022-07-25 17:41:37.294887264 [ThreadId 73] INFO hie-bios: Build profile: -w ghc-9.2.3 -O1
2022-07-25 17:41:37.295001664 [ThreadId 73] INFO hie-bios: In order, the following will be built (use -v for more details):
2022-07-25 17:41:37.295047774 [ThreadId 73] INFO hie-bios: - music-0.0.0 (exe:music) (first run)
2022-07-25 17:41:37.348802367 [ThreadId 73] INFO hie-bios: Preprocessing executable 'music' for music-0.0.0..
2022-07-26T00:41:37.663184Z | Debug | Session loading result: Right (ComponentOptions {componentOptions = ["-fbuilding-cabal-package","-O0","-outputdir","/home/__username__/.cache/hie-bios/dist-music-a2614d1a2e5364a2a1dfbcbb17ea6c39/build/x86_64-linux/ghc-9.2.3/music-0.0.0/x/music/build/music/music-tmp","-odir","/home/__username__/.cache/hie-bios/dist-music-a2614d1a2e5364a2a1dfbcbb17ea6c39/build/x86_64-linux/ghc-9.2.3/music-0.0.0/x/music/build/music/music-tmp","-hidir","/home/__username__/.cache/hie-bios/dist-music-a2614d1a2e5364a2a1dfbcbb17ea6c39/build/x86_64-linux/ghc-9.2.3/music-0.0.0/x/music/build/music/music-tmp","-stubdir","/home/__username__/.cache/hie-bios/dist-music-a2614d1a2e5364a2a1dfbcbb17ea6c39/build/x86_64-linux/ghc-9.2.3/music-0.0.0/x/music/build/music/music-tmp","-i","-i/home/__username__/.cache/hie-bios/dist-music-a2614d1a2e5364a2a1dfbcbb17ea6c39/build/x86_64-linux/ghc-9.2.3/music-0.0.0/x/music/build/music/music-tmp","-isrc","-i/home/__username__/.cache/hie-bios/dist-music-a2614d1a2e5364a2a1dfbcbb17ea6c39/build/x86_64-linux/ghc-9.2.3/music-0.0.0/x/music/build/music/autogen","-i/home/__username__/.cache/hie-bios/dist-music-a2614d1a2e5364a2a1dfbcbb17ea6c39/build/x86_64-linux/ghc-9.2.3/music-0.0.0/x/music/build/global-autogen","-I/home/__username__/.cache/hie-bios/dist-music-a2614d1a2e5364a2a1dfbcbb17ea6c39/build/x86_64-linux/ghc-9.2.3/music-0.0.0/x/music/build/music/autogen","-I/home/__username__/.cache/hie-bios/dist-music-a2614d1a2e5364a2a1dfbcbb17ea6c39/build/x86_64-linux/ghc-9.2.3/music-0.0.0/x/music/build/global-autogen","-I/home/__username__/.cache/hie-bios/dist-music-a2614d1a2e5364a2a1dfbcbb17ea6c39/build/x86_64-linux/ghc-9.2.3/music-0.0.0/x/music/build/music/music-tmp","-optP-include","-optP/home/__username__/.cache/hie-bios/dist-music-a2614d1a2e5364a2a1dfbcbb17ea6c39/build/x86_64-linux/ghc-9.2.3/music-0.0.0/x/music/build/music/autogen/cabal_macros.h","-lFLAC","-hide-all-packages","-Wmissing-home-modules","-no-user-package-db","-package-db","/home/__username__/.cabal/store/ghc-9.2.3/package.db","-package-db","/home/__username__/.cache/hie-bios/dist-music-a2614d1a2e5364a2a1dfbcbb17ea6c39/packagedb/ghc-9.2.3","-package-db","/home/__username__/.cache/hie-bios/dist-music-a2614d1a2e5364a2a1dfbcbb17ea6c39/build/x86_64-linux/ghc-9.2.3/music-0.0.0/x/music/package.conf.inplace","-package-id","base-4.16.2.0 (Control.Applicative, Control.Arrow, Control.Category, Control.Concurrent, Control.Concurrent.Chan, Control.Concurrent.MVar, Control.Concurrent.QSem, Control.Concurrent.QSemN, Control.Exception, Control.Exception.Base, Control.Monad, Control.Monad.Fail, Control.Monad.Fix, Control.Monad.IO.Class, Control.Monad.Instances, Control.Monad.ST, Control.Monad.ST.Lazy, Control.Monad.ST.Lazy.Safe, Control.Monad.ST.Lazy.Unsafe, Control.Monad.ST.Safe, Control.Monad.ST.Strict, Control.Monad.ST.Unsafe, Control.Monad.Zip, Data.Bifoldable, Data.Bifunctor, Data.Bitraversable, Data.Bits, Data.Bool, Data.Char, Data.Coerce, Data.Complex, Data.Data, Data.Dynamic, Data.Either, Data.Eq, Data.Fixed, Data.Foldable, Data.Function, Data.Functor, Data.Functor.Classes, Data.Functor.Compose, Data.Functor.Const, Data.Functor.Contravariant, Data.Functor.Identity, Data.Functor.Product, Data.Functor.Sum, Data.IORef, Data.Int, Data.Ix, Data.Kind, Data.List, Data.List.NonEmpty, Data.Maybe, Data.Monoid, Data.Ord, Data.Proxy, Data.Ratio, Data.STRef, Data.STRef.Lazy, Data.STRef.Strict, Data.Semigroup, Data.String, Data.Traversable, Data.Tuple, Data.Type.Bool, Data.Type.Coercion, Data.Type.Equality, Data.Type.Ord, Data.Typeable, Data.Unique, Data.Version, Data.Void, Data.Word, Debug.Trace, Foreign, Foreign.C, Foreign.C.Error, Foreign.C.String, Foreign.C.Types, Foreign.Concurrent, Foreign.ForeignPtr, Foreign.ForeignPtr.Safe, Foreign.ForeignPtr.Unsafe, Foreign.Marshal, Foreign.Marshal.Alloc, Foreign.Marshal.Array, Foreign.Marshal.Error, Foreign.Marshal.Pool, Foreign.Marshal.Safe, Foreign.Marshal.Unsafe, Foreign.Marshal.Utils, Foreign.Ptr, Foreign.Safe, Foreign.StablePtr, Foreign.Storable, GHC.Arr, GHC.Base, GHC.Bits, GHC.ByteOrder, GHC.Char, GHC.Clock, GHC.Conc, GHC.Conc.IO, GHC.Conc.Signal, GHC.Conc.Sync, GHC.ConsoleHandler, GHC.Constants, GHC.Desugar, GHC.Enum, GHC.Environment, GHC.Err, GHC.Event, GHC.Event.TimeOut, GHC.Exception, GHC.Exception.Type, GHC.ExecutionStack, GHC.ExecutionStack.Internal, GHC.Exts, GHC.Fingerprint, GHC.Fingerprint.Type, GHC.Float, GHC.Float.ConversionUtils, GHC.Float.RealFracMethods, GHC.Foreign, GHC.ForeignPtr, GHC.GHCi, GHC.GHCi.Helpers, GHC.Generics, GHC.IO, GHC.IO.Buffer, GHC.IO.BufferedIO, GHC.IO.Device, GHC.IO.Encoding, GHC.IO.Encoding.CodePage, GHC.IO.Encoding.Failure, GHC.IO.Encoding.Iconv, GHC.IO.Encoding.Latin1, GHC.IO.Encoding.Types, GHC.IO.Encoding.UTF16, GHC.IO.Encoding.UTF32, GHC.IO.Encoding.UTF8, GHC.IO.Exception, GHC.IO.FD, GHC.IO.Handle, GHC.IO.Handle.FD, GHC.IO.Handle.Internals, GHC.IO.Handle.Lock, GHC.IO.Handle.Text, GHC.IO.Handle.Types, GHC.IO.IOMode, GHC.IO.StdHandles, GHC.IO.SubSystem, GHC.IO.Unsafe, GHC.IOArray, GHC.IOPort, GHC.IORef, GHC.Int, GHC.Integer, GHC.Integer.Logarithms, GHC.Ix, GHC.List, GHC.MVar, GHC.Maybe, GHC.Natural, GHC.Num, GHC.Num.BigNat, GHC.Num.Integer, GHC.Num.Natural, GHC.OldList, GHC.OverloadedLabels, GHC.Pack, GHC.Profiling, GHC.Ptr, GHC.RTS.Flags, GHC.Read, GHC.Real, GHC.Records, GHC.ResponseFile, GHC.ST, GHC.STRef, GHC.Show, GHC.Stable, GHC.StableName, GHC.Stack, GHC.Stack.CCS, GHC.Stack.Types, GHC.StaticPtr, GHC.Stats, GHC.Storable, GHC.TopHandler, GHC.TypeLits, GHC.TypeLits.Internal, GHC.TypeNats, GHC.TypeNats.Internal, GHC.Unicode, GHC.Weak, GHC.Word, Numeric, Numeric.Natural, System.CPUTime, System.Console.GetOpt, System.Environment, System.Environment.Blank, System.Exit, System.IO, System.IO.Error, System.IO.Unsafe, System.Info, System.Mem, System.Mem.StableName, System.Mem.Weak, System.Posix.Internals, System.Posix.Types, System.Timeout, Text.ParserCombinators.ReadP, Text.ParserCombinators.ReadPrec, Text.Printf, Text.Read, Text.Read.Lex, Text.Show, Text.Show.Functions, Type.Reflection, Type.Reflection.Unsafe, Unsafe.Coerce)","-package-id","aeson-2.0.3.0-BoX2rdGsyTjI0PWsiPfGJr","-package-id","brick-0.73-2ln4wQ2S3sL6i3RKpp6EdQ","-package-id","bytestring-0.11.3.1","-package-id","conduit-1.3.4.2-IpIX5k29LsaE4l6gMHxh7X","-package-id","conduit-audio-0.2.0.3-2DZSCgK7ekiEGGoLDYsOup","-package-id","conduit-audio-sndfile-0.1.2.2-FX5hwd2x8WO9gg354Kle0F","-package-id","directory-1.3.6.2","-package-id","filepath-1.4.2.2","-package-id","http-conduit-2.3.8-8zwqxjOyOkPHUd4uqUVO7k","-package-id","microlens-platform-0.4.2.1-89uYUWKfgc9RvZJZf1Hp","-package-id","microlens-th-0.4.3.10-7sy0nq8cLuW9VTTorhOCOC","-package-id","pulse-simple-0.1.14-BKovb6oSTuT3QcIFN4aDQp","-package-id","relude-1.1.0.0-9xSQUlEillrJNbCFRNNKRl","-package-id","stm-2.5.0.2","-package-id","stm-conduit-4.0.1-DLaTPmbstOHGLlzxCALDWh","-package-id","text-1.2.5.0","-package-id","uuid-1.3.15-5cd5ZxAYSKGBi8cpLod8lE","-package-id","vector-0.12.3.1-JHqe7B5w7u6DAdsKf2ymmQ","-package-id","vty-5.36-EQ8ljtHfVSeAw7QJt2iQEe","-XHaskell2010","-XApplicativeDo","-XBangPatterns","-XDataKinds","-XDeriveFoldable","-XDeriveFunctor","-XDeriveTraversable","-XFlexibleContexts","-XFlexibleInstances","-XGeneralizedNewtypeDeriving","-XLambdaCase","-XMultiParamTypeClasses","-XOverloadedStrings","-XPolyKinds","-XScopedTypeVariables","-XStandaloneDeriving","-XTypeApplications","-XTypeFamilies","src/Main.hs","Music.AudioDriver","Music.Codec.Audio.FLAC.Metadata","Music.Data.MusicBrainz.V2","Music.Metadata","Music.Model","Music.MusicBrainzLoader","Music.ReleaseConfig","Prelude","Sound.Pulse.Conduit","Paths_music","-Wall","-Wcompat","-Wredundant-constraints","-Werror=inaccessible-code","-Werror=incomplete-patterns","-Werror=missing-fields","-Werror=missing-home-modules","-Werror=overflowed-literals","-Werror=overlapping-patterns","-hide-all-packages"], componentRoot = "/home/__username__/__project__", componentDependencies = ["music.cabal","cabal.project","cabal.project.local"]},"/nix/store/r2517v8ia4wjzxkmh60ri9315masj4p7-ghc-9.2.3-with-packages/lib/ghc-9.2.3")
2022-07-26T00:41:37.711314Z | Info | Interface files cache directory: /home/__username__/.cache/ghcide/main-c8382c2f600f6da0fd22a90ef5a53b7236349041
2022-07-26T00:41:37.711589Z | Info | Making new HscEnv. In-place unit ids: [main]
2022-07-26T00:41:37.744505Z | Debug | New component cache HscEnvEq: (([],Just HscEnvEq 5),fromList [("cabal.project",Just 2022-07-20 03:09:15.542578584 UTC),("cabal.project.local",Nothing),("music.cabal",Just 2022-07-26 00:14:17.992879305 UTC)])
2022-07-26T00:41:37.767228Z | Debug | Known files updated:
fromList [(TargetFile NormalizedFilePath "/home/__username__/__project__/src/Main.hs",fromList ["/home/__username__/__project__/src/Main.hs"]),(TargetModule (ModuleName "Music.Metadata"),fromList ["/home/__username__/__project__/src/Music/Metadata.hs"]),(TargetModule (ModuleName "Music.Data.MusicBrainz.V2"),fromList ["/home/__username__/__project__/src/Music/Data/MusicBrainz/V2.hs"]),(TargetModule (ModuleName "Music.ReleaseConfig"),fromList ["/home/__username__/__project__/src/Music/ReleaseConfig.hs"]),(TargetFile NormalizedFilePath "/home/__username__/__project__/src/Sound/Pulse/Conduit.hs",fromList ["/home/__username__/__project__/src/Sound/Pulse/Conduit.hs"]),(TargetModule (ModuleName "Prelude"),fromList ["/home/__username__/__project__/src/Prelude.hs"]),(TargetModule (ModuleName "Paths_music"),fromList ["/home/__username__/.cache/hie-bios/dist-music-a2614d1a2e5364a2a1dfbcbb17ea6c39/build/x86_64-linux/ghc-9.2.3/music-0.0.0/x/music/build/music/autogen/Paths_music.hs"]),(TargetModule (ModuleName "Music.Codec.Audio.FLAC.Metadata"),fromList ["/home/__username__/.cache/hie-bios/dist-music-a2614d1a2e5364a2a1dfbcbb17ea6c39/build/x86_64-linux/ghc-9.2.3/music-0.0.0/x/music/build/music/music-tmp/Music/Codec/Audio/FLAC/Metadata.hs"]),(TargetModule (ModuleName "Music.MusicBrainzLoader"),fromList ["/home/__username__/__project__/src/Music/MusicBrainzLoader.hs"]),(TargetModule (ModuleName "Music.AudioDriver"),fromList ["/home/__username__/__project__/src/Music/AudioDriver.hs"]),(TargetModule (ModuleName "Music.Model"),fromList ["/home/__username__/__project__/src/Music/Model.hs"]),(TargetModule (ModuleName "Sound.Pulse.Conduit"),fromList ["/home/__username__/__project__/src/Sound/Pulse/Conduit.hs"])]
2022-07-26T00:41:37.767493Z | Debug | Finished build session
AsyncCancelled
2022-07-26T00:41:37.767528Z | Debug | Restarting build session due to new component
Action Queue: [User TypeCheck]
Keys: [GetKnownTargets; , GhcSessionIO; ]
Aborting previous build session took 0.00s
2022-07-26T00:41:37.771969Z | Info | updateFileDiagnostics published different from new diagnostics - file diagnostics: File: /home/__username__/__project__/src/Music/Data/MusicBrainz/V2.hs
Hidden: no
Range: 1:1-2:1
Source: compiler
Severity: DsError
Message:
�[0;91mInternal error, getIdeGlobalExtras, no entry for DisplayTHWarning
CallStack (from HasCallStack):
errorIO, called at src/Development/IDE/Core/Shake.hs:351:20 in
ghcide-1.7.0.0-C1D8AosZKm08vo3HXSU0ED:Development.IDE.Core.Shake�[0m
2022-07-26T00:41:37.772122Z | Info | updateFileDiagnostics published different from new diagnostics - file diagnostics: File: /home/__username__/__project__/src/Music/Model.hs
Hidden: no
Range: 1:1-2:1
Source: compiler
Severity: DsError
Message:
�[0;91mInternal error, getIdeGlobalExtras, no entry for DisplayTHWarning
CallStack (from HasCallStack):
errorIO, called at src/Development/IDE/Core/Shake.hs:351:20 in
ghcide-1.7.0.0-C1D8AosZKm08vo3HXSU0ED:Development.IDE.Core.Shake�[0m
2022-07-26T00:41:38.011444Z | Info | updateFileDiagnostics published different from new diagnostics - file diagnostics: File: /home/__username__/__project__/src/Prelude.hs
Hidden: no
Range: 1:1-2:1
Source: typecheck
Severity: DsError
Message:
�[0;91mUnexpected usage error
user specified .o/.so/.DLL could not be loaded (libFLAC.so: cannot open shared object file: No
such file or directory)
Whilst trying to load: (dynamic) FLAC
Additional directories searched: (none)�[0m
2022-07-26T00:41:38.012029Z | Debug | Finished: User TypeCheck Took: 0.24s
2022-07-26T00:41:38.012301Z | Debug | Finished: GetHie Took: 0.00s
2022-07-26T00:41:38.012372Z | Debug | LOOKUP UP PERSISTENT FOR: GhcSessionDeps
2022-07-26T00:41:38.012420Z | Debug | LOOKUP UP PERSISTENT FOR: GhcSessionDeps
2022-07-26T00:41:38.012460Z | Debug | LOOKUP UP PERSISTENT FOR: GhcSessionDeps
2022-07-26T00:41:38.012524Z | Debug | LOOKUP UP PERSISTENT FOR: GetModSummaryWithoutTimestamps
2022-07-26T00:41:38.012550Z | Debug | LOOKUP UP PERSISTENT FOR: GhcSessionDeps
2022-07-26T00:41:38.012590Z | Debug | LOOKUP UP PERSISTENT FOR: GetModSummaryWithoutTimestamps
2022-07-26T00:41:38.012616Z | Debug | LOOKUP UP PERSISTENT FOR: GhcSessionDeps
2022-07-26T00:41:38.012666Z | Debug | LOOKUP UP PERSISTENT FOR: GhcSessionDeps
2022-07-26T00:41:38.012795Z | Debug | Finished: GenerateCore Took: 0.00s
2022-07-26T00:41:38.012831Z | Debug | LOOKUP UP PERSISTENT FOR: GhcSessionDeps
2022-07-26T00:41:38.017907Z | Debug | LOOKUP UP PERSISTENT FOR: GhcSessionDeps
Files that failed:
* /home/__username__/__project__/src/Main.hs
* /home/__username__/__project__/src/Prelude.hs
* /home/__username__/__project__/src/Music/AudioDriver.hs
* /home/__username__/__project__/src/Music/Metadata.hs
* /home/__username__/__project__/src/Music/Model.hs
* /home/__username__/__project__/src/Music/MusicBrainzLoader.hs
* /home/__username__/__project__/src/Music/ReleaseConfig.hs
* /home/__username__/__project__/src/Music/Data/MusicBrainz/V2.hs
* /home/__username__/__project__/src/Sound/Pulse/Conduit.hs
Completed (0 files worked, 9 files failed)