Closed Aster89 closed 7 months ago
I'm trying to understand how to give you the HLS logs directly, rather than those represented by YCM.
This should be the HLS log.... no?
No 'hie.yaml' found. Try to discover the project type!
Run entered for haskell-language-server-wrapper(haskell-language-server-wrapper) Version 2.5.0.0 x86_64 ghc-9.2.8
Current directory: /home/enrico
Operating system: linux
Arguments: ["--lsp","--debug"]
Cradle directory: /home/enrico
Cradle type: Default
Tool versions found on the $PATH
cabal: 3.10.2.1
stack: Not found
ghc: 9.4.8
Consulting the cradle to get project GHC version...
2024-02-17T17:05:08.269547Z | Debug | executing command: ghc --numeric-version
Project GHC version: 9.4.8
haskell-language-server exe candidates: ["haskell-language-server-9.4.8","haskell-language-server"]
Launching haskell-language-server exe at:/home/enrico/.ghcup/bin/haskell-language-server-9.4.8
2024-02-17T17:05:08.299201Z | Debug | executing command: ghc -v0 -package-env=- -ignore-dot-ghci -e Control.Monad.join (Control.Monad.fmap System.IO.putStr System.Environment.getExecutablePath)
2024-02-17T17:05:08.389790Z | Debug | executing command: ghc --print-libdir
2024-02-17T17:05:09.731038Z | Info | haskell-language-server version: 2.5.0.0 (GHC: 9.4.8) (PATH: /home/enrico/.ghcup/hls/2.5.0.0/lib/haskell-language-server-2.5.0.0/bin/haskell-language-server-9.4.8)
2024-02-17T17:05:09.731764Z | Info | Directory: /home/enrico
2024-02-17T17:05:09.731863Z | Info | Starting (haskell-language-server) LSP server...
GhcideArguments {argsCommand = LSP, argsCwd = Nothing, argsShakeProfiling = Nothing, argsTesting = False, argsExamplePlugin = False, argsLogLevel = Debug, argsLogFile = Nothing, argsLogStderr = True, argsLogClient = False, argsThreads = 0, argsProjectGhcVersion = False}
PluginIds: [ pragmas-suggest
, pragmas-completion
, retrie
, ghcide-completions
, alternateNumberFormat
, ghcide-code-actions-bindings
, explicit-fields
, ghcide-hover-and-symbols
, ghcide-code-actions-type-signatures
, floskell
, fourmolu
, ghcide-extend-import-action
, ghcide-code-actions-fill-holes
, importLens
, LSPRecorderCallback
, cabal
, qualifyImportedNames
, moduleName
, splice
, stylish-haskell
, changeTypeSignature
, hlint
, class
, ormolu
, callHierarchy
, stan
, ghcide-type-lenses
, codeRange
, cabal-fmt
, eval
, rename
, ghcide-code-actions-imports-exports
, gadt
, overloaded-record-dot
, ghcide-core
, explicit-fixity
, pragmas-disable ]
2024-02-17T17:05:09.733423Z | Info | Logging heap statistics every 60.00s
2024-02-17T17:05:09.736818Z | Info | Starting LSP server...
If you are seeing this in a terminal, you probably should have run WITHOUT the --lsp option!
PluginIds: [ pragmas-suggest
, pragmas-completion
, retrie
, ghcide-completions
, alternateNumberFormat
, ghcide-code-actions-bindings
, explicit-fields
, ghcide-hover-and-symbols
, ghcide-code-actions-type-signatures
, floskell
, fourmolu
, ghcide-extend-import-action
, ghcide-code-actions-fill-holes
, importLens
, LSPRecorderCallback
, cabal
, qualifyImportedNames
, moduleName
, splice
, stylish-haskell
, changeTypeSignature
, hlint
, class
, ormolu
, callHierarchy
, stan
, ghcide-type-lenses
, codeRange
, cabal-fmt
, eval
, rename
, ghcide-code-actions-imports-exports
, gadt
, overloaded-record-dot
, ghcide-core
, explicit-fixity
, pragmas-disable ]
2024-02-17T17:05:09.737143Z | Info | Starting server
2024-02-17T17:05:09.738121Z | Debug | LSP: set new config: { }
2024-02-17T17:05:09.738577Z | Info | Started LSP server in 0.00s
2024-02-17T17:05:09.742851Z | Debug | executing command: ghc --print-libdir
2024-02-17T17:05:09.776673Z | Debug | Setting initial dynflags...
2024-02-17T17:05:09.776790Z | Debug | shouldRunSubset: True
2024-02-17T17:05:09.776905Z | Debug | Initializing exports map from hiedb
2024-02-17T17:05:09.777136Z | Info | Registering IDE configuration: IdeConfiguration {workspaceFolders = fromList [NormalizedUri 7627154443253916145 "file:///home/enrico"], clientSettings = hashed (Just (Object (fromList [])))}
2024-02-17T17:05:09.778344Z | Debug | LSP: not requesting configuration since the client does not support workspace/configuration
2024-02-17T17:05:09.778447Z | Debug | LSP: set new config: { }
2024-02-17T17:05:09.778489Z | Debug | Configuration changed: Config {checkParents = CheckOnSave, checkProject = True, formattingProvider = "ormolu", cabalFormattingProvider = "cabal-fmt", maxCompletions = 40, plugins = fromList []}
2024-02-17T17:05:09.779552Z | Debug | Shake session initialized
2024-02-17T17:05:09.780229Z | Debug | Finished build session
AsyncCancelled
2024-02-17T17:05:09.780232Z | Debug | Restarting build session due to config change
Action Queue: []
Keys: [GetClientSettings; ]
Aborting previous build session took 0.00s
2024-02-17T17:05:09.780424Z | Debug | Done initializing exports map from hiedb. Size: 7
2024-02-17T17:05:09.780443Z | Debug | LSP: not requesting configuration since the client does not support workspace/configuration
2024-02-17T17:05:09.780632Z | Debug | VFS: opening file:///home/enrico/uffa.hs
2024-02-17T17:05:09.780950Z | Debug | Set files of interest to: fromList [(NormalizedFilePath "/home/enrico/uffa.hs",Modified {firstOpen = True})]
2024-02-17T17:05:09.781174Z | Debug | Finished build session
AsyncCancelled
2024-02-17T17:05:09.781188Z | Debug | Restarting build session due to /home/enrico/uffa.hs (modified)
Action Queue: []
Keys: [ GetClientSettings;
, IsFileOfInterest; /home/enrico/uffa.hs
, GetModificationTime; /home/enrico/uffa.hs ]
Aborting previous build session took 0.00s
2024-02-17T17:05:09.781370Z | Debug | Opened text document: file:///home/enrico/uffa.hs
2024-02-17T17:05:09.781678Z | Debug | hlint: Getting hlint ideas for NormalizedFilePath "/home/enrico/uffa.hs"
2024-02-17T17:05:09.782118Z | Info | Cradle path: uffa.hs
2024-02-17T17:05:09.782217Z | Warning | No [cradle](https://github.com/mpickering/hie-bios#hie-bios) found for uffa.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.
2024-02-17T17:05:09.789341Z | Debug | Cradle: Cradle {cradleRootDir = "/home/enrico", cradleOptsProg = CradleAction: Default}
2024-02-17T17:05:09.789428Z | Info | invoking build tool to determine build flags (this may take some time depending on the cache)
2024-02-17T17:05:09.789560Z | Debug | executing command: ghc --print-libdir
2024-02-17T17:05:09.825376Z | Debug | Session loading result: Right (ComponentOptions {componentOptions = ["-dynamic"], componentRoot = "/home/enrico", componentDependencies = []},"/home/enrico/.ghcup/ghc/9.4.8/lib/ghc-9.4.8/lib")
2024-02-17T17:05:09.853990Z | Info | Interface files cache directory: /home/enrico/.cache/ghcide/main-1a596a151463f2c53ee4feb14ecd276a1ccebfda-1a596a151463f2c53ee4feb14ecd276a1ccebfda
2024-02-17T17:05:09.854390Z | Info | Making new HscEnv. In-place unit ids: [ main-1a596a151463f2c53ee4feb14ecd276a1ccebfda ]
2024-02-17T17:05:09.894806Z | Debug | New component cache HscEnvEq: (([],Just HscEnvEq 5),fromList [])
2024-02-17T17:05:09.894922Z | Debug | Known files updated:
fromList [(TargetFile NormalizedFilePath "/home/enrico/uffa.hs",fromList ["/home/enrico/uffa.hs"])]
2024-02-17T17:05:09.895380Z | Debug | Finished build session
AsyncCancelled
2024-02-17T17:05:09.895429Z | Debug | Restarting build session due to new component
Action Queue: []
Keys: [ IsFileOfInterest; /home/enrico/uffa.hs
, GetModificationTime; /home/enrico/uffa.hs
, GhcSessionIO;
, GetKnownTargets; ]
Aborting previous build session took 0.00s
2024-02-17T17:05:09.895701Z | Debug | hlint: Getting hlint ideas for NormalizedFilePath "/home/enrico/uffa.hs"
2024-02-17T17:05:09.906821Z | Debug | Finished: InitialLoad Took: 0.01s
2024-02-17T17:05:10.058026Z | Debug | hlint: Using extensions for NormalizedFilePath "/home/enrico/uffa.hs": [ MonomorphismRestriction
, RelaxedPolyRec
, ForeignFunctionInterface
, ImplicitPrelude
, ScopedTypeVariables
, BangPatterns
, NamedFieldPuns
, GADTSyntax
, DoAndIfThenElse
, ConstraintKinds
, PolyKinds
, InstanceSigs
, StandaloneDeriving
, DeriveDataTypeable
, DeriveFunctor
, DeriveTraversable
, DeriveFoldable
, DeriveGeneric
, DeriveLift
, TypeSynonymInstances
, FlexibleContexts
, FlexibleInstances
, ConstrainedClassMethods
, MultiParamTypeClasses
, ExistentialQuantification
, EmptyDataDecls
, KindSignatures
, GeneralizedNewtypeDeriving
, PostfixOperators
, TupleSections
, PatternGuards
, RankNTypes
, TypeOperators
, ExplicitForAll
, TraditionalRecordSyntax
, BinaryLiterals
, HexFloatLiterals
, EmptyCase
, NamedWildCards
, TypeApplications
, EmptyDataDeriving
, NumericUnderscores
, StarIsType
, ImportQualifiedPost
, StandaloneKindSignatures
, FieldSelectors ]
2024-02-17T17:05:28.972875Z | Debug | Finished: Rename.GetHieAst Took: 0.00s
2024-02-17T17:05:28.972992Z | Debug | Finished: Rename.HieDb Took: 0.00s
2024-02-17T17:05:28.973124Z | Debug | Finished: Rename.GetHieAst Took: 0.00s
2024-02-17T17:05:28.974547Z | Debug | Finished: Rename.GetHieAst Took: 0.00s
2024-02-17T17:05:28.975082Z | Debug | Finished: Rename.GetHieAst Took: 0.00s
2024-02-17T17:05:28.975630Z | Debug | Finished: Rename.GetHieAst Took: 0.00s
2024-02-17T17:05:28.975776Z | Debug | Finished: Rename.HieDb Took: 0.00s
2024-02-17T17:05:28.975890Z | Debug | Finished: Rename.GetHieAst Took: 0.00s
2024-02-17T17:05:28.976356Z | Debug | Finished: rename: config Took: 0.00s
2024-02-17T17:05:28.976690Z | Debug | Finished: Rename.GetParsedModule Took: 0.00s
2024-02-17T17:05:28.977716Z | Debug | Finished: Rename.GetAnnotatedParsedSource Took: 0.00s
2024-02-17T17:05:29.005507Z | Debug | Set files of interest to: fromList [(NormalizedFilePath "/home/enrico/uffa.hs",Modified {firstOpen = False})]
2024-02-17T17:05:29.005762Z | Debug | Finished build session
AsyncCancelled
2024-02-17T17:05:29.005768Z | Debug | Restarting build session due to /home/enrico/uffa.hs (modified)
Action Queue: []
Keys: [ IsFileOfInterest; /home/enrico/uffa.hs
, GetModificationTime; /home/enrico/uffa.hs
, GetModificationTime; /home/enrico/.cache/ghcide/main-1a596a151463f2c53ee4feb14ecd276a1ccebfda-1a596a151463f2c53ee4feb14ecd276a1ccebfda/_home_enrico_uffa/hs.hie ]
Aborting previous build session took 0.00s
2024-02-17T17:05:29.006048Z | Debug | Modified text document: file:///home/enrico/uffa.hs
2024-02-17T17:05:29.007617Z | Debug | hlint: Getting hlint ideas for NormalizedFilePath "/home/enrico/uffa.hs"
2024-02-17T17:06:09.773100Z | Info | Live bytes: 21.75MB Heap size: 581.96MB
Thanks for the bug report! In this case logs are not necessary, the reproducer you described is sufficient (I managed to reproduce it too). I'll look into this and try to fix it.
@jhrcek FWIW, I think this is relatively well-known and a bug in hiedb.
perhaps @fendor is referring to this: https://github.com/wz1000/HieDb/issues/45
also looks like this has been logged before: https://github.com/haskell/haskell-language-server/issues/2915
Closing in favour of #2915
Your environment
Which OS do you use? ArchLinux (up-to-date) Which version of GHC do you use and how did you install it? 9.4.8, via GHCup How is your project built (alternative: link to the project)? Irrelevant, I just open a new file
Which LSP client (editor/plugin) do you use? Vim(terminal) + YCM Which version of HLS do you use and how did you install it? 2.5.0.0, via GHCup Have you configured HLS in any way (especially: a
hie.yaml
file)? ... I think I haven't...Steps to reproduce
data Foo = Bar { a :: !Int , b :: !Int }
Bar
to beBaz
Expected behaviour
The code should be become
Actual behaviour
But it becomes
Debug information
Is this the relevant piece?