-
Notifications
You must be signed in to change notification settings - Fork 842
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'stack build' succeeds while 'stack ghci' doesn't. Prelude missing? #847
Comments
This is because the yesod scaffolding is inconsistent in its usage of On Mon, Aug 24, 2015, 10:55 PM RGamma [email protected] wrote:
|
I don't see any reference to NoImplicitPrelude anywhere in the scaffolding, neither in the cabal file nor any other source file. It just made me wonder what |
The library component defines NoImplicitPrelude at https://github.com/yesodweb/yesod-scaffold/blob/0fb802b9c7a48f4f82cf818ab985096e194e7cdb/PROJECTNAME.cabal#L35. The test suite component, by contrast, does not define NoImplicitPrelude: https://github.com/yesodweb/yesod-scaffold/blob/0fb802b9c7a48f4f82cf818ab985096e194e7cdb/PROJECTNAME.cabal#L102. |
Sorry, test suite was incorrect, I meant the executable doesn't define NoImplicitPrelude. |
Never mind, on closer reading I see you're talking about the mini template, which doesn't define such language extension. This isn't an input problem then. |
I'm sorry, I should have been more clear about the 'mini' template. If you trace my initial steps, but choose the 'simple' template instead (which does have yesod's Prelude trickery in it), Edit: I should read all comments before replying... |
I am seeing the same with a fresh project created with
|
I have a similar problem with
https://github.com/bartavelle/language-puppet/blob/master/stack.yaml PS: everything works fine with |
@PierreR Can you try with the most recent Stack release and/or master? I'm having no such problem currently. Similarly @RGamma, I believe the problem you're reporting no longer occurs with master. |
I will do as soon as |
So I deleted my local stack config in ~/.stack, and installed stack's current git master from AUR (Version 0.1.5.0, Git revision 4b18f00 (2222 commits) x86_64), did
|
I'm unable to reproduce the problem on my system, I don't know what the difference would be. Could you somehow test on another system to see if you still reproduce? |
I tested the entire thing in VirtualBox as follows (takes some setup time, but at least it's reproducible): Edit: Possibly something to do with your env @snoyberg? |
I'll test this out. Just to confirm: did you test this with the deb-installed version of Stack as well? Did that succeed, or fail? |
I'm using the exact same version of stack, on an EC2 instance running Ubuntu 14.04, and unable to reproduce. Maybe it's a problem in 15.04 and Arch... which would be very strange. What's your |
Here is my output using stack-0.1.4: As a reminder, |
Note that |
I'm getting to the root of this, this seems to be a permission issue. Ubuntu root: https://gist.github.com/RGamma/ce6237ec9f5886e459d7 With the regular user you can recreate the failure if you: In summary: If the project directory and .ghci file are missing group write privileges, the failure occurs. To work around this you need to add group write permissions to at least one of project directory or.ghci. One a side note: The suggested fix for the warning you give when the project directory has group write permission ( Edit: One can of course use Edit 2: Sure enough, the umask for my regular user on the Arch machine is 022 (default directory permission 755, file permission 644) instead of 002 in the Ubuntu VM (default directory permission 775, file permission 664) |
We have #471 to prevent running under sudo by default. |
@borsboom, note that this wouldn't help people on distributions with a different default umask (Arch sets this in /etc/profile). If the cause of this issue will/can not be fixed, then some sort of warning should be implemented (In fact, I still don't really see why specifically missing write privileges would be causing such nondescript errors by ghci). |
As note, my problem is probably different because I have tried the suggestions above and it didn't make a difference. So if this issue is fixed, I would probably have to create a new one. |
I'm going to close this issue; I'm not quite certain what point is still being discussed here due to the various problems being raised together here. If there are still changes desired in Stack not reflected in other issues, please open up a new issue. |
I've recently hit a similar issue here, but I'm doing all kinds of mixing on a fakakta environment to satisfy some legacy constraints. Shortest way to explain the env nilcons/ghc-musl + source built stack-1.0.1 + running as root. I've tried adding the
|
@financecoding Feel free to open a new issue with the output of Does |
my project
I ran |
@gambogi That warning is provided by ghci itself. If you have a custom .ghci script, then it will use that, potentially changing what gets loaded / imported into ghci. |
This might or might not relate to #665.
I see the following for stack version 0.1.3.1, Git revision ebda694 (1662 commits) X86_64, using stackage lts-3.2 (yesod-bin needs to be installed).
Execute in order and choose the mini template when prompted:
The last command fails to produce a working ghci session, full log (these setlocale issues are not in the 0.1.3.1 release): https://gist.github.com/RGamma/4f6911292e6f20ace7f2
A workaround is to add
import Prelude
to each Haskell file in the directory, runstack clean
followed bystack ghci
.The text was updated successfully, but these errors were encountered: