-
Notifications
You must be signed in to change notification settings - Fork 175
Test failures on Nix #335
Comments
With these two commits and cabal-install made available during build:
|
Try again with this branch: https://github.com/DanielG/ghc-mod/tree/dev-issue-335 Looks like I accidentally dropped error information when running the test cases, this should print the actual error message. |
Make sure the branch head is b394b9f I had to rebase. |
|
Ah damn I had --enable-tests turned off :x Try again now d09ac82 |
Ah, now it's fairly clear what happens. During nix builds, $HOME is not what it would usually be when regular user runs these tests. We had a similar problem at dan-t/cabal-bounds#3 but the dev was unable to figure out how to get cabal to not use
|
Can't you just set |
Any news on this? |
Nope, maybe escalate to #haskell or haskell-cafe. Just realised I may be answering the wrong question :) |
@alanz :p |
Upon consulting some people it seems we may be able to set HOME for this project to a mutable directory for the purposes of the build but I did not have time to try it out. I'll do so today and let you know how it goes. |
Ok, cool |
OK, even with mutable directory + unset GHC_PACKAGE_PATH so that cabal is not upset, we end up with errors of the following kind:
It seems that you could close this issue and we'll have to deal with this ourselves, perhaps we need to do some more hacking so that In the meantime, maybe you could consider a flag which turns off cc @peti maybe he knows how to fix this properly |
From: Mateusz Kowalczyk notifications@github.com
That kind of sounds like the problem we were having in #269 but it
Unless the environment is vastly different once ghc-mod is installed ghc-mod needs access to all the cabal packages the projects it's being Maybe you should look at how cabal-install is packaged? |
#269 looks like the resulting binary wasn't being wrapped properly at the time
It is, we have wrappers in place which will pass available packages to ghc-mod on per-project basis. So in one project it will be passed all its dependencies and in another project all the other ones. This means that it can see the packages. We're basically passing it the list of packages it should use. I suspect the issue here is that something (cabal-install?) is not being wrapped during the testing phase while it should. So for reference, if in my project I depend on the (wrapped) |
Ah, ok :) |
I tried running the test suite of the latest release in NixOS, and it fails with the following errors:
A complete build log is at http://hydra.cryp.to/build/180776/nixlog/1/raw. I'm not sure how to interpret that error message. It would be great if the log contained the command that failed; apparently the test suite tries to execute a program that's not in $PATH? |
It does contain the command it's "cabal" ;) |
Ah, I suppose |
I already tried all this, skim through the thread a bit and you'll see that first I let it use This is with 5.0.1.1 |
I guess the problem is that the test suite doesn't know how to find the 3rd party libraries required for the build because it doesn't take advantage of the contents of |
Is |
It's a variable from GHC: http://www.haskell.org/ghc/docs/7.8.3/html/users_guide/packages.html. |
Ah, it overrides @peti BTW: |
@DanielG, the build-tool stanza contains executable names, not Haskell package names. If you add |
@peti I had to unset |
Ah, sorry. |
A possible solution to this situation would be to translate the contents of @DanielG, if we pass the paths to all those dependencies in the |
From: Peter Simons notifications@github.com
I'm afraid not.
|
@peti |
Is this still a problem or have you guys been able to work around all this stuff somehow? |
|
...Ok? So I see a bunch of |
I guess that answers your question, no? |
Well yeah, now the question is do you actually want to do something about it :P |
No, I don't. |
Fine, whatever. |
I'm getting this error using ghc-mod with atom on Nix EDIT: installing cabal-install works, but then it wants all the packages in environment.. |
The text was updated successfully, but these errors were encountered: