haskell / haskell-ide-engine

The engine for haskell ide-integration. Not an IDE
BSD 3-Clause "New" or "Revised" License
2.38k stars 213 forks source link

Error with nonexistent setup-config #1716

Closed malte-v closed 4 years ago

malte-v commented 4 years ago

I'm trying to use HIE in a fresh obelisk project with VSCode (run from a nix-shell using ob run "code ."). It shows the following error:

Got error while processing diagnostics: readCreateProcess: /nix/store/5gwn8zrdvjrnbr2f9q3ciwjs49y0fq8p-cabal-helper-0.9.0.0/bin/cabal-helper-wrapper "--with-ghc=ghc" "--with-ghc-pkg=ghc-pkg" "--with-cabal=cabal" "v1-style" "/home/malte/testing/obelisk/backend" "/home/malte/testing/obelisk/backend/dist" "package-db-stack" "flags" "compiler-version" "ghc-merged-pkg-options" "config-flags" "non-default-config-flags" "ghc-src-options" "ghc-pkg-options" "ghc-lang-options" "ghc-options" "source-dirs" "entrypoints" "needs-build-output" (exit 1): failed

Some additional information from the output tab:

2020-03-30 15:56:31.762238572 [ThreadId 4] - run entered for hie-wrapper(hie-wrapper) Version 0.11.0.0 x86_64 ghc-8.6.5
2020-03-30 15:56:31.762900713 [ThreadId 4] - Current directory:/home/malte/testing/obelisk
2020-03-30 15:56:31.766750547 [ThreadId 4] - Cradle directory:/home/malte/testing/obelisk
2020-03-30 15:56:31.773036989 [ThreadId 4] - Using plain GHC version
2020-03-30 15:56:31.809083291 [ThreadId 4] - Project GHC version:8.6.5
2020-03-30 15:56:31.809361247 [ThreadId 4] - hie exe candidates :["hie-8.6.5","hie-8.6","hie"]
2020-03-30 15:56:31.810988294 [ThreadId 4] - found hie exe at:/nix/store/jfmz4vwf5j0g14jhnw7xg01mqq7gcqkd-build-tools-wrapper/bin/hie
2020-03-30 15:56:31.811292968 [ThreadId 4] - args:[]
2020-03-30 15:56:31.812049723 [ThreadId 4] - launching ....

2020-03-30 15:56:31.832162202 [ThreadId 4] - Using plain GHC version
2020-03-30 15:56:31.865550857 [ThreadId 4] - Run entered for HIE(hie) Version 0.11.0.0 x86_64 ghc-8.6.5
2020-03-30 15:56:31.865821842 [ThreadId 4] - Current directory:/home/malte/testing/obelisk
2020-03-30 15:56:31.870306049 [ThreadId 10] - Using plain GHC version
Using hie version: Version 0.11.0.0 x86_64 ghc-8.6.5
cabal-helper-wrapper: /home/malte/testing/obelisk/backend/dist/setup-config: openFile: does not exist (No such file or directory)

Apparently it's looking for a file named setup-config in backend/dist I only have a dist-newstyle/cache folder with the following contents in my project root:

compiler
config
elaborated-plan
improved-plan
plan.json
solver-plan
source-hashes

If this has any relevance, here is the output of hie --debug:

➜ obelisk  hie --debug
2020-03-30 16:07:28.849968671 [ThreadId 4] - Using plain GHC version
2020-03-30 16:07:28.886335713 [ThreadId 4] - Run entered for HIE(hie) Version 0.11.0.0 x86_64 ghc-8.6.5
2020-03-30 16:07:28.886811611 [ThreadId 4] - Current directory:/home/malte/testing/obelisk
2020-03-30 16:07:28.887265233 [ThreadId 4] - 

haskell-lsp:Starting up server ...

Does anyone have an idea what the problem could be? Thanks!

fendor commented 4 years ago

Your HIE version is old, you should upgrade. IIRC, this is before we supported cabal v2-* commands which this error is about.

In your version hie --debug does only start the LSP server, which is not useful for debugging stuff.