Skip to content

Commit

Permalink
Install GHC by default for upgrade command (fixes #797)
Browse files Browse the repository at this point in the history
  • Loading branch information
snoyberg committed Aug 23, 2015
1 parent a3b837a commit 0f00dbc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Other enhancements:
* Added the `--docker-env` argument, to set environment variables in Docker container.
* Set `LC_ALL` to UTF-8 encoding for builds to avoid "commitBuffer: invalid argument" errors from GHC [#793](https://github.com/commercialhaskell/stack/issues/793)
* Enable translitation for encoding on stdout and stderr [#824](https://github.com/commercialhaskell/stack/issues/824)
* By default, `stack upgrade` automatically installs GHC as necessary [#797](https://github.com/commercialhaskell/stack/issues/797)

* Added the `ghc-options` field to stack.yaml [#796](https://github.com/commercialhaskell/stack/issues/796)
* Added the `extra-path` field to stack.yaml
Expand Down
5 changes: 4 additions & 1 deletion src/Stack/Upgrade.hs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import Control.Monad.Reader (MonadReader, asks)
import Control.Monad.Trans.Control
import Data.Foldable (forM_)
import qualified Data.Map as Map
import Data.Monoid ((<>))
import qualified Data.Set as Set
import Network.HTTP.Client.Conduit (HasHttpManager, getHttpManager)
import Path
Expand Down Expand Up @@ -80,7 +81,9 @@ upgrade gitRepo mresolver = withSystemTempDirectory "stack-upgrade" $ \tmp' -> d
forM_ mdir $ \dir -> liftIO $ do
bconfig <- runStackLoggingT manager logLevel terminal reExec $ do
lc <- loadConfig
configMonoid
(configMonoid <> mempty
{ configMonoidInstallGHC = Just True
})
(Just $ dir </> $(mkRelFile "stack.yaml"))
lcLoadBuildConfig lc mresolver
envConfig1 <- runStackT manager logLevel bconfig terminal reExec $ setupEnv $ Just
Expand Down

0 comments on commit 0f00dbc

Please sign in to comment.