Open varosi opened 4 years ago
If I run regular GHCi at the same place, like:
stack ghci --main-is main
and inside I do:
System.IO.putStrLn "test"
It doesn't give errors.
hm, It's strange that ghci-dap is running
[DAP][INFO] start ghci-dap-0.0.14.0. GHCi, version 8.6.5
instead of GHCi 8.8.3
It's my fault. I have builded it in another folder, where LTS was older.
But do you think that it could be good if there is a runtime check if versions mismatch and showing that to the user without proceeding with GHCi?
hm, there is another problem after matching the versions. When running debug session in VS Code, I got:
CMD: stack ghci --with-ghc=ghci-dap --no-build --main-is main Now, waiting for an initial prompt("Prelude>") from ghci.
And waiting infinitely. Then I tried to run the same command from the console:
stack ghci --with-ghc=ghci-dap --no-build --main-is main /Users/vasko/Projects/haskell/test/dbg2/dbg2.cabal was modified manually. Ignoring /Users/vasko/Projects/haskell/test/dbg2/package.yaml in favor of the cabal file. If you want to use the package.yaml file instead of the cabal file, then please delete the cabal file. Configuring GHCi with the following packages: dbg2 [DAP][INFO] start ghci-dap-0.0.14.0. GHCi, version 8.8.3: https://www.haskell.org/ghc/ :? for help [1 of 1] Compiling Lib ( /Users/vasko/Projects/haskell/test/dbg2/src/Lib.hs, interpreted ) Ok, one module loaded. Loaded GHCi configuration from /private/var/folders/9f/s1y16f_95tq8ldsqzc2kfmm80000gn/T/haskell-stack-ghci/c6e38927/ghci-script *Lib Lib>
So it actually doesn't end with "Prelude>".
Ah, found the solution. In launch.json file the field ghciInitialPrompt should be: "ghciInitialPrompt": "> "
What you think if this is the default value of it ('>' plus a space), so it doesn't depend on what library or folder is setup?
But do you think that it could be good if there is a runtime check if versions mismatch and showing that to the user without proceeding with GHCi?
What you think if this is the default value of it ('>' plus a space), so it doesn't depend on what library or folder is setup?
Thanks for your requests. 1st one, if ghci-dap can get the runtime ghc version(user development environment) somehow, I will add a version check.
2nd, I also think that only '> ' would be ok, as a default value.
Regards.
Configuration: LTS-15.5 GHC 8.8.3 macOS 10.15.4 Catalina installed via:
stack install haskell-dap ghci-dap haskell-debug-adapter
as mentioned in Haskell GHCi Debug Adapter plug-in of VS Code.I'm trying to run:
stack ghci --with-ghc=ghci-dap --no-build --main-is main
on a sample project generated with:
stack new dbg2
And it gave me:
I have tried also without --no-build option:
stack ghci --with-ghc=ghci-dap --main-is main
and it was the same.What can I do more?