Skip to content

chore: [sc-126569] Upgrade to GHC 9.2 #7

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

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all 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
19 changes: 7 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ RUN \

# Install GHC.

ARG GHC_VERSION=9.0.2
ARG GHC_VERSION=9.2.4
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we not changing the default yet? I changed this because I assumed we were.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hadn't changed the default yet because I wanted the default no-arg Docker build to work: #5 (comment)

RUN \
set -o errexit -o xtrace; \
if test -n "$GHC_VERSION"; then \
Expand Down Expand Up @@ -83,17 +83,6 @@ RUN \
stack --version; \
fi

# Install HLS.

ARG HLS_VERSION=1.7.0.0
RUN \
set -o errexit -o xtrace; \
if test -n "$HLS_VERSION"; then \
ghcup install hls "$HLS_VERSION" --set; \
ghcup gc --hls-no-ghc; \
haskell-language-server-wrapper --version; \
fi

# Configure Cabal.

ARG CABAL_STORE=/cabal-store
Expand All @@ -106,6 +95,12 @@ RUN \
cabal user-config init --augment "store-dir: $CABAL_STORE"; \
fi

# Install HLS.

ARG HLS_VERSION=1.7.0.0
COPY install_hls.sh /
RUN bash /install_hls.sh

# Configure Stack.

ARG STACK_ROOT=/stack-root
Expand Down
16 changes: 16 additions & 0 deletions install_hls.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env bash

set -o errexit -o xtrace;

# shouldn't this get picked up from the docker environment? maybe not...
export HLS_VERSION="1.7.0.0"

if [[ "$GHC_VERSION" == "9.2.4" ]]; then
if test -n "$HLS_VERSION"; then
ghcup compile hls -j1 -g 26a6ca607930b85bb1a2491b8deaf1a363c2e3df --ghc "$GHC_VERSION" --cabal-update
else
ghcup install hls "$HLS_VERSION" --set
fi
ghcup gc --hls-no-ghc;
haskell-language-server-wrapper --version
fi