Description
Your environment
Which OS do you use?
Windows
Which version of GHC do you use and how did you install it?
ghcup, ghc 9.4.8
How is your project built (alternative: link to the project)?
cabal
Which LSP client (editor/plugin) do you use?
VS code
Which version of HLS do you use and how did you install it?
ghcup is set to 2.7.0.0, however in my logs it says 2.9.0.1
Have you configured HLS in any way (especially: a hie.yaml
file)?
No
What's wrong?
I'm running into this issue when navigating to a file in my projects executable directory (in this case Main.hs).
C:\Users\user1\AppData\Local\hie-bios\dist-super-duper-long-project-name-api-8be09479ad30bccd6705fcb1123451\build\x86_64-windows\ghc-9.4.8\super-duper-long-project-name-api-0.1.0.0\x\super-duper-long-project-name-api\build\super-duper-long-project-name-api\autogen\: openBinaryTempFileWithDefaultPermissions: invalid argument (invalid argument)Error: cabal-3.10.3.0.exe: repl failed for exe:super-duper-long-project-name-api super-duper-long-project-name-api-0.1.0.0.
This removes syntax highlighting in VSCode
Debug information
When I change the project name to "short-name" it works fine.
I have enabled long paths on Windows (Local Computer Policy > Computer Configuration > Administrative Templates > System > Filesystem
c. Enable "Enable Win32 long paths")
Fix long paths issue on windows
In the hie-bios 0.1.1 changelog https://hackage.haskell.org/package/hie-bios-0.4.0/candidate/changelog
If I run cabal build and cabal run from terminal it seems to work fine (90% sure). Only fails in VS Code.