-
Notifications
You must be signed in to change notification settings - Fork 0
chore: [sc-129896] Upgrade Smurf to GHC 9.2 #14
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
Conversation
Otherwise it's hard to differentiate it from the hls 1.8.0.0 binary should it exist.
@@ -88,8 +88,8 @@ RUN \ | |||
ARG HLS_VERSION=1.8.0.0 | |||
RUN \ | |||
set -o errexit -o xtrace; \ | |||
if test -n "$HLS_VERSION"; then \ | |||
ghcup install hls "$HLS_VERSION" --set; \ | |||
if test -n "$HLS_VERSION" && "$GHC_VERSION" == "9.2.5"; then \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can come back and make a conditional here to install 1.8 for 9.0.2 if we really want, but I'd prefer to get things working end to end in smurf first.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is what I'd like:
- If configured to do so, install HLS from source.
- Otherwise attempt to install HLS via GHCup.
- Or do nothing.
I feel like the easiest way to support that would be to have two environment variables: HLS_GIT_REF
and HLS_VERSION
. If HLS_GIT_REF
is set, HLS will be compiled from source using ghcup compile hls -g $HLS_GIT_REF
. Otherwise, if HLS_VERSION
is set, HLS will be installed using ghcup install hls $HLS_VERSION
. If neither are set, HLS is not installed.
Or perhaps we could try to be fancy by keeping the single HLS_VERSION
variable and checking to see if it looks like a commit. If it does, compile; otherwise install.
if echo "$HLS_VERSION" | grep --extended-regexp --quiet '^[0-9a-f]{40}$'
then echo compile
else echo install
fi
For example:
$ if echo '1.8.0.0' | egrep -q '^[0-9a-f]{40}$'; then echo compile; else echo install; fi
install
$ if echo '5d56aa70a84807d7659e72eacd4d91fee08dbdbb' | egrep -q '^[0-9a-f]{40}$'; then echo compile; else echo install; fi
compile
That way we can use HLS_VERSION=1.8.0.0
for GHC_VERSION=9.0.2
(as we currently do), but also support HLS_VERSION=5d56aa70a84807d7659e72eacd4d91fee08dbdbb
for GHC_VERSION=9.2.5
and GHC_VERSION=9.4.3
.
What do you think?
I was curious how this impacted the final image size:
So this branch is ... smaller? That's not what I expected. But that's great! |
I think that HLS was not actually installed: https://github.com/acilearning/docker-haskell/actions/runs/3432059625/jobs/5720913699#step:3:951
The command that failed was |
Story details: https://app.shortcut.com/itprotv/story/129896
I found that hls didn't work with ghc 9.2.4 because of what looks like an ABI error:
It just so happens that ghc 9.2.5 release notes has some potentially related items in the changelog:
hls doesn't support 9.2.5 in it's 1.8.0.0 release, but compiling from source as this PR does should (still waiting to test).
Would close #12