Open newton-migosi opened 1 year ago
Hi.
I followed the plugin's default config which executes ghci-dap via
cabal repl -w ghci-dap --repl-no-load --builddir=${workspaceFolder}/.vscode/dist-cabal-repl
(no "lib:local-library" option.)
Could you confirm the cabal command ?
From console log, seems that you ran the command with "lib:local-library" option.
CMD: cabal repl lib:local-library -w ghci-dap --repl-no-load --builddir=/workspace/.vscode/dist-cabal-repl -v
I added lib:local-library
to the command because the project has multiple libraries, so the command I ran was
cabal repl lib:local-library -w ghci-dap --repl-no-load --builddir=/workspace/.vscode/dist-cabal-repl -v
I could not reproduce this issue in my environment. CentOS, your haskell-template project.
Could you try running command from the terminal ? with ghci-dap, and without ghci-dap.
$ cd /to/project/directory
$
$ cabal repl lib:local-library -w ghci-dap --repl-no-load --builddir=/workspace/.vscode/dist-cabal-repl -v
$
$ cabal repl lib:local-library --repl-no-load --builddir=/workspace/.vscode/dist-cabal-repl -v
$
getting same result ?
Regards.
Here's the logs I get when using ghci-dap: https://gist.githubusercontent.com/newton-migosi/40372053427d5cfdc34401a57130cd50/raw/da98924c64664ac1f13350c0a23b702c8f7fc7d0/cabal-repl-ghci-dap.log.txt
Here's the logs without using ghci-dap: https://gist.githubusercontent.com/newton-migosi/40372053427d5cfdc34401a57130cd50/raw/da98924c64664ac1f13350c0a23b702c8f7fc7d0/cabal-repl-no-ghci-dap.log.txt
Executing cabal repl
without ghci-dap works and starts a ghci session, using ghci-dap fails with error logs:https://gist.githubusercontent.com/newton-migosi/40372053427d5cfdc34401a57130cd50/raw/da98924c64664ac1f13350c0a23b702c8f7fc7d0/cabal-repl-ghci-dap.errors.log.txt
The project I'm building is based off the haskell-template but I've pushed the changes to github at https://github.com/newton-migosi/mdn-local-library-tutorial/commit/b5be4eee5cc5f1f459368d69758a45678bb54f94 .. I'd written it to use docker to provision nix but I figure a direct nix develop
should provide a shell similar to what I'm working with
@phoityne I am facing the same issue. @newton-migosi did you find any resolution for this?
Hi.
I reproduced this issue.(centos9 + nix + haskell-template repo) Adding package-db option, it would work.
e.g.)
cabal repl -w ghci-dap --builddir=/work/haskell/haskell-template/.vscode/dist-cabal-repl --package-db=/nix/store/w1ycwrniik4bvzxj9849d5inz6j3x558-ghc-9.2.7-with-packa
ges/lib/ghc-9.2.7/package.conf.d/
relude package is included in ghc itself.
Regards.
Hi, thanks for the reply @phoityne
package-db flag/GHC_PACKAGE_PATH seems not to be working in my case, for now I have to manually added the package.conf.d path in code itself However, it fixed the error but later while debugging getting
` packages definitely up to date: packages previously probably up to date: packages now probably up to date: packages newly up to date: packages out to date: project-0.0.1.19-project-lib, project-0.0.1.19-project-lib, project-0.0.1.19-inplace-hspec packages invalid due to dep change: project-0.0.1.19-inplace-project, project-0.0.1.19-inplace-project-lib, project-0.0.1.19-inplace-hspec packages invalid due to build failure: project-0.0.1.19-inplace-project-lib
cabal: repl failed for project-0.0.1.19-inplace-project-lib. The build process segfaulted (i.e. SIGSEGV). `
I have tried debugging without ghci-dap and it's working just fine. any suggestions, what might have caused this issue?
Could you show full console log ?
e.g.)
$ cabal repl -v -w ghci-dap --builddir=/work/haskell/haskell-template/.vscode/dist-cabal-repl --package-db=/nix/store/w1ycwrniik4bvzxj9849d5inz6j3x558-ghc-9.2.7-with-packa
ges/lib/ghc-9.2.7/package.conf.d/
ghci> :l app/Main.hs
ghci> main
I'm building a haskell cabal project that uses Relude as the standard library.
In the project's
.cabal
file, I have a mixins stanza :When I then use the Haskell GHCi Debug Adapter VS Code plugin, I get an error from
ghci-dap
I followed the plugin's default config which executes
ghci-dap
viaMy setup is VS Code using a dev-container from https://github.com/xtruder/nix-devcontainer that provisions nix and all the nix derived tools including
ghci-dap
. I have in myflake.nix
Package versions