diff --git a/ChangeLog.md b/ChangeLog.md
--- a/ChangeLog.md
+++ b/ChangeLog.md
@@ -1,10 +1,28 @@
 # Changelog
 
-## v2.3.1
 
-**Changes since v2.1.3.1**
+## v2.3.3
 
+**Changes since v2.3.1**
+
+Other enhancements:
+
+* Add the `stack-developer-mode` flag
+
+Bug fixes:
+
+* When using the `STACK_YAML` env var with Docker, make the path absolute.
+* Fix the problem of `stack repl foo:test:bar` failing without a project
+  build before that. See
+  [#5213](https://github.com/commercialhaskell/stack/issues/5213)
+* Fix `stack sdist` introducing unneded sublibrary syntax when using
+  pvp-bounds. See
+  [#5289](https://github.com/commercialhaskell/stack/issues/5289)
+
+## v2.3.1
+
 Release notes:
+
 * We have reduced the number of platforms that we support with binary releases.
   The reason behind this is that we've been slowed down in our release process
   until now with issues trying to build binaries for less common platforms. In
@@ -12,14 +30,38 @@
   GHC versions), we're limiting support from the Stack team to:
 
     * Linux 64-bit (static)
-    * MacOS
+    * macOS
     * Windows 64-bit
 
   If others want to provide additional binaries, we will definitely be happy
   for the support. But since our CI system is currently able to produce these
   three bindists only, that's what we will be providing with the next release.
 
+* Since we no longer have dynamically linked Linux binaries, we are removing
+  removing the `-static` suffix from the static Linux binaries.  If you have
+  scripts to download the latest stable Linux binary, update them to use
+  `linux-x86_64` instead of `linux-x86_64-static` (if you are already using the
+  former, nothing needs to change).  For this release, both are supported, but
+  the next release will no longer have the `-static` variant.
+
+* We are also deprecating the download links at https://stackage.org/stack.
+  See this page for the current installation instructions:
+  https://docs.haskellstack.org/en/stable/install_and_upgrade/.
+
+* These are the canonical locations to download the latest stable binaries
+  from, and will continue to be supported going forward:
+
+    * Linux 64-bit (static): https://get.haskellstack.org/stable/linux-x86_64.tar.gz
+    * macOS: https://get.haskellstack.org/stable/osx-x86_64.tar.gz
+    * Windows 64-bit: https://get.haskellstack.org/stable/windows-x86_64.zip
+
+  As always, binaries for specific versions are available from the Github
+  releases: https://github.com/commercialhaskell/stack/releases.
+
+**Changes since v2.1.3.1**
+
 Major changes:
+
 * `setup-info-locations` yaml configuration now allows overwriting the default locations of `stack-setup-2.yaml`.
   [#5031](https://github.com/commercialhaskell/stack/pull/5031)
   [#2983](https://github.com/commercialhaskell/stack/issues/2983)
@@ -38,6 +80,7 @@
 * Remove the `freeze` command. It has been replaced by lock files.
 
 Behavior changes:
+
 * Remove the deprecated `--stack-setup-yaml` command line argument in favor of `--setup-info-yaml`
   [#2647](https://github.com/commercialhaskell/stack/issues/2647)
 
@@ -47,6 +90,7 @@
   See [#5210](https://github.com/commercialhaskell/stack/issues/5210).
 
 Other enhancements:
+
 * Add `build-output-timestamps` flag in yaml. Setting it to true
   prefixes each build log output line with a timestamp.
 
diff --git a/LICENSE b/LICENSE
--- a/LICENSE
+++ b/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2015-2019, Stack contributors
+Copyright (c) 2015-2020, Stack contributors
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
diff --git a/README.md b/README.md
--- a/README.md
+++ b/README.md
@@ -1,6 +1,7 @@
 ## The Haskell Tool Stack
 
-[![Build Status](https://dev.azure.com/commercialhaskell/stack/_apis/build/status/commercialhaskell.stack?branchName=master)](https://dev.azure.com/commercialhaskell/stack/_build/latest?definitionId=1?branchName=master)
+![Unit tests](https://github.com/commercialhaskell/stack/workflows/Unit%20tests/badge.svg)
+![Integration tests](https://github.com/commercialhaskell/stack/workflows/Integration%20tests/badge.svg)
 [![Release](https://img.shields.io/github/release/commercialhaskell/stack.svg)](https://github.com/commercialhaskell/stack/releases)
 [![Join the chat at https://gitter.im/commercialhaskell/stack](https://badges.gitter.im/commercialhaskell/stack.svg)](https://gitter.im/commercialhaskell/stack?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
 
diff --git a/doc/ChangeLog.md b/doc/ChangeLog.md
--- a/doc/ChangeLog.md
+++ b/doc/ChangeLog.md
@@ -1,10 +1,28 @@
 # Changelog
 
-## v2.3.1
 
-**Changes since v2.1.3.1**
+## v2.3.3
 
+**Changes since v2.3.1**
+
+Other enhancements:
+
+* Add the `stack-developer-mode` flag
+
+Bug fixes:
+
+* When using the `STACK_YAML` env var with Docker, make the path absolute.
+* Fix the problem of `stack repl foo:test:bar` failing without a project
+  build before that. See
+  [#5213](https://github.com/commercialhaskell/stack/issues/5213)
+* Fix `stack sdist` introducing unneded sublibrary syntax when using
+  pvp-bounds. See
+  [#5289](https://github.com/commercialhaskell/stack/issues/5289)
+
+## v2.3.1
+
 Release notes:
+
 * We have reduced the number of platforms that we support with binary releases.
   The reason behind this is that we've been slowed down in our release process
   until now with issues trying to build binaries for less common platforms. In
@@ -12,14 +30,38 @@
   GHC versions), we're limiting support from the Stack team to:
 
     * Linux 64-bit (static)
-    * MacOS
+    * macOS
     * Windows 64-bit
 
   If others want to provide additional binaries, we will definitely be happy
   for the support. But since our CI system is currently able to produce these
   three bindists only, that's what we will be providing with the next release.
 
+* Since we no longer have dynamically linked Linux binaries, we are removing
+  removing the `-static` suffix from the static Linux binaries.  If you have
+  scripts to download the latest stable Linux binary, update them to use
+  `linux-x86_64` instead of `linux-x86_64-static` (if you are already using the
+  former, nothing needs to change).  For this release, both are supported, but
+  the next release will no longer have the `-static` variant.
+
+* We are also deprecating the download links at https://stackage.org/stack.
+  See this page for the current installation instructions:
+  https://docs.haskellstack.org/en/stable/install_and_upgrade/.
+
+* These are the canonical locations to download the latest stable binaries
+  from, and will continue to be supported going forward:
+
+    * Linux 64-bit (static): https://get.haskellstack.org/stable/linux-x86_64.tar.gz
+    * macOS: https://get.haskellstack.org/stable/osx-x86_64.tar.gz
+    * Windows 64-bit: https://get.haskellstack.org/stable/windows-x86_64.zip
+
+  As always, binaries for specific versions are available from the Github
+  releases: https://github.com/commercialhaskell/stack/releases.
+
+**Changes since v2.1.3.1**
+
 Major changes:
+
 * `setup-info-locations` yaml configuration now allows overwriting the default locations of `stack-setup-2.yaml`.
   [#5031](https://github.com/commercialhaskell/stack/pull/5031)
   [#2983](https://github.com/commercialhaskell/stack/issues/2983)
@@ -38,6 +80,7 @@
 * Remove the `freeze` command. It has been replaced by lock files.
 
 Behavior changes:
+
 * Remove the deprecated `--stack-setup-yaml` command line argument in favor of `--setup-info-yaml`
   [#2647](https://github.com/commercialhaskell/stack/issues/2647)
 
@@ -47,6 +90,7 @@
   See [#5210](https://github.com/commercialhaskell/stack/issues/5210).
 
 Other enhancements:
+
 * Add `build-output-timestamps` flag in yaml. Setting it to true
   prefixes each build log output line with a timestamp.
 
diff --git a/doc/install_and_upgrade.md b/doc/install_and_upgrade.md
--- a/doc/install_and_upgrade.md
+++ b/doc/install_and_upgrade.md
@@ -24,7 +24,9 @@
 Binary packages are signed with this [signing key](SIGNING_KEY.md).
 
 If you are writing a script that needs to download the latest binary, you can
-use URLs like `https://get.haskellstack.org/stable/<PLATFORM>.<EXTENSION>` (e.g. https://get.haskellstack.org/stable/linux-x86_64-static.tar.gz) that always point to the latest stable release.
+use URLs like `https://get.haskellstack.org/stable/<PLATFORM>.<EXTENSION>`
+(e.g. https://get.haskellstack.org/stable/linux-x86_64.tar.gz) that always
+point to the latest stable release.
 
 ## Windows
 
@@ -236,15 +238,17 @@
 
 * Download the latest release:
 
-    * [Linux 64-bit, static](https://get.haskellstack.org/stable/linux-x86_64-static.tar.gz)
+    * [Linux 64-bit (static)](https://get.haskellstack.org/stable/linux-x86_64.tar.gz)
 
+    <!--
     * [Linux 32-bit, standard](https://get.haskellstack.org/stable/linux-i386.tar.gz)
       (note: requires libgmp.so.10, and will not work on some older
       distributions that have libgmp.so.3, such as CentOS 6)
+    -->
 
     <!-- * [Linux ARMv7](https://get.haskellstack.org/stable/linux-arm.tar.gz) -->
 
-    * [Linux AArch64](https://get.haskellstack.org/stable/linux-aarch64.tar.gz)
+    <!-- * [Linux AArch64](https://get.haskellstack.org/stable/linux-aarch64.tar.gz) -->
 
 * Extract the archive and place `stack` somewhere on your `$PATH` (see [Path section below](#path))
 
@@ -266,6 +270,7 @@
 
 * Now you can run `stack` from the terminal.
 
+<!--
 ## FreeBSD
 
 (only 64-bit currently available, tested on FreeBSD 10.3-RELEASE)
@@ -289,6 +294,7 @@
 * Extract the archive and place `stack` somewhere on your `$PATH` (see [Path section below](#path))
 
 * Now you can run `stack` from the terminal.
+-->
 
 ## Path
 
diff --git a/doc/travis_ci.md b/doc/travis_ci.md
--- a/doc/travis_ci.md
+++ b/doc/travis_ci.md
@@ -178,14 +178,3 @@
 - [simonmichael/hledger](https://github.com/simonmichael/hledger/blob/master/.travis.yml)
 - [fpco/wai-middleware-crowd](https://github.com/fpco/wai-middleware-crowd/blob/master/.travis.yml)
 - [commercialhaskell/all-cabal-hashes-tool](https://github.com/commercialhaskell/all-cabal-hashes-tool/blob/master/.travis.yml)
-
-## Future enhancements
-
-Once Travis whitelists the stack .deb files, we'll be able to simply include
-stack in the `addons` section, and automatically use the newest version of
-stack, avoiding that complicated `before_install` section This is being
-tracked in the
-[apt-source-whitelist](https://github.com/travis-ci/apt-source-whitelist/pull/7)
-and
-[apt-package-whitelist](https://github.com/travis-ci/apt-package-whitelist/issues/379)
-issue trackers.
diff --git a/doc/yaml_configuration.md b/doc/yaml_configuration.md
--- a/doc/yaml_configuration.md
+++ b/doc/yaml_configuration.md
@@ -951,7 +951,7 @@
     author-name: Your Name
     author-email: youremail@example.com
     category: Your Projects Category
-    copyright: 'Copyright (c) 2019 Your Name'
+    copyright: 'Copyright (c) 2020 Your Name'
     github-username: yourusername
 ```
 
@@ -1187,3 +1187,13 @@
 ```
 
 Since 2.0
+
+### stack-developer-mode
+
+Turns on a mode where some messages are printed at WARN level instead of DEBUG level, especially useful for developers of Stack itself. For official distributed binaries, this is set to `false` by default. When you build from source, it is set to `true` by default.
+
+```yaml
+stack-developer-mode: false
+```
+
+Since 2.3.3
diff --git a/src/Stack/Config.hs b/src/Stack/Config.hs
--- a/src/Stack/Config.hs
+++ b/src/Stack/Config.hs
@@ -371,6 +371,9 @@
              Nothing -> throwString $ "Failed to parse PANTRY_ROOT environment variable (expected absolute directory): " ++ show dir
              Just x -> pure x
          Nothing -> pure $ configStackRoot </> relDirPantry
+
+     let configStackDeveloperMode = fromFirst stackDeveloperModeDefault configMonoidStackDeveloperMode
+
      withPantryConfig
        pantryRoot
        hsc
diff --git a/src/Stack/Constants.hs b/src/Stack/Constants.hs
--- a/src/Stack/Constants.hs
+++ b/src/Stack/Constants.hs
@@ -120,6 +120,7 @@
     ,usrLibDirs
     ,testGhcEnvRelFile
     ,relFileBuildLock
+    ,stackDeveloperModeDefault
     )
     where
 
@@ -555,3 +556,7 @@
 -- | File inside a dist directory to use for locking
 relFileBuildLock :: Path Rel File
 relFileBuildLock = $(mkRelFile "build-lock")
+
+-- | What should the default be for stack-developer-mode
+stackDeveloperModeDefault :: Bool
+stackDeveloperModeDefault = STACK_DEVELOPER_MODE_DEFAULT
diff --git a/src/Stack/Docker.hs b/src/Stack/Docker.hs
--- a/src/Stack/Docker.hs
+++ b/src/Stack/Docker.hs
@@ -2,7 +2,6 @@
 {-# LANGUAGE CPP #-}
 {-# LANGUAGE ConstraintKinds #-}
 {-# LANGUAGE FlexibleContexts #-}
-{-# LANGUAGE MultiWayIf #-}
 {-# LANGUAGE NamedFieldPuns #-}
 {-# LANGUAGE OverloadedStrings #-}
 {-# LANGUAGE RankNTypes #-}
@@ -62,6 +61,7 @@
 import           System.Terminal (hIsTerminalDeviceOrMinTTY)
 import           Text.ParserCombinators.ReadP (readP_to_S)
 import           RIO.Process
+import qualified RIO.Directory
 
 #ifndef WINDOWS
 import           System.Posix.Signals
@@ -191,9 +191,9 @@
          bamboo = lookup "bamboo_buildKey" env
          jenkins = lookup "JENKINS_HOME" env
          msshAuthSock = lookup "SSH_AUTH_SOCK" env
-         mstackYaml = lookup "STACK_YAML" env
          muserEnv = lookup "USER" env
          isRemoteDocker = maybe False (isPrefixOf "tcp://") dockerHost
+     mstackYaml <- for (lookup "STACK_YAML" env) RIO.Directory.makeAbsolute
      image <- either throwIO pure (dockerImage docker)
      when (isRemoteDocker &&
            maybe False (isInfixOf "boot2docker") dockerCertPath)
diff --git a/src/Stack/Ghci.hs b/src/Stack/Ghci.hs
--- a/src/Stack/Ghci.hs
+++ b/src/Stack/Ghci.hs
@@ -183,8 +183,13 @@
               -- need is the location of main modules, not the rest.
               pkgs0 <- getGhciPkgInfos installMap addPkgs (fmap fst mfileTargets) pkgDescs
               figureOutMainFile bopts mainIsTargets localTargets pkgs0
+    let pkgTargets pn targets =
+          case targets of
+            TargetAll _  -> [T.pack (packageNameString pn)]
+            TargetComps comps -> [renderPkgComponent (pn, c) | c <- toList comps]
     -- Build required dependencies and setup local packages.
-    buildDepsAndInitialSteps opts (map (T.pack . packageNameString . fst) localTargets)
+    buildDepsAndInitialSteps opts $
+      concatMap (\(pn, (_, t)) -> pkgTargets pn t) localTargets
     targetWarnings localTargets nonLocalTargets mfileTargets
     -- Load the list of modules _after_ building, to catch changes in
     -- unlisted dependencies (#1180)
diff --git a/src/Stack/Options/DockerParser.hs b/src/Stack/Options/DockerParser.hs
--- a/src/Stack/Options/DockerParser.hs
+++ b/src/Stack/Options/DockerParser.hs
@@ -16,9 +16,8 @@
 -- | Options parser configuration for Docker.
 dockerOptsParser :: Bool -> Parser DockerOptsMonoid
 dockerOptsParser hide0 =
-    DockerOptsMonoid
-    <$> pure (Any False)
-    <*> firstBoolFlagsNoDefault
+    DockerOptsMonoid (Any False)
+    <$> firstBoolFlagsNoDefault
                        dockerCmdName
                        "using a Docker container. --docker implies 'system-ghc: true'"
                        hide
diff --git a/src/Stack/Options/ExecParser.hs b/src/Stack/Options/ExecParser.hs
--- a/src/Stack/Options/ExecParser.hs
+++ b/src/Stack/Options/ExecParser.hs
@@ -46,9 +46,8 @@
                          <*> eoCwdParser
   where
     eoEnvSettingsParser :: Parser EnvSettings
-    eoEnvSettingsParser = EnvSettings
-        <$> pure True
-        <*> boolFlags True
+    eoEnvSettingsParser = EnvSettings True
+        <$> boolFlags True
                 "ghc-package-path"
                 "setting the GHC_PACKAGE_PATH variable for the subprocess"
                 idm
diff --git a/src/Stack/Package.hs b/src/Stack/Package.hs
--- a/src/Stack/Package.hs
+++ b/src/Stack/Package.hs
@@ -1100,7 +1100,7 @@
   result <- liftIO $ Iface.fromFile hiPath
   case result of
     Left msg -> do
-      prettyWarnL
+      prettyStackDevL
         [ flow "Failed to decode module interface:"
         , style File $ fromString hiPath
         , flow "Decoding failure:"
diff --git a/src/Stack/SDist.hs b/src/Stack/SDist.hs
--- a/src/Stack/SDist.hs
+++ b/src/Stack/SDist.hs
@@ -232,7 +232,7 @@
             [ style Url "https://github.com/commercialhaskell/stack/issues/new"
             , style Url "https://github.com/haskell/cabal/issues/new"
             ]
-          , flow $ "The parse error is: " ++ unlines (map show errs)
+          , flow $ "The parse error is: " ++ unlines (map show (toList errs))
           , ""
           ]
     return
@@ -241,8 +241,7 @@
       )
   where
     addBounds :: Set PackageName -> InstallMap -> InstalledMap -> Dependency -> Dependency
-    -- FIXME
-    addBounds internalPackages installMap installedMap dep@(Dependency name range _) =
+    addBounds internalPackages installMap installedMap dep@(Dependency name range s) =
       if name `Set.member` internalPackages
         then dep
         else case foundVersion of
@@ -250,7 +249,7 @@
           Just version -> Dependency name (simplifyVersionRange
             $ (if toAddUpper && not (hasUpperBound range) then addUpper version else id)
             $ (if toAddLower && not (hasLowerBound range) then addLower version else id)
-              range) Set.empty
+              range) s
       where
         foundVersion =
           case Map.lookup name installMap of
diff --git a/src/Stack/Types/Config.hs b/src/Stack/Types/Config.hs
--- a/src/Stack/Types/Config.hs
+++ b/src/Stack/Types/Config.hs
@@ -169,6 +169,8 @@
   ,envOverrideSettingsL
   ,shouldForceGhcColorFlag
   ,appropriateGhcColorFlag
+  -- * Helper logging functions
+  ,prettyStackDevL
   -- * Lens reexport
   ,view
   ,to
@@ -214,7 +216,7 @@
 import           Path
 import qualified Paths_stack as Meta
 import qualified RIO.List as List
-import           RIO.PrettyPrint (HasTerm (..))
+import           RIO.PrettyPrint (HasTerm (..), StyleDoc, prettyWarnL, prettyDebugL)
 import           RIO.PrettyPrint.StylesUpdate (StylesUpdate,
                      parseStylesUpdateFromString, HasStylesUpdate (..))
 import           Stack.Constants
@@ -377,6 +379,8 @@
          -- ^ Enable GHC hiding source paths?
          ,configRecommendUpgrade    :: !Bool
          -- ^ Recommend a Stack upgrade?
+         ,configStackDeveloperMode  :: !Bool
+         -- ^ Turn on Stack developer mode for additional messages?
          }
 
 -- | A bit of type safety to ensure we're talking to the right database.
@@ -859,6 +863,8 @@
     , configMonoidRecommendUpgrade   :: !FirstTrue
     -- ^ See 'configRecommendUpgrade'
     , configMonoidCasaRepoPrefix     :: !(First CasaRepoPrefix)
+    , configMonoidStackDeveloperMode :: !(First Bool)
+    -- ^ See 'configStackDeveloperMode'
     }
   deriving (Show, Generic)
 
@@ -983,6 +989,8 @@
 
     configMonoidCasaRepoPrefix <- First <$> obj ..:? configMonoidCasaRepoPrefixName
 
+    configMonoidStackDeveloperMode <- First <$> obj ..:? configMonoidStackDeveloperModeName
+
     return ConfigMonoid {..}
   where
     handleExplicitSetupDep :: (Monad m, MonadFail m) => (Text, Bool) -> m (Maybe PackageName, Bool)
@@ -1148,6 +1156,9 @@
 configMonoidCasaRepoPrefixName :: Text
 configMonoidCasaRepoPrefixName = "casa-repo-prefix"
 
+configMonoidStackDeveloperModeName :: Text
+configMonoidStackDeveloperModeName = "stack-developer-mode"
+
 data ConfigException
   = ParseConfigFileException (Path Abs File) ParseException
   | ParseCustomSnapshotException Text ParseException
@@ -2126,3 +2137,11 @@
 -- | See 'globalReExecVersion'
 reExecL :: HasRunner env => SimpleGetter env Bool
 reExecL = globalOptsL.to (isJust . globalReExecVersion)
+
+-- | In dev mode, print as a warning, otherwise as debug
+prettyStackDevL :: HasConfig env => [StyleDoc] -> RIO env ()
+prettyStackDevL docs = do
+  config <- view configL
+  if configStackDeveloperMode config
+    then prettyWarnL docs
+    else prettyDebugL docs
diff --git a/src/Stack/Types/Resolver.hs b/src/Stack/Types/Resolver.hs
--- a/src/Stack/Types/Resolver.hs
+++ b/src/Stack/Types/Resolver.hs
@@ -4,7 +4,6 @@
 {-# LANGUAGE DeriveGeneric #-}
 {-# LANGUAGE FlexibleContexts #-}
 {-# LANGUAGE FlexibleInstances #-}
-{-# LANGUAGE MultiWayIf #-}
 {-# LANGUAGE OverloadedStrings #-}
 {-# LANGUAGE TypeFamilies #-}
 {-# LANGUAGE ScopedTypeVariables #-}
diff --git a/stack.cabal b/stack.cabal
--- a/stack.cabal
+++ b/stack.cabal
@@ -1,13 +1,13 @@
-cabal-version: 2.0
-name: stack
-version: 2.3.1
-license: BSD3
-license-file: LICENSE
-maintainer: manny@fpcomplete.com
-author: Commercial Haskell SIG
-homepage: http://haskellstack.org
-bug-reports: https://github.com/commercialhaskell/stack/issues
-synopsis: The Haskell Tool Stack
+cabal-version:      2.0
+name:               stack
+version:            2.3.3
+license:            BSD3
+license-file:       LICENSE
+maintainer:         manny@fpcomplete.com
+author:             Commercial Haskell SIG
+homepage:           http://haskellstack.org
+bug-reports:        https://github.com/commercialhaskell/stack/issues
+synopsis:           The Haskell Tool Stack
 description:
     Please see the documentation at <https://docs.haskellstack.org>
     for usage information.
@@ -21,8 +21,9 @@
     Note that the API for the library is not currently stable, and may
     change significantly, even between minor releases. It is
     currently only intended for use by the executable.
-category: Development
-build-type: Custom
+
+category:           Development
+build-type:         Custom
 extra-source-files:
     CONTRIBUTING.md
     ChangeLog.md
@@ -62,44 +63,49 @@
     src/test/Stack/Untar/test2.tar.gz
 
 source-repository head
-    type: git
+    type:     git
     location: https://github.com/commercialhaskell/stack
 
 custom-setup
-    setup-depends: Cabal >=3.0.0.0,
-                   base >=4.10 && <5,
-                   filepath >=1.4.2.1
+    setup-depends:
+        Cabal >=3.0.0.0,
+        base >=4.10 && <5,
+        filepath >=1.4.2.1
 
+flag developer-mode
+    description: By default, should extra developer information be output?
+    default:     False
+    manual:      True
+
 flag disable-git-info
-    description:
-        Disable compile-time inclusion of current git info in stack
-    default: False
-    manual: True
+    description: Disable compile-time inclusion of current git info in stack
+    default:     False
+    manual:      True
 
 flag hide-dependency-versions
     description:
         Hides dependency versions from 'stack --version', used only by building Stack and the default 'stack.yaml'.  Note to packagers/distributors: DO NOT OVERRIDE THIS FLAG IF YOU ARE BUILDING 'stack' ANY OTHER WAY (e.g. using cabal or from Hackage), as it makes debugging support requests more difficult.
-    default: False
-    manual: True
 
+    default:     False
+    manual:      True
+
 flag integration-tests
-    description:
-        Run the integration test suite
-    default: False
-    manual: True
+    description: Run the integration test suite
+    default:     False
+    manual:      True
 
 flag static
-    description:
-        Pass -static/-pthread to ghc when linking the stack binary.
-    default: False
-    manual: True
+    description: Pass -static/-pthread to ghc when linking the stack binary.
+    default:     False
+    manual:      True
 
 flag supported-build
     description:
         If false, causes 'stack --version' to issue a warning about the build being unsupported.  Should be True only if building with Stack and the default 'stack.yaml'.  Note to packagers/distributors: DO NOT OVERRIDE THIS FLAG IF YOU ARE BUILDING 'stack' ANY OTHER WAY (e.g. using cabal or from Hackage), as it makes debugging support requests more difficult.
-    default: False
-    manual: True
 
+    default:     False
+    manual:      True
+
 library
     exposed-modules:
         Control.Concurrent.Execute
@@ -208,16 +214,19 @@
         System.Process.Pager
         System.Terminal
         Paths_stack
-    hs-source-dirs: src/
+
+    hs-source-dirs:   src/
     other-modules:
         Path.Extended
         Stack.Types.Cache
-    autogen-modules:
-        Paths_stack
+
+    autogen-modules:  Paths_stack
     default-language: Haskell2010
-    ghc-options: -Wall -fwarn-tabs -fwarn-incomplete-uni-patterns
-                 -fwarn-incomplete-record-updates -optP-Wno-nonportable-include-path
-                 -fwarn-identities
+    ghc-options:
+        -Wall -fwarn-tabs -fwarn-incomplete-uni-patterns
+        -fwarn-incomplete-record-updates -optP-Wno-nonportable-include-path
+        -fwarn-identities
+
     build-depends:
         Cabal >=3.0.0.0,
         aeson >=1.4.6.0,
@@ -243,7 +252,7 @@
         exceptions >=0.10.4,
         extra >=1.6.19,
         file-embed >=0.0.11.1,
-        filelock >=0.1.1.4,
+        filelock >=0.1.1.5,
         filepath >=1.4.2.1,
         fsnotify >=0.3.0.1,
         generic-deriving >=1.12.4,
@@ -267,7 +276,7 @@
         network-uri >=2.6.2.0,
         open-browser >=0.2.1.0,
         optparse-applicative >=0.14.3.0,
-        pantry >=0.4.0.1,
+        pantry ==0.4.*,
         path >=0.6.1,
         path-io >=1.4.2,
         persistent >=2.9.2,
@@ -303,41 +312,48 @@
         yaml >=0.11.2.0,
         zip-archive >=0.4.1,
         zlib >=0.6.2.1
-    
+
     if os(windows)
-        cpp-options: -DWINDOWS
-        build-depends:
-            Win32 >=2.6.1.0
+        cpp-options:   -DWINDOWS
+        build-depends: Win32 >=2.6.1.0
+
     else
-        build-tools: hsc2hs -any
-        build-depends:
-            unix >=2.7.2.2
-    
+        build-tool-depends: hsc2hs:hsc2hs -any
+        build-depends:      unix >=2.7.2.2
+
+    if flag(developer-mode)
+        cpp-options: -DSTACK_DEVELOPER_MODE_DEFAULT=True
+
+    else
+        cpp-options: -DSTACK_DEVELOPER_MODE_DEFAULT=False
+
     if os(windows)
         hs-source-dirs: src/windows/
-        other-modules:
-            System.Uname
+        other-modules:  System.Uname
+
     else
-        c-sources:
-            src/unix/cbits/uname.c
+        c-sources:      src/unix/cbits/uname.c
         hs-source-dirs: src/unix/
-        other-modules:
-            System.Uname
+        other-modules:  System.Uname
 
 executable stack
-    main-is: Main.hs
-    hs-source-dirs: src/main
+    main-is:          Main.hs
+    hs-source-dirs:   src/main
     other-modules:
         BuildInfo
         Build_stack
         Paths_stack
+
     autogen-modules:
         Build_stack
         Paths_stack
+
     default-language: Haskell2010
-    ghc-options: -Wall -fwarn-tabs -fwarn-incomplete-uni-patterns
-                 -fwarn-incomplete-record-updates -optP-Wno-nonportable-include-path
-                 -threaded -rtsopts
+    ghc-options:
+        -Wall -fwarn-tabs -fwarn-incomplete-uni-patterns
+        -fwarn-incomplete-record-updates -optP-Wno-nonportable-include-path
+        -threaded -rtsopts
+
     build-depends:
         Cabal >=3.0.0.0,
         aeson >=1.4.6.0,
@@ -363,7 +379,7 @@
         exceptions >=0.10.4,
         extra >=1.6.19,
         file-embed >=0.0.11.1,
-        filelock >=0.1.1.4,
+        filelock >=0.1.1.5,
         filepath >=1.4.2.1,
         fsnotify >=0.3.0.1,
         generic-deriving >=1.12.4,
@@ -387,7 +403,7 @@
         network-uri >=2.6.2.0,
         open-browser >=0.2.1.0,
         optparse-applicative >=0.14.3.0,
-        pantry >=0.4.0.1,
+        pantry ==0.4.*,
         path >=0.6.1,
         path-io >=1.4.2,
         persistent >=2.9.2,
@@ -424,41 +440,49 @@
         yaml >=0.11.2.0,
         zip-archive >=0.4.1,
         zlib >=0.6.2.1
-    
+
     if os(windows)
-        cpp-options: -DWINDOWS
-        build-depends:
-            Win32 >=2.6.1.0
+        cpp-options:   -DWINDOWS
+        build-depends: Win32 >=2.6.1.0
+
     else
-        build-tools: hsc2hs -any
-        build-depends:
-            unix >=2.7.2.2
-    
+        build-tool-depends: hsc2hs:hsc2hs -any
+        build-depends:      unix >=2.7.2.2
+
+    if flag(developer-mode)
+        cpp-options: -DSTACK_DEVELOPER_MODE_DEFAULT=True
+
+    else
+        cpp-options: -DSTACK_DEVELOPER_MODE_DEFAULT=False
+
     if flag(static)
         ld-options: -static -pthread
-    
+
     if !flag(disable-git-info)
-        cpp-options: -DUSE_GIT_INFO
+        cpp-options:   -DUSE_GIT_INFO
         build-depends:
             githash >=0.1.3.3,
             optparse-simple >=0.1.1.2
-    
+
     if flag(hide-dependency-versions)
         cpp-options: -DHIDE_DEP_VERSIONS
-    
+
     if flag(supported-build)
         cpp-options: -DSUPPORTED_BUILD
 
 executable stack-integration-test
-    main-is: IntegrationSpec.hs
-    hs-source-dirs: test/integration test/integration/lib
+    main-is:          IntegrationSpec.hs
+    hs-source-dirs:   test/integration test/integration/lib
     other-modules:
         StackTest
         Paths_stack
+
     default-language: Haskell2010
-    ghc-options: -Wall -fwarn-tabs -fwarn-incomplete-uni-patterns
-                 -fwarn-incomplete-record-updates -optP-Wno-nonportable-include-path
-                 -threaded -rtsopts -with-rtsopts=-N
+    ghc-options:
+        -Wall -fwarn-tabs -fwarn-incomplete-uni-patterns
+        -fwarn-incomplete-record-updates -optP-Wno-nonportable-include-path
+        -threaded -rtsopts -with-rtsopts=-N
+
     build-depends:
         Cabal >=3.0.0.0,
         aeson >=1.4.6.0,
@@ -484,7 +508,7 @@
         exceptions >=0.10.4,
         extra >=1.6.19,
         file-embed >=0.0.11.1,
-        filelock >=0.1.1.4,
+        filelock >=0.1.1.5,
         filepath >=1.4.2.1,
         fsnotify >=0.3.0.1,
         generic-deriving >=1.12.4,
@@ -510,7 +534,7 @@
         open-browser >=0.2.1.0,
         optparse-applicative >=0.14.3.0,
         optparse-generic >=1.3.1,
-        pantry >=0.4.0.1,
+        pantry ==0.4.*,
         path >=0.6.1,
         path-io >=1.4.2,
         persistent >=2.9.2,
@@ -546,26 +570,31 @@
         yaml >=0.11.2.0,
         zip-archive >=0.4.1,
         zlib >=0.6.2.1
-    
+
     if os(windows)
-        cpp-options: -DWINDOWS
-        build-depends:
-            Win32 >=2.6.1.0
+        cpp-options:   -DWINDOWS
+        build-depends: Win32 >=2.6.1.0
+
     else
-        build-tools: hsc2hs -any
-        build-depends:
-            unix >=2.7.2.2
-    
+        build-tool-depends: hsc2hs:hsc2hs -any
+        build-depends:      unix >=2.7.2.2
+
+    if flag(developer-mode)
+        cpp-options: -DSTACK_DEVELOPER_MODE_DEFAULT=True
+
+    else
+        cpp-options: -DSTACK_DEVELOPER_MODE_DEFAULT=False
+
     if !flag(integration-tests)
         buildable: False
-    
+
     if flag(static)
         ld-options: -static -pthread
 
 test-suite stack-test
-    type: exitcode-stdio-1.0
-    main-is: Spec.hs
-    hs-source-dirs: src/test
+    type:             exitcode-stdio-1.0
+    main-is:          Spec.hs
+    hs-source-dirs:   src/test
     other-modules:
         Stack.ArgsSpec
         Stack.Build.ExecuteSpec
@@ -582,10 +611,13 @@
         Stack.Types.TemplateNameSpec
         Stack.UploadSpec
         Paths_stack
+
     default-language: Haskell2010
-    ghc-options: -Wall -fwarn-tabs -fwarn-incomplete-uni-patterns
-                 -fwarn-incomplete-record-updates -optP-Wno-nonportable-include-path
-                 -threaded
+    ghc-options:
+        -Wall -fwarn-tabs -fwarn-incomplete-uni-patterns
+        -fwarn-incomplete-record-updates -optP-Wno-nonportable-include-path
+        -threaded
+
     build-depends:
         Cabal >=3.0.0.0,
         QuickCheck >=2.13.2,
@@ -612,7 +644,7 @@
         exceptions >=0.10.4,
         extra >=1.6.19,
         file-embed >=0.0.11.1,
-        filelock >=0.1.1.4,
+        filelock >=0.1.1.5,
         filepath >=1.4.2.1,
         fsnotify >=0.3.0.1,
         generic-deriving >=1.12.4,
@@ -637,7 +669,7 @@
         network-uri >=2.6.2.0,
         open-browser >=0.2.1.0,
         optparse-applicative >=0.14.3.0,
-        pantry >=0.4.0.1,
+        pantry ==0.4.*,
         path >=0.6.1,
         path-io >=1.4.2,
         persistent >=2.9.2,
@@ -676,12 +708,17 @@
         yaml >=0.11.2.0,
         zip-archive >=0.4.1,
         zlib >=0.6.2.1
-    
+
     if os(windows)
-        cpp-options: -DWINDOWS
-        build-depends:
-            Win32 >=2.6.1.0
+        cpp-options:   -DWINDOWS
+        build-depends: Win32 >=2.6.1.0
+
     else
-        build-tools: hsc2hs -any
-        build-depends:
-            unix >=2.7.2.2
+        build-tool-depends: hsc2hs:hsc2hs -any
+        build-depends:      unix >=2.7.2.2
+
+    if flag(developer-mode)
+        cpp-options: -DSTACK_DEVELOPER_MODE_DEFAULT=True
+
+    else
+        cpp-options: -DSTACK_DEVELOPER_MODE_DEFAULT=False
diff --git a/stack.yaml b/stack.yaml
--- a/stack.yaml
+++ b/stack.yaml
@@ -18,6 +18,7 @@
   stack:
     hide-dependency-versions: true
     supported-build: true
+    developer-mode: true
 
 ghc-options:
    "$locals": -fhide-source-paths
@@ -26,7 +27,7 @@
 - Cabal-3.0.0.0@rev:0
 - hpack-0.33.0@rev:0
 - http-download-0.2.0.0@rev:0
-- filelock-0.1.1.4@rev:0
+- filelock-0.1.1.5@rev:0
 - pantry-0.4.0.1@rev:0
 - casa-client-0.0.1@rev:0
 - casa-types-0.0.1@rev:0
diff --git a/test/integration/lib/StackTest.hs b/test/integration/lib/StackTest.hs
--- a/test/integration/lib/StackTest.hs
+++ b/test/integration/lib/StackTest.hs
@@ -101,10 +101,10 @@
     liftIO $ hPutStrLn input cmd
 
 replGetLine :: Repl String
-replGetLine = fmap replStdout ask >>= liftIO . hGetLine
+replGetLine = ask >>= liftIO . hGetLine . replStdout
 
 replGetChar :: Repl Char
-replGetChar = fmap replStdout ask >>= liftIO . hGetChar
+replGetChar = ask >>= liftIO . hGetChar . replStdout
 
 runRepl :: HasCallStack => FilePath -> [String] -> ReaderT ReplConnection IO () -> IO ExitCode
 runRepl cmd args actions = do
