packages feed

stack 1.3.0 → 1.3.2

raw patch · 14 files changed

+203/−168 lines, 14 filesdep ~aesondep ~directorydep ~hpack

Dependency ranges changed: aeson, directory, hpack, hspec, mono-traversable, stack, vector

Files

ChangeLog.md view
@@ -1,5 +1,25 @@ # Changelog +## 1.3.2++Bug fixes:++* `stack config set` can now be used without a compiler installed+  [#2852](https://github.com/commercialhaskell/stack/issues/2852).+* `get-stack.sh` now installs correct binary on ARM for generic linux and raspbian,+  closing [#2856](https://github.com/commercialhaskell/stack/issues/2856).+* Correct the testing of whether a package database exists by checking+  for the `package.cache` file itself instead of the containing+  directory.+* Revert a change in the previous release which made it impossible to+  set local extra-dep packages as targets. This was overkill; we+  really only wanted to disable their test suites, which was already+  handled by a later+  patch. [#2849](https://github.com/commercialhaskell/stack/issues/2849)+* `stack new` always treats templates as being UTF-8 encoding,+  ignoring locale settings on a local machine. See+  [Yesod mailing list discussion](https://groups.google.com/d/msg/yesodweb/ZyWLsJOtY0c/aejf9E7rCAAJ)+ ## 1.3.0  Release notes:
doc/ChangeLog.md view
@@ -1,5 +1,25 @@ # Changelog +## 1.3.2++Bug fixes:++* `stack config set` can now be used without a compiler installed+  [#2852](https://github.com/commercialhaskell/stack/issues/2852).+* `get-stack.sh` now installs correct binary on ARM for generic linux and raspbian,+  closing [#2856](https://github.com/commercialhaskell/stack/issues/2856).+* Correct the testing of whether a package database exists by checking+  for the `package.cache` file itself instead of the containing+  directory.+* Revert a change in the previous release which made it impossible to+  set local extra-dep packages as targets. This was overkill; we+  really only wanted to disable their test suites, which was already+  handled by a later+  patch. [#2849](https://github.com/commercialhaskell/stack/issues/2849)+* `stack new` always treats templates as being UTF-8 encoding,+  ignoring locale settings on a local machine. See+  [Yesod mailing list discussion](https://groups.google.com/d/msg/yesodweb/ZyWLsJOtY0c/aejf9E7rCAAJ)+ ## 1.3.0  Release notes:
doc/GUIDE.md view
@@ -61,12 +61,8 @@ # Demonstrate that stack really isn't available michael@d30748af6d3d:~$ stack -bash: stack: command not found-# Get the signing key for the package repo-michael@d30748af6d3d:~$ wget -q -O- https://download.fpcomplete.com/ubuntu/fpco.key | sudo apt-key add --OK-michael@d30748af6d3d:~$ echo 'deb http://download.fpcomplete.com/ubuntu/trusty stable main'|sudo tee /etc/apt/sources.list.d/fpco.list-deb http://download.fpcomplete.com/ubuntu/trusty stable main-michael@d30748af6d3d:~$ sudo apt-get update && sudo apt-get install stack -y+# Install stack+wget -qO- https://get.haskellstack.org/ | sh # downloading... michael@d30748af6d3d:~$ stack --version Version 0.1.3.1, Git revision 908b04205e6f436d4a5f420b1c6c646ed2b804d7
doc/MAINTAINER_GUIDE.md view
@@ -2,11 +2,8 @@  ## Next release: -* Consider moving all the release scripts stuff to a separate repo, or make it-  easy to run the release tools from a separate repo than the version of Stack-  being released. This will make it much easier to adjust the release process as-  we go without ending up with stack binaries build from different git commit-  IDs.+* Stop building Linux distro+  packages [#2534](https://github.com/commercialhaskell/stack/issues/2534)  ## Pre-release steps @@ -34,12 +31,11 @@     * stack.yaml: bump to use latest LTS version, and check whether extra-deps       still needed * In RC branch:-    * Update the ChangeLog-      ([this comparison](https://github.com/commercialhaskell/stack/compare/stable...master)-      is handy):-        * Check for any important changes that missed getting an entry in Changelog+    * Update the ChangeLog:+        * Check for any important changes that missed getting an entry in+          Changelog (`git log origin/stable...HEAD`)         * Check for any entries that snuck into the previous version's changes-          due to merges+          due to merges (`git diff origin/stable HEAD ChangeLog.md`)     * Review documentation for any changes that need to be made         * Search for old Stack version, unstable stack version, and the next           "obvious" version in sequence (if doing a non-obvious jump), and@@ -69,6 +65,14 @@ [stack-release-script's README](https://github.com/commercialhaskell/stack/blob/master/etc/scripts/README.md#prerequisites) for requirements to perform the release, and more details about the tool. +A note about the `etc/scripts/*-releases.sh` scripts: if you run them from a+different working tree than the scripts themselves (e.g. if you have `stack1`+and `stack2` trees, and run `cd stack1;+../stack2/etc/scripts/vagrant-release.sh`) the scripts and Vagrantfiles from the+tree containing the script will be used to build the stack code in the current+directory. That allows you to iterate on the release process while building a+consistent and clean stack version.+ * Create a   [new draft Github release](https://github.com/commercialhaskell/stack/releases/new)   with tag and name `vX.Y.Z` (where X.Y.Z is the stack package's version), targetting the@@ -108,10 +112,6 @@ * On a machine with Vagrant installed:     * Run `etc/scripts/vagrant-distros.sh` -* Edit-  [stack-setup-2.yaml](https://github.com/fpco/stackage-content/blob/master/stack/stack-setup-2.yaml),-  and add the new linux64 stack bindist- * (SKIP) Submit a PR for the   [haskell-stack Homebrew formula](https://github.com/Homebrew/homebrew-core/blob/master/Formula/haskell-stack.rb)       * Ensure that the formula use the sdist uploaded to the Github release@@ -120,7 +120,7 @@  * (SKIP) [Flag the Arch Linux package as out-of-date](https://www.archlinux.org/packages/community/x86_64/stack/flag/) -* Push signed Git tag, matching Github release tag name, e.g.: `git tag -d vX.Y.Z && git tag -u+* Push signed Git tag, matching Github release tag name, e.g.: `git tag -d vX.Y.Z; git tag -u   0x575159689BEFB442 vX.Y.Z && git push -f origin vX.Y.Z`  * Reset the `release` branch to the released commit, e.g.: `git checkout release@@ -131,7 +131,7 @@ * Delete the RC branch (locally and on origin)  * Activate version for new release tag on-  [readthedocs.org](https://readthedocs.org/projects/stack/versions/), and+  [readthedocs.org](https://readthedocs.org/dashboard/stack/versions/), and   ensure that stable documentation has updated  * Upload haddocks to Hackage: `etc/scripts/upload-haddocks.sh`
doc/ghcjs.md view
@@ -39,19 +39,19 @@  Or for the latest one based on `ghc-8.0.1` (with more features): ```yaml-resolver: lts-7.8-compiler: ghcjs-0.2.1.9007008_ghc-8.0.1+resolver: lts-7.14+compiler: ghcjs-0.2.1.9007014_ghc-8.0.1 compiler-check: match-exact  setup-info:   ghcjs:     source:-      ghcjs-0.2.1.9007008_ghc-8.0.1:-          url: http://ghcjs.tolysz.org/ghc-8.0-2016-11-07-lts-7.8-9007008.tar.gz-          sha1: 190300a3725cde44b2a08be9ef829f2077bf8825+      ghcjs-0.2.1.9007014_ghc-8.0.1:+           url: http://ghcjs.tolysz.org/ghc-8.0-2016-12-25-lts-7.14-9007014.tar.gz+           sha1: 0d2ebe0931b29adca7cb9d9b9f77d60095bfb864 ``` The later can be generated via: https://github.com/tolysz/prepare-ghcjs-the fromer is a bit more manual. Those bundles are only tested against the latest `node-6.9.1`.+the fromer is a bit more manual. Those bundles are only tested against the latest `node-7.2.1`.  In order to corrrectly boot and use ghcjs, one might need to install `alex` `happy` `hscolour` `hsc2hs` with the normal ghc. @@ -59,6 +59,8 @@  |resolver|url|sha1| |---|---|---|+| lts-7.13 | http://ghcjs.tolysz.org/ghc-8.0-2016-12-18-lts-7.13-9007013.tar.gz | 530c4ee5e19e2874e128431c7ad421e336df0303 |+| lts-7.8 | http://ghcjs.tolysz.org/ghc-8.0-2016-11-07-lts-7.8-9007008.tar.gz | 190300a3725cde44b2a08be9ef829f2077bf8825 | | lts-7.7 | http://ghcjs.tolysz.org/ghc-8.0-2016-11-03-lts-7.7-9007007.tar.gz | ce169f85f1c49ad613ae77fc494d5565452ff59a | | lts-7.5 | http://ghcjs.tolysz.org/ghc-8.0-2016-10-24-lts-7.5-9007005.tar.gz | 450e81028d7f1eb82a16bc4b0809f30730c3e173 | | lts-7.4 | http://ghcjs.tolysz.org/ghc-8.0-2016-10-22-lts-7.4-9007004.tar.gz | ed77b3c15fedbadad5ab0e0afe1bd42c0a8695b4 |
doc/install_and_upgrade.md view
@@ -1,6 +1,6 @@ # Install/upgrade -For many Un*x operating systems, all you need to do is run:+For common Un*x operating systems (including macOS), all you need to do is run:      curl -sSL https://get.haskellstack.org/ | sh @@ -9,8 +9,8 @@     wget -qO- https://get.haskellstack.org/ | sh  Distribution packages are available for [Ubuntu](#ubuntu), [Debian](#debian),-[CentOS / Red Hat / Amazon Linux](#centos), [Fedora](#fedora),-[Arch Linux](#arch-linux) and unofficially [FreeBSD](#freebsd).+[Fedora](#fedora),+[Arch Linux](#arch-linux) and [FreeBSD](#freebsd). Binaries for other operating systems are listed below, and available on [the Github releases page](https://github.com/fpco/stack/releases). For the future, we are open to supporting more OSes (to request one, please@@ -72,6 +72,12 @@ [#2577](https://github.com/commercialhaskell/stack/issues/2577) for more information. +### Installer script++Run:++    curl -sSL https://get.haskellstack.org/ | sh+ ### Manual download  * Download the latest release:@@ -83,7 +89,7 @@ ### Using Homebrew  **macOS Sierra warning**: Homebrew's haskell-stack formula may not currently-work on Sierra, so we suggest using the manual above for now.+work on Sierra, so we suggest using the manual method above for now.  If you have a popular [brew](http://brew.sh/) tool installed, you can just do: @@ -110,113 +116,47 @@  ## Ubuntu -*note*: for 32-bit, use the [generic Linux option](#linux)-- 1. Get the FP Complete key:--        sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 575159689BEFB442-- 2. Add the appropriate source repository (if not sure, run ``lsb_release -a`` to find out your Ubuntu version):--      * Ubuntu 16.10 (amd64):--            echo 'deb http://download.fpcomplete.com/ubuntu yakkety main'|sudo tee /etc/apt/sources.list.d/fpco.list--      * Ubuntu 16.04 (amd64):--            echo 'deb http://download.fpcomplete.com/ubuntu xenial main'|sudo tee /etc/apt/sources.list.d/fpco.list--      * Ubuntu 15.10 (amd64):--            echo 'deb http://download.fpcomplete.com/ubuntu wily main'|sudo tee /etc/apt/sources.list.d/fpco.list--      * Ubuntu 14.04 (amd64)--            echo 'deb http://download.fpcomplete.com/ubuntu trusty main'|sudo tee /etc/apt/sources.list.d/fpco.list--      * Ubuntu 12.04 (amd64)--            echo 'deb http://download.fpcomplete.com/ubuntu precise main'|sudo tee /etc/apt/sources.list.d/fpco.list-- 3. Update apt and install+Use the [generic Linux option](#linux). -        sudo apt-get update && sudo apt-get install stack -y+There is also+a+[Ubuntu package](http://packages.ubuntu.com/search?keywords=haskell-stack&searchon=names&suite=all&section=all) for+Ubuntu 16.04 and up. Note that the distribution's Stack version lags behind, so+we recommend running `stack upgrade` after installing it.  ## Debian -*note*: for 32-bit, use the [generic Linux option](#linux)-- 1. Get the FP Complete key:--        sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 575159689BEFB442-- 2. Add the appropriate source repository:--      * Debian 8 (amd64):--            echo 'deb http://download.fpcomplete.com/debian jessie main'|sudo tee /etc/apt/sources.list.d/fpco.list--      * Debian 7 (amd64)--            echo 'deb http://download.fpcomplete.com/debian wheezy main'|sudo tee /etc/apt/sources.list.d/fpco.list--    For unstable Debian distributions, the package from the most recent stable-    release will usually work. If it doesn't, please-    [report it](https://github.com/commercialhaskell/stack/issues/new).-- 3. Update apt and install+Use the [generic Linux option](#linux). -        sudo apt-get update && sudo apt-get install stack -y+There is also+a+[Debian package](https://packages.debian.org/search?keywords=haskell-stack&searchon=names&suite=all&section=all) for+Stretch and up. Note that the distribution's Stack version lags behind, so+we recommend running `stack upgrade` after installing it.  ## <a name="centos"></a>CentOS / Red Hat / Amazon Linux -*note*: for 32-bit, use the [generic Linux option](#linux)-- 1. Add the appropriate source repository:--      * CentOS 7 / RHEL 7 (x86_64)--            curl -sSL https://download.fpcomplete.com/centos/7/fpco.repo | sudo tee /etc/yum.repos.d/fpco.repo--      * CentOS 6 / RHEL 6 (x86_64)--            curl -sSL https://download.fpcomplete.com/centos/6/fpco.repo | sudo tee /etc/yum.repos.d/fpco.repo-- 2. Install:--        sudo yum -y install stack+Use the [generic Linux option](#linux).  ## Fedora -*Note*: for 32-bit, you can use this- [Fedora Copr repo](https://copr.fedoraproject.org/coprs/petersen/stack/) (not- managed by the Stack release team, so not guaranteed to have the very latest- version) which can be enabled with: `sudo dnf copr enable petersen/stack`--   1. Add the appropriate source repository:--      * Fedora 24 (x86_64)--            curl -sSL https://download.fpcomplete.com/fedora/24/fpco.repo | sudo tee /etc/yum.repos.d/fpco.repo--      * Fedora 23 (x86_64)--            curl -sSL https://download.fpcomplete.com/fedora/23/fpco.repo | sudo tee /etc/yum.repos.d/fpco.repo--      * Fedora 22 (x86_64)--            curl -sSL https://download.fpcomplete.com/fedora/22/fpco.repo | sudo tee /etc/yum.repos.d/fpco.repo--   2. Install:+Use the [generic Linux option](#linux). -        sudo dnf -y install stack+There is also an+unofficial+[Fedora Copr repo](https://copr.fedoraproject.org/coprs/petersen/stack/) which+can be enabled with: `sudo dnf copr enable petersen/stack`. Note that this Stack+version may lag behind, so we recommend running `stack upgrade` after installing+it.  ## <a name="suse"></a>openSUSE / SUSE Linux Enterprise -*Note:* openSUSE's and SLE's `stack` package isn't managed by the Stack release-team, and since it is based on the version in Stackage LTS, and may lag new-releases by ten days or more.+Use the [generic Linux option](#linux). +There is also an unofficial SUSE package.  Note that this Stack+version may lag behind, so we recommend running `stack upgrade` after installing+it.  To install it:+  1. Add the appropriate OBS repository:        * openSUSE Tumbleweed@@ -237,12 +177,7 @@  ## Arch Linux -*Note:* `stack` package in the [community] repository isn't managed by the-Stack release team. Depending on the maintainer's availability, it can lag-new releases by some days.--  - [stack](https://www.archlinux.org/packages/community/x86_64/stack/) _latest stable version_-  - [haskell-stack-git](https://aur.archlinux.org/packages/haskell-stack-git/) _git version_+Use the [generic Linux option](#linux).  In order to use `stack setup` with older versions of GHC or on a 32-bit system, you may need the@@ -254,6 +189,13 @@ [ArchHaskell repository](https://wiki.archlinux.org/index.php/ArchHaskell), you can also get the `haskell-stack-tool` package from there. +There is also an unofficial package in the Arch community repository.  Note that this Stack+version may lag behind, so we recommend running `stack upgrade` after installing+it.++  - [stack](https://www.archlinux.org/packages/community/x86_64/stack/) _latest stable version_+  - [haskell-stack-git](https://aur.archlinux.org/packages/haskell-stack-git/) _git version_+ ## NixOS  Users who follow the `nixos-unstable` channel or the Nixpkgs `master` branch can install the latest `stack` release into their profile by running:@@ -280,19 +222,29 @@ manual section on Stack](http://nixos.org/nixpkgs/manual/#how-to-build-a-haskell-project-using-stack). -## Linux+## <a name="linux"></a>Linux (generic) -(64-bit and 32-bit options available)+### Installer script +Run:++    curl -sSL https://get.haskellstack.org/ | sh++or:++    wget -qO- https://get.haskellstack.org/ | sh++### Manual download+ * Download the latest release: -    * [Linux 64-bit, standard](https://www.stackage.org/stack/linux-x86_64)-    * [Linux 32-bit, standard](https://www.stackage.org/stack/linux-i386)+    * [Linux 64-bit, static](https://www.stackage.org/stack/linux-x86_64-static) -    If you are on an older distribution that only includes libgmp4 (libgmp.so.3), such as CentOS/RHEL/Amazon Linux 6.x, use one of these instead:+    * [Linux 32-bit, standard](https://www.stackage.org/stack/linux-i386) -    * [Linux 64-bit, libgmp4](https://www.stackage.org/stack/linux-x86_64-gmp4)     * [Linux 32-bit, libgmp4](https://www.stackage.org/stack/linux-i386-gmp4)+      (if you are on an older 32-bit distribution that only includes libgmp4+      (libgmp.so.3), such as CentOS/RHEL/Amazon Linux 6.)  * Extract the archive and place `stack` somewhere on your `$PATH` (see [Path section below](#path)) @@ -318,6 +270,14 @@  (only 64-bit currently available, tested on FreeBSD 10.3-RELEASE) +### Installer script++Run:++    curl -sSL https://get.haskellstack.org/ | sh++### Manual download+ * Install required dependencies:          pkg install devel/gmake perl5 lang/gcc misc/compat8x misc/compat9x converters/libiconv ca_root_nss@@ -355,6 +315,8 @@  There are essentially three different approaches to upgrade: +* The `stack` tool itself ships with an `upgrade` command, which will build `stack` from source and install it to the default install path (see the previous section). You can use `stack upgrade` to get the latest official release, and `stack upgrade --git` to install from Git and live on the bleeding edge. If you follow this, make sure that this directory is on your `PATH` and takes precedence over the system installed `stack`. For more information, see [this discussion](https://github.com/commercialhaskell/stack/issues/237#issuecomment-126793301).+ * If you're using a package manager (e.g., the Ubuntu debs listed above) and are happy with sticking with the officially released binaries, simply follow your normal package manager strategies for upgrading (e.g. `apt-get update && apt-get upgrade`).+ * If you're not using a package manager but want to stick with the official binaries (such as on Windows or Mac), you'll need to manually follow the steps above to download the newest binaries from the release page and replace the old binary.-* The `stack` tool itself ships with an `upgrade` command, which will build `stack` from source and install it to the default install path (see the previous section). You can use `stack upgrade` to get the latest official release, and `stack upgrade --git` to install from Git and live on the bleeding edge. If you follow this, make sure that this directory is on your `PATH` and takes precedence over the system installed `stack`. For more information, see [this discussion](https://github.com/commercialhaskell/stack/issues/237#issuecomment-126793301).
doc/yaml_configuration.md view
@@ -224,6 +224,29 @@ in `/usr/local/bin`, but you can specify a list using `executables` to only add some. +When you specify `entrypoints`, multiple containers will be built:  a project+container, and one container for each entrypoint.++For example the following configuration:++```yaml+image:+  containers:+  - name: myproject+    base: fpco/stack-run+    add:+      production/app-backend/conf/: /etc/app-backend+    entrypoints:+    - app-backend+```++will build one container tagged `myproject:latest` which contains the project +including the `/etc/app-backend` configuration data.++Another container tagged `myproject-app-backend:latest` based on the `myproject:latest`+will additionally contain the logic for starting the `app-backend` entrypoint.++ ### user-message  A user-message is inserted by `stack init` when it omits packages or adds
src/Stack/Build/Source.hs view
@@ -425,14 +425,6 @@         , lpCabalFile = lpvCabalFP lpv         , lpDir = lpvRoot lpv         , lpWanted = isJust mtarget-                  -- A local package marked as extra-dep should never-                  -- be treated as a target. Perhaps we should be-                  -- fixing this upstream of this function, not-                  -- certain, but this works for now. If in the future-                  -- we decide to move the extra-dep checking logic-                  -- upstream, this lpvExtraDep check should be-                  -- changed to an assertion.-                  && not (lpvExtraDep lpv)         , lpComponents = toComponents exes tests benches         -- TODO: refactor this so that it's easier to be sure that these         -- components are indeed unbuildable.
src/Stack/Docker.hs view
@@ -28,6 +28,7 @@ import           Control.Monad.IO.Class (MonadIO,liftIO) import           Control.Monad.Logger (MonadLogger,logError,logInfo,logWarn) import           Control.Monad.Reader (MonadReader,asks,runReaderT)+import           Control.Monad.Trans.Control (MonadBaseControl) import           Control.Monad.Writer (execWriter,runWriter,tell) import qualified "cryptohash" Crypto.Hash as Hash import           Data.Aeson.Extended (FromJSON(..),(.:),(.:?),(.!=),eitherDecode)@@ -79,11 +80,9 @@ import           System.Process.Run import           Text.Printf (printf) -#ifdef WINDOWS-import           Control.Monad.Trans.Control (MonadBaseControl)-#else+#ifndef WINDOWS import           Control.Concurrent (threadDelay)-import           Control.Monad.Trans.Control (MonadBaseControl, liftBaseWith)+import qualified Control.Monad.Trans.Control as Control import           System.Posix.Signals import qualified System.Posix.User as PosixUser #endif@@ -365,7 +364,7 @@          ,args])      before #ifndef WINDOWS-     runInBase <- liftBaseWith $ \run -> return (void . run)+     runInBase <- Control.liftBaseWith $ \run -> return (void . run)      oldHandlers <- forM [sigINT,sigABRT,sigHUP,sigPIPE,sigTERM,sigUSR1,sigUSR2] $ \sig -> do        let sigHandler = runInBase $ do              readProcessNull Nothing envOverride "docker"
src/Stack/GhcPkg.hs view
@@ -34,7 +34,7 @@ import qualified Data.Text as T import qualified Data.Text.Encoding as T import           Data.Text.Extra (stripCR)-import           Path (Path, Abs, Dir, toFilePath, parent)+import           Path (Path, Abs, Dir, toFilePath, parent, mkRelFile, (</>)) import           Path.Extra (toFilePathNoTrailingSep) import           Path.IO import           Prelude hiding (FilePath)@@ -87,14 +87,33 @@ createDatabase :: (MonadIO m, MonadLogger m, MonadBaseControl IO m, MonadCatch m)                => EnvOverride -> WhichCompiler -> Path Abs Dir -> m () createDatabase menv wc db = do-    exists <- doesDirExist db+    exists <- doesFileExist (db </> $(mkRelFile "package.cache"))     unless exists $ do-        -- Creating the parent doesn't seem necessary, as ghc-pkg-        -- seems to be sufficiently smart. But I don't feel like-        -- finding out it isn't the hard way-        ensureDir (parent db)-        _ <- tryProcessStdout Nothing menv (ghcPkgExeName wc) ["init", toFilePath db]-        return ()+        -- ghc-pkg requires that the database directory does not exist+        -- yet. If the directory exists but the package.cache file+        -- does, we're in a corrupted state. Check for that state.+        dirExists <- doesDirExist db+        args <- if dirExists+            then do+                $logWarn $ T.pack $ concat+                    [ "The package database located at "+                    , toFilePath db+                    , " is corrupted (missing its package.cache file)."+                    ]+                $logWarn "Proceeding with a recache"+                return ["--package-db", toFilePath db, "recache"]+            else do+                -- Creating the parent doesn't seem necessary, as ghc-pkg+                -- seems to be sufficiently smart. But I don't feel like+                -- finding out it isn't the hard way+                ensureDir (parent db)+                return ["init", toFilePath db]+        eres <- tryProcessStdout Nothing menv (ghcPkgExeName wc) args+        case eres of+            Left e -> do+                $logError $ T.pack $ "Unable to create package database at " ++ toFilePath db+                throwM e+            Right _ -> return ()  -- | Get the name to use for "ghc-pkg", given the compiler version. ghcPkgExeName :: WhichCompiler -> String
src/Stack/New.hs view
@@ -26,6 +26,7 @@ import           Control.Monad.Trans.Writer.Strict import           Data.Aeson import           Data.Aeson.Types+import qualified Data.ByteString as SB import qualified Data.ByteString.Lazy as LB import           Data.Conduit import           Data.Foldable (asum)@@ -41,6 +42,7 @@ import           Data.Text (Text) import qualified Data.Text as T import qualified Data.Text.Encoding as T+import qualified Data.Text.Encoding.Error as T (lenientDecode) import qualified Data.Text.IO as T import qualified Data.Text.Lazy as LT import           Data.Time.Calendar@@ -157,7 +159,7 @@                                                 <> "\"")         exists <- doesFileExist path         if exists-            then liftIO (T.readFile (toFilePath path))+            then liftIO (fmap (T.decodeUtf8With T.lenientDecode) (SB.readFile (toFilePath path)))             else throwM (FailedToLoadTemplate name (toFilePath path))     relRequest :: MonadThrow n => Path Rel File -> n Request     relRequest rel = parseRequest (defaultTemplateUrl <> "/" <> toFilePath rel)
src/main/Main.hs view
@@ -18,7 +18,7 @@ import           Control.Monad hiding (mapM, forM) import           Control.Monad.IO.Class import           Control.Monad.Logger-import           Control.Monad.Reader (ask, asks,local,runReaderT)+import           Control.Monad.Reader (asks, local) import           Control.Monad.Trans.Either (EitherT) import           Control.Monad.Writer.Lazy (Writer) import           Data.Attoparsec.Args (parseArgs, EscapingMode (Escaping))@@ -836,12 +836,9 @@  cfgSetCmd :: ConfigCmd.ConfigCmdSet -> GlobalOpts -> IO () cfgSetCmd co go@GlobalOpts{..} =-    withBuildConfigAndLock+    withMiniConfigAndLock         go-        (\_ -> do env <- ask-                  runReaderT-                      (cfgCmdSet co)-                      env)+        (cfgCmdSet co)  imgDockerCmd :: (Bool, [Text]) -> GlobalOpts -> IO () imgDockerCmd (rebuild,images) go@GlobalOpts{..} = do
stack.cabal view
@@ -1,5 +1,5 @@ name: stack-version: 1.3.0+version: 1.3.2 cabal-version: >=1.10 build-type: Custom license: BSD3@@ -313,7 +313,7 @@         optparse-applicative ==0.13.*,         path >=0.5.9 && <0.6,         path-io >=1.1.0 && <2.0.0,-        stack >=1.3.0 && <1.4,+        stack >=1.3.2 && <1.4,         text >=1.2.0.4 && <1.3,         transformers >=0.3.0.0 && <0.6     default-language: Haskell2010@@ -349,7 +349,7 @@         path-io >=1.1.0 && <2.0.0,         resourcet >=1.1.8.1 && <1.2,         retry >=0.6 && <0.8,-        stack >=1.3.0 && <1.4,+        stack >=1.3.2 && <1.4,         temporary >=1.2.0.4 && <1.3,         text >=1.2.2.1 && <1.3,         transformers >=0.3.0.0 && <0.6,
test/integration/lib/StackTest.hs view
@@ -13,7 +13,7 @@ import System.IO.Error import System.Process import System.Exit-import System.Info (os)+import System.Info (arch, os)  run' :: FilePath -> [String] -> IO ExitCode run' cmd args = do@@ -175,6 +175,9 @@  -- | Is the OS Alpine Linux? getIsAlpine = doesFileExist "/etc/alpine-release"++-- | Is the architecture ARM?+isARM = arch == "arm"  -- | To avoid problems with GHC version mismatch when a new LTS major -- version is released, pass this argument to @stack@ when running in