Skip to content

Commit

Permalink
Update: Alpine Linux 3.12, GHC 8.10.1, stackage nightly-2020-07-13
Browse files Browse the repository at this point in the history
Note:
  Interface file structure changed with GHC 8.10.1.
  This causes Stack to emit warnings like the following after build:

	Warning: Failed to decode module interface:
		 <..>/.stack_work/dist/<tuple>-<hash>/Cabal-3.2.0.0/build/demo/demo-tmp/Main.hi
	         Decoding failure:
	         Invalid magic: e49ceb0f

   For more details, see: commercialhaskell/stack#5134
  • Loading branch information
dacto committed Jul 14, 2020
1 parent 462ec01 commit 26d04e6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
14 changes: 7 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
################################################################################
# Set up environment variables, OS packages, and scripts that are common to the
# build and distribution layers in this Dockerfile
FROM alpine:3.9 AS base
FROM alpine:3.12 AS base

# Must be one of 'gmp' or 'simple'; used to build GHC with support for either
# 'integer-gmp' (with 'libgmp') or 'integer-simple'
Expand All @@ -10,8 +10,8 @@ FROM alpine:3.9 AS base
ARG GHC_BUILD_TYPE

# Must be a valid GHC version number
# tested with 8.4.4, 8.6.4, 8.6.5, 8.8.3
ARG GHC_VERSION=8.8.3
# tested with 8.4.4, 8.6.4, 8.6.5, 8.8.3, 8.10.1
ARG GHC_VERSION=8.10.3

# Add ghcup's bin directory to the PATH so that the versions of GHC it builds
# are available in the build layers
Expand Down Expand Up @@ -52,8 +52,8 @@ FROM base AS build-ghc

# Carry build args through to this stage
ARG GHC_BUILD_TYPE=gmp
ARG GHC_VERSION=8.8.3
ARG GHC_BOOTSTRAP_VERSION=8.4.3
ARG GHC_VERSION=8.10.1
ARG GHC_BOOTSTRAP_VERSION=8.8.3

RUN echo "Install OS packages necessary to build GHC" &&\
apk add --no-cache \
Expand All @@ -66,7 +66,7 @@ RUN echo "Install OS packages necessary to build GHC" &&\
ghc=~${GHC_BOOTSTRAP_VERSION} \
linux-headers \
libffi-dev \
llvm5 \
llvm10 \
musl-dev \
ncurses-dev \
perl \
Expand Down Expand Up @@ -122,7 +122,7 @@ FROM base

# Carry build args through to this stage
ARG GHC_BUILD_TYPE=gmp
ARG GHC_VERSION=8.8.3
ARG GHC_VERSION=8.10.1

COPY --from=build-ghc /.ghcup /.ghcup
COPY --from=build-tooling /usr/bin/stack /usr/bin/stack
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ stack = $(stack_yaml) stack
stack_docker = $(stack) --docker

# GHC version to build
TARGET_GHC_VERSION ?= 8.8.3
TARGET_GHC_VERSION ?= 8.10.1

################################################################################
# Standard build (runs in the Docker container)
Expand Down
4 changes: 2 additions & 2 deletions stack.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
resolver: lts-16.5
resolver: nightly-2020-07-13
packages:
- .

docker:
enable: false
repo: "alpine-haskell-gmp:8.8.3"
repo: "alpine-haskell-gmp:8.10.1"
stack-exe: image

0 comments on commit 26d04e6

Please sign in to comment.