Closed ForNeVeR closed 4 years ago
The plugin expects a Cabal file, it's a prerequisite.
But Stack will generate it automatically on stack build
, couldn't we execute it ourselves on initial import?
When a Haskell project is opened, the first action of plugin is to build the project which generates the cabal file from package.yaml. So I don’t understand the issue.
And now I understand the issue :)
GHC installation on my machine was broken due to unfortunate https://gitlab.haskell.org/ghc/ghc/-/issues/17926
So, is it possible that during the first build, we don't check the stack exit code, and try to import the project anyway? Or maybe it is even by design?
and try to import the project anyway? Or maybe it is even by design?
Well, a compile error is no reason to not open or import the project.
Alright, so this was a corner case, only valid when a project cannot be compiled. Fair enough, in such a case I'll close the issue. Thanks for explanation!
That happened to me because the Stack executable was not found, mine is in /usr/bin/stack
but the extension looks into /usr/local/bin/stack
so I created that directory and created a symbolic link using sudo ln -s /usr/bin/stack /usr/local/bin/stack
and now it works without problems
I am setting up a fresh machine, have installed Stack (and made sure it's in the
PATH
), IDEA 2020.2 Beta (because I like living on the edge), and the latest IntelliJ Haskell plugin (v. 1.0.0-beta76).After trying to import a Stack project, I am being presented with the following error:
After that, an informational message is shown:
I can't share the project (yet), because it's part of my ICFP Contest submission (and will be available in a couple of days), but it's a pretty standard Stack package - with no Cabal file.