-
-
Notifications
You must be signed in to change notification settings - Fork 403
Description
Your environment
This issue can be reproduced with the default Dev Container at https://github.com/benz0li/commercialhaskell-stack/tree/add-dev-containers
Which OS do you use?
Alpine Linux/AArch64
Which version of GHC do you use and how did you install it?
Unofficial build of GHC v9.4.6: 9.4.6.Dockerfile
Which LSP client (editor/plugin) do you use?
VS Code + vscode-haskell
Which version of HLS do you use and how did you install it?
Unofficial build of HLS v2.1.0.0: 2.1.0.0.Dockerfile
ℹ️ Put together in a Dev Container based on devcontainer.json + GHC.Dockerfile
Tool versions found on the $PATH
cabal: 3.8.1.0
stack: 2.11.1
ghc: 9.4.6
Have you configured HLS in any way (especially: a hie.yaml
file)?
Yes: hie.yaml
What's wrong?
Last step: Opening src/Stack.hs
: Haskell extension > View Problem:
(other steps: see below)
Failed to run ["cabal","v2-repl","lib:stack"] in directory "/workspaces/stack". Consult the logs for full command and error.
Failed command: cabal --builddir=/home/vscode/.cache/hie-bios/dist-stack-7d4030fb4073a5f963b4594938e6876d v2-repl --with-compiler /home/vscode/.cache/hie-bios/wrapper-b54f81dea4c0e6d1626911c526bc4e36 --with-hc-pkg /home/vscode/.cache/hie-bios/ghc-pkg-2e9e7382b10dc1de912243f849341f70 lib:stack
Build profile: -w ghc-9.4.6 -O1
In order, the following will be built (use -v for more details):
- stack-2.12.0 (first run)
[1 of 2] Compiling Main ( /home/vscode/.cache/hie-bios/dist-stack-7d4030fb4073a5f963b4594938e6876d/build/aarch64-linux/ghc-9.4.6/stack-2.12.0/setup/setup.hs, /home/vscode/.cache/hie-bios/dist-stack-7d4030fb4073a5f963b4594938e6876d/build/aarch64-linux/ghc-9.4.6/stack-2.12.0/setup/Main.o )
[2 of 2] Linking /home/vscode/.cache/hie-bios/dist-stack-7d4030fb4073a5f963b4594938e6876d/build/aarch64-linux/ghc-9.4.6/stack-2.12.0/setup/setup
Configuring stack-2.12.0...
Preprocessing library for stack-2.12.0..
Error: setup: can't find source for Build_stack in src, src/unix/,
/home/vscode/.cache/hie-bios/dist-stack-7d4030fb4073a5f963b4594938e6876d/build/aarch64-linux/ghc-9.4.6/stack-2.12.0/build/autogen,
/home/vscode/.cache/hie-bios/dist-stack-7d4030fb4073a5f963b4594938e6876d/build/aarch64-linux/ghc-9.4.6/stack-2.12.0/build/global-autogen
Error: cabal: repl failed for stack-2.12.0.
Process Environment:
HIE_BIOS_GHC: /usr/local/lib/ghc-9.4.6/bin/ghc-9.4.6
HIE_BIOS_GHC_ARGS: -B/usr/local/lib/ghc-9.4.6/lib
Debug information
Steps according to https://github.com/benz0li/commercialhaskell-stack/tree/add-dev-containers/.devcontainer#cabal:
Cabal
Place the cradle (hie.yaml) for Cabal in the root of the workspace:
cp -f .devcontainer/assets/cradles/cabal/hie.yaml .
Command
cabal build
once.cabal build
causes Cabal (the library) to create the automatically generated moduleStack_build
.
ℹ️ cabal repl
works, too:
Haskell extension
Now, you can install and use the Haskell extension.
Choose
Manually via PATH
when asked the following question:![]()
Opening src/Stack.hs
: haskell-extension.log