In Visual Studio Code the Haskell Plugin struggle to find the right version of GHC.
Errors are: impossible to find file cradle, it is not possible to recognize ghc version.
I’ve installed all Haskell from the powershell command of this link:
https://www.haskell.org/ghcup/
In Visual Studio Code messages server also crash and it is not restarted.
Stack.yaml is defined in this manner.
stack build is really problematic with many extra-deps tips on errors log added will call other extra-deps tips in the next errors log.
resolver: ghc-9.6.6
packages:
- .
extra-deps:
– Tips are from stack build log
allow-newer: false
allow-newer-deps:
extra-package-dbs: []
ghc-options: {}
build: {}
install-ghc: true
stack build errors
stack install haskell-debug-adapter difficult to install.
Debug isn’t possible, but normal run of hs file is possible.
Plugin installed haskell v2.4.4
Haskell GHCi Debug Adapter Phoitynev0.
The set of Haskell debug is really problematic. Actually the folder of Haskell is 23 Gigabyte of installed components.
I’ve installed ghcup,stack, cabal, ghc and hls. I cannot find hls.exe
I’ve installed MinGw, with Msys bash and base.
I’ve sh.exe visible as environment path. And all environment keys are good.
Below GhCup List, it is incomplete, but missing elements are all signed as X:
X ghc 9.2.7 base-4.16.4.0
X ghc 9.2.8 base-4.16.4.0 hls-powered
X ghc 9.4.1 base-4.17.0.0
X ghc 9.4.2 base-4.17.0.0
X ghc 9.4.3 base-4.17.0.0
X ghc 9.4.4 base-4.17.0.0
X ghc 9.4.5 base-4.17.1.0
X ghc 9.4.6 base-4.17.2.0
X ghc 9.4.7 base-4.17.2.0
IS ghc 9.4.8 recommended,base-4.17.2.1 hls-powered
X ghc 9.6.1 base-4.18.0.0
X ghc 9.6.2 base-4.18.0.0
X ghc 9.6.3 base-4.18.1.0
X ghc 9.6.4 base-4.18.2.0
X ghc 9.6.5 base-4.18.2.1 hls-powered
X ghc 9.6.6 base-4.18.2.1 hls-powered
X ghc 9.8.1 base-4.19.0.0 2023-10-09
X ghc 9.8.2 base-4.19.1.0 hls-powered,2024-02-23
X ghc 9.10.1 latest,base-4.20.0.0 hls-powered
X cabal 2.4.1.0
X cabal 3.0.0.0
X cabal 3.2.0.0
X cabal 3.4.0.0
X cabal 3.4.1.0
X cabal 3.6.0.0
X cabal 3.6.2.0
X cabal 3.6.2.0-p1
X cabal 3.8.1.0
X cabal 3.10.1.0
X cabal 3.10.2.0
X cabal 3.10.2.1
IS cabal 3.10.3.0 recommended
X cabal 3.12.1.0 latest
X hls 1.1.0
X hls 1.2.0
X hls 1.3.0
X hls 1.4.0
X hls 1.5.0
X hls 1.5.1
X hls 1.6.0.0
X hls 1.6.1.0
X hls 1.7.0.0
X hls 1.8.0.0
X hls 1.9.0.0
X hls 1.9.1.0
X hls 1.10.0.0
X hls 2.0.0.0
X hls 2.0.0.1
X hls 2.1.0.0
X hls 2.2.0.0
X hls 2.3.0.0
X hls 2.4.0.0
X hls 2.5.0.0
X hls 2.6.0.0
X hls 2.7.0.0
X hls 2.8.0.0
X hls 2.9.0.0
IS hls 2.9.0.1 latest,recommended
X stack 2.5.1
X stack 2.7.1
X stack 2.7.3 2022-02-02
X stack 2.7.5
X stack 2.9.1
X stack 2.9.3
X stack 2.11.1
X stack 2.13.1
X stack 2.15.1
X stack 2.15.3
X stack 2.15.5
X stack 2.15.7
IS stack 3.1.1 latest,recommended
IS ghcup 0.1.30.0 latest,recommended
Problems with stack install phoityne-vscode:
phoityne-vscode> [103 of 107] Compiling Phoityne.VSCode.TH.SetBreakpointsResponseBodyJSON
phoityne-vscode> [104 of 107] Compiling Phoityne.VSCode.TH.SetBreakpointsResponseJSON
phoityne-vscode> [105 of 107] Compiling Phoityne.VSCode.Core
phoityne-vscode>
phoityne-vscode> app\Phoityne\VSCode\Core.hs:2762:41: error: [GHC-76037]
phoityne-vscode> Not in scope: FSN.confDebounce' phoityne-vscode> NB: the module
System.FSNotify’ does not export confDebounce'. phoityne-vscode> | phoityne-vscode> 2762 | FSN.withManagerConf FSN.defaultConfig{FSN.confDebounce = FSN.Debounce 1} $ \mgr -> do phoityne-vscode> | ^^^^^^^^^^^^^^^^ phoityne-vscode> phoityne-vscode> app\Phoityne\VSCode\Core.hs:2762:61: error: [GHC-76037] phoityne-vscode> Not in scope: data constructor
FSN.Debounce’
phoityne-vscode> NB: the module System.FSNotify' does not export
Debounce’.
phoityne-vscode> |
phoityne-vscode> 2762 | FSN.withManagerConf FSN.defaultConfig{FSN.confDebounce = FSN.Debounce 1} $ \mgr → do
phoityne-vscode> | ^^^^^^^^^^^^
Error: [S-7282]
Stack failed to execute the build plan.
While executing the build plan, Stack encountered the error:
[S-7011]
While building package phoityne-vscode-0.0.28.0 (scroll up to its section to see the error) using:
C:\Users\Dell\AppData\Roaming\stack\setup-exe-cache\x86_64-windows\Cabal-simple_CKvAmRb3_3.10.3.0_ghc-9.6.5.exe --verbose=1 --builddir=.stack-work\dist\eebe39f7 build --ghc-options " -fdiagnostics-color=always"
Process exited with code: ExitFailure 1
Despite it is one day that i try to solve all problems, it is impossible to fix all them.
At the end the situation is like the begin.
With new project created with stack new and the yaml file with snapshot on:
url: “URL /lts/22/36.yaml”
The command:
stack ghci --with-ghc=ghci-dap --test --no-load --no-build --main-is TARGET
gives this error;
Warning: The following GHC options are incompatible with GHCi and have not been passed
to it: -threaded.
Configuring GHCi with the following packages: haskell-project-n3-stack.
[DAP][INFO] start ghci-dap-0.0.23.0.
GHCi, version 9.6.5: :? for help
:1:1: error: [GHC-52243]
Bad interface file: C:\Users\Dell\AppData\Local\Programs\stack\x86_64-windows\ghc-9.6.6\lib\x86_64-windows-ghc-9.6.6\ghc-prim-0.10.0\GHC\Types.hi
mismatched interface file versions (wanted “9065”, got “9066”)
If ghc 9.6.6 is installed visible with environment path and set with “ghc set 9.6.6”.Visual Studio Code try to load ghc 9.6.6.
So there isn’t a good comunication between Visual Studio plugins and file installed from GHCup
Some few issues are present on stackoverflow about that,
It is needed the possibility to have a good installation for Windows and an easy pre-configuration for yaml project files and better automation for installation and update options.
Thank you.