dramforever / vscode-ghc-simple

Simple GHC (Haskell) integration for VSCode
ISC License
223 stars 15 forks source link

Missing "extra-source-files" causes breakage #13

Closed runeksvendsen closed 5 years ago

runeksvendsen commented 6 years ago

Steps to reproduce

  1. Add file to the "extra-source-files" section of .cabal/package.yaml that doesn't exist
  2. Start VS Code

The following is printed to the VS Code "OUTPUT" console:

ghci | The following errors occurred while parsing the build targets:
ghci | - Unknown local package: Warning
dramforever commented 6 years ago

This seems like an error from stack. Can you check the output of stack ide targets? Also, can you start stack repl properly?

It seems that all the hacks used to get the repl working is bound to keep breaking. I'll have to learn how ghc-mod and others do this.

runeksvendsen commented 6 years ago

stack ide targets gives the following output (to stderr):

[runesvendsen@mbp ~/code/crypto-depth-db (master *)]$ stack ide targets

Warning: Specified file "ChangeLog.md" for extra-source-files does not exist
crypto-depth-db:lib
crypto-depth-db:exe:write-test-data
crypto-depth-db:test:crypto-depth-db-test

stack repl seems to work just fine.

As far as I can see, stack shouldn't be mixing warnings with the actual output of the stack ide targets command. Warnings could be sent to stderr and the actual output to stdout, which would mean it'd be easy to filter off the unwanted output.

dramforever commented 6 years ago

Ha! That makes so much sense. Thanks.

I've just replaced the hard drive on my laptop. I'll update when I get my things back in working order.

dramforever commented 5 years ago

Hi! Sorry for the huge delay in updating. The bug you've revealed is fixed in #18 and is now in the latest version of vscode-ghc-simple. If it doesn't work as expected or causes other issues, feel free to reopen this discussion or create a new issue. Anyway, thanks for all your suggestions.