rikvdkleij / intellij-haskell

IntelliJ plugin for Haskell
https://rikvdkleij.github.io/intellij-haskell/
Apache License 2.0
1.31k stars 94 forks source link

New project creation failing with intero build errors #422

Closed aberent closed 5 years ago

aberent commented 5 years ago

Here is what should have been in the description:

I create a new, empty, project with a project SDK of Haskell Stack Tool (1.9.3), and I get lots of error messages about problems with intero. See below.

Once this happens I don't get the Haskell Error window, or error checking in the editor window.

12/05/19 19:35 Executing /usr/local/bin/stack build intero failed: /usr/local/bin/stack build intero:
Error: While constructing the build plan, the following exceptions were encountered: In the dependencies for intero-0.1.39: ghc-8.6.5 from stack configuration does not match >=7.8 && <=8.6.4 (latest matching version is 8.6.4) needed since intero is a build target. Some different approaches to resolving this:

19:35 [global-stack-repl] Stack REPL could not be started within 30 seconds

19:35 [global-stack-repl] Executable named intero not found on path: ["/home/anthony/haskell/htest/.stack-work/install/x86_64-linux-tinfo6/lts-13.21/8.6.5/bin","/home/anthony/.stack/snapshots/x86_64-linux-tinfo6/lts-13.21/8.6.5/bin","/home/anthony/.stack/compiler-tools/x86_64-linux-tinfo6/ghc-8.6.5/bin","/home/anthony/.stack/programs/x86_64-linux/ghc-tinfo6-8.6.5/bin","/home/anthony/.local/bin","/usr/local/sbin","/usr/local/bin","/usr/sbin","/usr/bin","/sbin","/bin","/usr/games","/usr/local/games","/snap/bin"]

19:35 [project-stack-repl-htest:lib] Stack REPL could not be started within 30 seconds

19:35 [project-stack-repl-htest:lib] Executable named intero not found on path: ["/home/anthony/haskell/htest/.stack-work/install/x86_64-linux-tinfo6/lts-13.21/8.6.5/bin","/home/anthony/.stack/snapshots/x86_64-linux-tinfo6/lts-13.21/8.6.5/bin","/home/anthony/.stack/compiler-tools/x86_64-linux-tinfo6/ghc-8.6.5/bin","/home/anthony/.stack/programs/x86_64-linux/ghc-tinfo6-8.6.5/bin","/home/anthony/.local/bin","/usr/local/sbin","/usr/local/bin","/usr/sbin","/usr/bin","/sbin","/bin","/usr/games","/usr/local/games","/snap/bin"]

19:35 [global-stack-repl] Stack REPL could not be started within 30 seconds

19:35 [global-stack-repl] Executable named intero not found on path: ["/home/anthony/haskell/htest/.stack-work/install/x86_64-linux-tinfo6/lts-13.21/8.6.5/bin","/home/anthony/.stack/snapshots/x86_64-linux-tinfo6/lts-13.21/8.6.5/bin","/home/anthony/.stack/compiler-tools/x86_64-linux-tinfo6/ghc-8.6.5/bin","/home/anthony/.stack/programs/x86_64-linux/ghc-tinfo6-8.6.5/bin","/home/anthony/.local/bin","/usr/local/sbin","/usr/local/bin","/usr/sbin","/usr/bin","/sbin","/bin","/usr/games","/usr/local/games","/snap/bin"]

19:35 Hoogle database does not exist. Hoogle features can be optionally enabled by menu option Tools/Haskell/(Re)Build Hoogle database

aberent commented 5 years ago

Now that I have investigated a bit more, it turns out that there is an easy workaround; change the resolver version in stack.yaml to lts-13.19 or earlier.

TimoMeijer commented 5 years ago

The core of the issue is that intero does not allow for ghc-8.6.5 yet, which should be fixed soonTM

develop7 commented 5 years ago

Now that https://github.com/chrisdone/intero/pull/619 has been merged, we should be good to go.

Eason0210 commented 5 years ago

With the new release of intreo,it works well. Thanks @develop7

TimoMeijer commented 5 years ago

For me it's still attempting to build intero-0.1.39, how would I get intellij-haskell to try and build intero-0.1.40?

rikvdkleij commented 5 years ago

Try stack update in project's folder.

Then reopen project.

rikvdkleij commented 5 years ago

Seems to be working now.