-
Notifications
You must be signed in to change notification settings - Fork 841
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
Nested stack exec getting confused #420
Comments
You might not believe that I actually need this to work...but I do. |
Strangely enough, flipping the overrides works:
For some reason |
So this bug, as I understand it, is as follows: stack is not checking for a stack-installed version of ghc under certain circumstances when the "correct version number but wrong arch" ghc is detected on the PATH. If you manually put the i386 ghc on your path, and then run |
Isn't the bug just that you used i86_64 instead of x86_64? You can change the default arch in your stack.yaml. stack defaults to the On Fri, Jun 26, 2015, 6:45 AM Dan Burton [email protected] wrote:
|
@snoyberg I botched the original issue description. See it as it is now. My apologies. |
Oh interesting, so if I build |
What's going on here is that stack only looks at one GHC on the PATH, not multiple. If you use stack to install the 64 bit compiler, it should work. We can discuss having stack fall back, it's not necessarily a bad idea. |
Looking at only one makes sense, I think, as long as it's the one with highest precedence. I would imagine that each nesting of |
Interesting insight. Yes, my 64-bit GHC is MinGHC, not stack's installation. So if stack had done it, it would find it properly? |
That's correct, and that's why you're seeing the behavior you are: the outer |
Yes, stack's logic is:
The second action is a lot more efficient than the first since it uses our metadata files, which is why checking an unbounded number of GHCs isn't a problem. |
So that's why it's not working for me. The GHC on my path is a 64-bit GHC (which stack didn't install), but stack is defaulting to 32-bit GHC (which it did install). So when I just run |
Would it make sense for stack to default to the architecture of the GHC that's already on the |
That's what would happen if we checked multiple GHCs on the PATH. It would require running |
Perhaps only keep looking if something (like a flag or configuration) is asking for a specific arch. |
That seems pretty ad-hoc to me to be honest, and likely to cause more confusion rather than less. I'd rather always check all GHCs on the PATH, or never do it, so that we can give people a clear explanation of what's going on. |
Fair enough...at least give up once you've found what you need. |
Stack is in a tough spot, since it needs to be both a chicken and an egg. |
Maybe a FAQ entry explaining how stack finds GHC would be enough for now. Would you be able to add an entry and link to this discussion? |
Done. |
Thanks. I think this issue is safe to close then. |
On Windows 8.1 64-bit with resolver of LTS-2.14.
I would expect that the inner
arch
override would win out.EDIT: My original message made no sense. Be sure you read it as it is now.
The text was updated successfully, but these errors were encountered: