-
Notifications
You must be signed in to change notification settings - Fork 15
Support nix-based projects. #12
Comments
I had a very similar issue recently. In the end I deleted all |
Ah yes, see https://github.com/haskell/haskell-ide-engine#nix-cabal-helper-no-such-file-or-directory (which I've just PR'd to HIE recently) |
I had tried both these approaches, but no dice unfortunately. Removing the dist-newstyle directory makes cabal-helper-wrapper change its behavior to targeting
This seems to be due to the fact that cabal-helper does not seem aware that there is a Nix-provided cabal package database somewhere, as far as I can tell. But I'm not familiar with the tooling enough to conclude or even understand the logic. Ideally, should cabal-helper operate with a different cabal database than the project? What does HIE use it for? |
@chuwy , have you been able to make a pure Nix project work? It would be great to see that code, if you'd be able and willing to share it. :) Thanks again to you both. |
@freuk The cabal wrapper indeed does not use Nix's versions of cabal & co., which is I think also the reason why removing the "cabal-helper" caches is sometimes needed. Did you try a I think haskell/haskell-ide-engine#1126 will eventually be used, which should remove the need for this cabal wrapper helper thing completely. |
I got HIE working by running |
Yeah it sometimes takes a bit until it starts, glad you got it working :) I think we can close this issue: The original error is solved with removing the cabal helper caches as mentioned in the HIE readme, the next problem was solved with |
I still can't get this to work. I recently switched to cabal 3, since the only way I could get cabal v2 and hie to play together nicely was to keep using the old deprecated Now that the |
Here is the output that gets dumped when I try to start up VS Code in the folder: Output
|
Probably not all-hies specific: haskell/haskell-ide-engine#1373 |
This is something I was a little confused about. Is |
Ah, maybe it's not |
Hello - first of all, thanks for providing this and uploading the builds. I'm running into an issue trying to make this work on a nix-based project, which I'm describing here. Sorry about the example not being minimal, I just thought I'd reach out to see if anyone is using all-hies on nix-based projects already.
Essentially, I'm trying to use the nix-env build from the first readme one-liner in this project:
I run HIE from inside a nix-shell in that directory root. That (non-
--pure
) shell exposes the dependencies for the codebase as well as ghc 8.6.4 and cabal 2.4.1.0.HIE is started through my editor via the
hie-8.6.4
binary with arguments'--lsp -d -l ~/hie.log
.I'm running into cabal-helper related issues. The full HIE log is in this gist.
Running cabal-helper manually results in this error:
It seems like cabal-helper is really looking for file setup-config via a v1-style invocation in the dist-newstyle folder. I'm unfamiliar with cabal build styles - does anyone have an idea of what's going on? Referencing a similar issue on the archived hie-nix tracker: domenkozar/hie-nix#36.
Thanks for your time again!
The text was updated successfully, but these errors were encountered: