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

Wrong condition for start of hlint with ghc-9.6.+ #654

Closed
mimi1vx opened this issue Mar 30, 2023 · 2 comments
Closed

Wrong condition for start of hlint with ghc-9.6.+ #654

mimi1vx opened this issue Mar 30, 2023 · 2 comments

Comments

@mimi1vx
Copy link
Contributor

mimi1vx commented Mar 30, 2023

if is requested ghc-9.6+ in matrix haskell-ci generates

- name: install hlint
       run: |
         if [ $((HCNUMVER => 90600)) -ne 0 ] ; then HLINTVER=$(cd /tmp && (${CABAL} v2-install -v $ARG_COMPILER --dry-run hlint  --constraint='hlint >=3.5 && <3.6' |  perl -ne 'if (/\bhlint-(\d+(\.\d+)*)\b/) { print "$1"; last; }')); echo "HLint version $HLINTVER" ; fi
         if [ $((HCNUMVER >= 90600)) -ne 0 ] ; then if [ ! -e $HOME/.haskell-ci-tools/hlint-$HLINTVER/hlint ]; then echo "Downloading HLint version $HLINTVER"; mkdir -p $HOME/.haskell-ci-tools; curl --write-out 'Status Code: %{http_code} Redirects: %{num_redirects} Total time: %{time_total} Total Dsize: %{size_download}\n' --silent --location --output $HOME/.haskell-ci-tools/hlint-$HLINTVER.tar.gz "https://github.com/ndmitchell/hlint/releases/download/v$HLINTVER/hlint-$HLINTVER-x86_64-linux.tar.gz"; tar -xzv -f $HOME/.haskell-ci-tools/hlint-$HLINTVER.tar.gz -C $HOME/.haskell-ci-tools; fi ; fi
         if [ $((HCNUMVER >= 90600)) -ne 0 ] ; then mkdir -p $CABAL_DIR/bin && ln -sf "$HOME/.haskell-ci-tools/hlint-$HLINTVER/hlint" $CABAL_DIR/bin/hlint ; fi
         if [ $((HCNUMVER >= 90600)) -ne 0 ] ; then hlint --version ; fi

but hlint dont support ghc-9.6.x yet so this action and all other with same condition will fail

@phadej
Copy link
Collaborator

phadej commented Mar 30, 2023

The workaround is simple: don't request GHC-9.6+.

Perfectly, hlint could be installable with ghcup.

I don't think there is an easy way to query which hlint versions exist and satisfy the version predicate specified (possibly implicitly) in config.

@RyanGlScott
Copy link
Contributor

This is likely obsolete after #717.

@phadej phadej closed this as completed Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants