Originally reported on element. @fendor's comment:
#4736 caused unexpected behaviour for a user; initial file paths should not be interpreted relative to the git root, but to the current working directory.
Your environment
Which OS do you use?
up-to-date ArchLinux
Which version of GHC do you use and how did you install it?
9.10.3 from GHCup
How is your project built (alternative: link to the project)?
https://github.com/sellout/pathway
Which LSP client (editor/plugin) do you use?
Terminal Vim + YCM
Which version of HLS do you use and how did you install it?
2.12.0.0 from GHCup
Have you configured HLS in any way (especially: a hie.yaml file)?
Not that I know of.
Steps to reproduce
cd ~
git clone https://github.com/sellout/pathway.git
cd pathway # into the repo/project
cd pathway # into the homonymous package
cabal build -w ghc-9.10.3 # not sure if needed, but why not, so you see it does build successfully
haskell-language-server-wrapper --debug src/Data/Path.hs
Expected behaviour
Output should end successfully like this:
Completed (1 file worked, 0 files failed)
Actual behaviour
Error:
No 'hie.yaml' found. Try to discover the project type!
Run entered for haskell-language-server-wrapper(haskell-language-server-wrapper) Version 2.12.0.0 x86_64 ghc-9.10.3
Current directory: /home/enrico/pathway/pathway
Operating system: linux
Arguments: ["--debug","src/Data/Path.hs"]
Cradle directory: /home/enrico/pathway
Cradle type: Cabal
Tool versions found on the $PATH
cabal: 3.14.2.0
stack: 3.7.1
ghc: 9.10.3
1
Consulting the cradle to get project GHC version...
2026-01-16T13:04:37.994574Z | Debug | cabal --numeric-version
2026-01-16T13:04:38.008109Z | Debug | cabal path --output-format=json
2026-01-16T13:04:38.035360Z | Debug | /home/enrico/.ghcup/bin/ghc-9.10.3 --numeric-version
Project GHC version: 9.10.3
haskell-language-server exe candidates: ["haskell-language-server-9.10.3","haskell-language-server"]
Launching haskell-language-server exe at:/home/enrico/.ghcup/bin/haskell-language-server-9.10.3
2026-01-16T13:04:38.048950Z | Debug | cabal path --output-format=json
2026-01-16T13:04:38.150283Z | Debug | /home/enrico/.ghcup/bin/ghc-9.10.3 -v0 -package-env=- -ignore-dot-ghci -e Control.Monad.join (Control.Monad.fmap System.IO.putStr System.Environment.getExecutablePath)
2026-01-16T13:04:38.163880Z | Debug | cabal path --output-format=json
2026-01-16T13:04:38.192362Z | Debug | /home/enrico/.ghcup/bin/ghc-9.10.3 --print-libdir
2026-01-16T13:04:39.481143Z | Info | haskell-language-server version: 2.12.0.0 (GHC: 9.10.3) (PATH: /home/enrico/.ghcup/hls/2.12.0.0/lib/haskell-language-server-2.12.0.0/bin/haskell-language-server-9.10.3)
2026-01-16T13:04:39.481794Z | Info | Directory: /home/enrico/pathway
2026-01-16T13:04:39.481954Z | Info | Logging heap statistics every 60.00s
ghcide setup tester in /home/enrico/pathway.
Report bugs at https://github.com/haskell/haskell-language-server/issues
Step 1/4: Finding files to test in /home/enrico/pathway
haskell-language-server-9.10.3: src/Data/Path.hs: getDirectoryContents:openDirStream: does not exist (No such file or directory)
HasCallStack backtrace:
collectBacktraces, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:169:13 in ghc-internal:GHC.Internal.Exception
toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/IO.hs:260:11 in ghc-internal:GHC.Internal.IO
throwIO, called at libraries/exceptions/src/Control/Monad/Catch.hs:308:12 in exceptions-0.10.9-e10f:Control.Monad.Catch
throwM, called at libraries/exceptions/src/Control/Monad/Catch.hs:318:7 in exceptions-0.10.9-e10f:Control.Monad.Catch
generalBracket, called at src/OpenTelemetry/Eventlog.hs:174:9 in opentelemetry-0.8.0-f195b57304fc829e0ca4fb96629cbea5ee2da6a12eb6b7549957af78230684af:OpenTelemetry.Eventlog
Debug information
Changing the command to
haskell-language-server-wrapper --debug pathway/src/Data/Path.hs
is a workaround.
Notice that we are already in the ~/pathway/pathway directory, so the relative path of the file is src/Data/Path.hs.
Originally reported on element. @fendor's comment:
Your environment
Which OS do you use?
up-to-date ArchLinux
Which version of GHC do you use and how did you install it?
9.10.3 from GHCup
How is your project built (alternative: link to the project)?
https://github.com/sellout/pathway
Which LSP client (editor/plugin) do you use?
Terminal Vim + YCM
Which version of HLS do you use and how did you install it?
2.12.0.0 from GHCup
Have you configured HLS in any way (especially: a
hie.yamlfile)?Not that I know of.
Steps to reproduce
Expected behaviour
Output should end successfully like this:
Actual behaviour
Error:
Debug information
Changing the command to
is a workaround.
Notice that we are already in the
~/pathway/pathwaydirectory, so the relative path of the file issrc/Data/Path.hs.