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

Use exact GHC versions rather than major-version #736 #784

Merged
merged 3 commits into from Aug 14, 2015

Conversation

Projects
None yet
2 participants
@mgsloan
Collaborator

mgsloan commented Aug 13, 2015

To test before commercialhaskell/stackage-content#8 is merged, replace this line with

    req = "https://raw.githubusercontent.com/fpco/stackage-content/c9165a5845370cf83b2dd373a66cb9a80f9bf74d/stack/stack-setup-2.yaml"

Description from the commit:

  • Requires the exact GHC version specified by the snapshot.
  • Deprecates major-version (ghc-7.10, ghc-7.8) resolvers, but still
    supports them. They resolve to the newest installed / available ghc
    matching that number.
  • Changes the format of stack-setup.yaml, and so changes which URL is
    used to find it (in order to not break old stack versions).
  • Refactors ensureTool code, as it already had a lot of special cases,
    which I found confusing. Main cause is that I needed to pass in a
    'CompilerVersion' instead of 'Version', but just for installing ghc,
    not for git.
  • Introduces a 'CompilerVersion' type, and changes some naming to
    specify that compiler versions are being passed around rather than ghc
    versions. The change could be a simpler without this, but this will
    be helpful for GHCJS support.
Finer specification of compiler versions #736
* Stack now defaults to matching the minor version specified in the
  resolver / snapshot, whereas before only the major version was
  significant.

* Adds a 'compiler-check' field which specifies a policy for checking
  the GHC version.

* Changes the format of stack-setup.yaml, and so changes which URL is
  used to find it (in order to not break old stack versions).

* Refactors ensureTool code, as it already had a lot of special cases,
  which I found confusing.  Main cause is that I needed to pass in a
  'CompilerVersion' instead of 'Version', but just for installing ghc,
  not for git.

* Introduces a 'CompilerVersion' type, and changes some naming to
  specify that compiler versions are being passed around rather than ghc
  versions.  The change could be a simpler without this, but this will
  be helpful for GHCJS support.

@mgsloan mgsloan force-pushed the 736-exact-ghc-versions branch from 66d990a to fcedab0 Aug 14, 2015

@@ -735,7 +735,7 @@ data CustomSnapshot = CustomSnapshot
instance FromJSON CustomSnapshot where
parseJSON = withObject "CustomSnapshot" $ \o -> CustomSnapshot
<$> ((o .: "compiler") >>= (\t -> maybe (fail $ "Invalid compiler: " ++ T.unpack t) return $ do
t' <- T.stripPrefix "ghc-" t
parseVersionFromString $ T.unpack t'))
GhcVersion v <- parseCompilerVersion t

This comment has been minimized.

@snoyberg

snoyberg Aug 14, 2015

Contributor

Probably shouldn't use this kind of match, as the compiler will hide the incomplete pattern match, and you're about to add more constructors (I presume).

This comment has been minimized.

@snoyberg

snoyberg Aug 14, 2015

Contributor

I'll make the change myself, it will also give me a chance to compile/test it locally.

@snoyberg snoyberg added this to the 0.2.0.0 milestone Aug 14, 2015

@snoyberg snoyberg merged commit ff24fb9 into master Aug 14, 2015

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@snoyberg snoyberg removed the in progress label Aug 14, 2015

@mgsloan mgsloan deleted the 736-exact-ghc-versions branch Oct 16, 2015

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