rikvdkleij / intellij-haskell

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

REPL couldn't be started for target #631

Closed gtier closed 3 years ago

gtier commented 3 years ago

I started a new Haskell project with stack new and get this error repeated in the event log. REPL couldn't be started for target `start:exe:start-exe` due to: cannot satisfy -package start-0.1.0.0 I'm using stack version 2.5.1

rikvdkleij commented 3 years ago

The REPL for the exe component can't be started if the lib component contains an error.

rikvdkleij commented 3 years ago

Please reopen if still an issue.

anmolitor commented 3 years ago

Not OP, but having the same problem. I get the message for executable and test suite, although the project builds fine with stack build --test --haddock --no-haddock-hyperlink-source (mentioned in the README). stack repl app:lib or any other target also works without issues. Kind of lost right now what the issue could be.

The plugin is really working great for the lib code, but its really awkward to work with tests without any typechecking :/

rikvdkleij commented 3 years ago

@andreasewering can you create example project so I can try to reproduce this issue?

anmolitor commented 3 years ago

@rikvdkleij I'm currently trying to get a reproducible more minimal example, but for now, here is my current learning project where the issue occurs https://gitlab.com/andreasewering/safari-zone/-/tree/master/backend

If you have docker installed you should be able to reproduce the issue rather quickly (a running postgresql server is needed due to postgresql-typed compile-time checking). Steps to setup are in the README.

anmolitor commented 3 years ago

I can confirm that typechecking in tests and exe works for a hello-world-type project with a single lib, executable and test-suite. So the issue might either be compile-time IO or multiple sub packages.

anmolitor commented 3 years ago

@rikvdkleij Seems like it was a temporary problem. While I tried to reproduce the bug with a smaller repository, the bug fixed itself after a couple of minutes. I reopened my normal project and waited a while with just lib files open and after that, typechecking in testfiles worked as well 👍

rikvdkleij commented 3 years ago

@andreasewering Great to hear!