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

Docker: fix pull missing images with --docker-auto-pull (fixes #4598) #4604

Merged
merged 4 commits into from
Mar 13, 2019
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,16 @@ Other enhancements:
- Document the way stack interacts with the Cabal library.
* `get-stack` script now works on Windows CI machines of Appveyor,
Travis and Azure Pipelines. See
[#4535](https://github.com/commercialhaskell/stack/issues/4535)/
[#4535](https://github.com/commercialhaskell/stack/issues/4535)

Bug fixes:

- Stack handles ABI changes in FreeBSD 12 by differentiating that version from previous.
- Help text for the `templates` subcommand now reflects behaviour in stack 1.9 — that it
downloads and shows a help file, rather than listing available templates.
- Fix detection of aarch64 platform (this broke when we upgraded to a newer Cabal version).
- Docker: fix detecting and pulling missing images with `--docker-auto-pull`, see
[#4598](https://github.com/commercialhaskell/stack/issues/4598)

## v1.9.3

Expand Down
4 changes: 2 additions & 2 deletions src/Stack/Build/ConstructPlan.hs
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,8 @@ constructPlan ls0 baseConfigOpts0 locals extraToBuild0 localDumpPkgs loadPackage
throwM $ ConstructPlanFailed "Plan construction failed."
where
hasBaseInDeps bconfig =
elem $(mkPackageName "base")
$ map (packageIdentifierName . pirIdent) [i | (PLIndex i) <- bcDependencies bconfig]
$(mkPackageName "base") `elem`
[packageIdentifierName (pirIdent i) | (PLIndex i) <- bcDependencies bconfig]

mkCtx econfig = Ctx
{ ls = ls0
Expand Down
2 changes: 1 addition & 1 deletion src/Stack/Build/Source.hs
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ checkFlagsUsed boptsCli lps extraDeps snapshot = do

-- Check if flags specified in stack.yaml and the command line are
-- used, see https://github.com/commercialhaskell/stack/issues/617
let flags = map (, FSCommandLine) [(k, v) | (Just k, v) <- Map.toList $ boptsCLIFlags boptsCli]
let flags = [((k, v), FSCommandLine) | (Just k, v) <- Map.toList $ boptsCLIFlags boptsCli]
++ map (, FSStackYaml) (Map.toList $ bcFlags bconfig)

localNameMap = Map.fromList $ map (packageName . lpPackage &&& lpPackage) lps
Expand Down
3 changes: 2 additions & 1 deletion src/Stack/Docker.hs
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,8 @@ inspects :: (HasProcessContext env, HasLogFunc env)
=> [String] -> RIO env (Map String Inspect)
inspects [] = return Map.empty
inspects images =
do maybeInspectOut <- try (readDockerProcess ("inspect" : images))
do maybeInspectOut <-
try (BL.toStrict . fst <$> proc "docker" ("inspect" : images) readProcess_)
dbaynard marked this conversation as resolved.
Show resolved Hide resolved
case maybeInspectOut of
Right inspectOut ->
-- filtering with 'isAscii' to workaround @docker inspect@ output containing invalid UTF-8
Expand Down
1 change: 0 additions & 1 deletion src/Stack/Types/Compiler.hs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE TypeFamilies #-}

module Stack.Types.Compiler where
Expand Down