Skip to content
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 upgrade --git fails if correct GHC is not installed #797

Closed
CRogers opened this issue Aug 15, 2015 · 1 comment
Closed

stack upgrade --git fails if correct GHC is not installed #797

CRogers opened this issue Aug 15, 2015 · 1 comment

Comments

@CRogers
Copy link
Contributor

CRogers commented Aug 15, 2015

I just tried doing stack upgrade --git from stack 0.1.3.1. It gave the following error:

GHC version mismatched, found 7.10.1 (x86_64), but expected version 7.10.2 (x86_64) (based on
resolver setting in /var/folders/gx/7lt1gq996118d06q7g9ft7dd080grz/T/stack-upgrade1676/stack/stack.yaml).
Try running stack setup

It should probably run stack setup if you don't have the correct GHC installed.


On a side note, why doesn't stack build/install/test/etc automatically download the correct GHC for you anymore? One of the really cool things about stack was you literally run one command to get going and stack handles everything for you. The existence of stack setup seems to complicate this and leads to situations like above.

@borsboom borsboom added this to the Later improvements milestone Aug 16, 2015
@borsboom
Copy link
Contributor

Stack has recently become more precise about requiring an (nearly) exact GHC version match with the LTS snapshot (see #736), and since stack uses LTS 3.0 and LTS 3.0 requires GHC 7.10.2, you need GHC 7.10.2 to build stack.

It's been quite a while since stack installed GHC without stack setup. We changed the behaviour early on because the current behaviour seems to be preferred by most users. You can use the install-ghc option to change it if you prefer.

That said, I could see automatically installing the required GHC for the case of stack upgrade making sense. A pull request would be welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants