diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml index ef5b1f8..66d5219 100644 --- a/.github/workflows/haskell-ci.yml +++ b/.github/workflows/haskell-ci.yml @@ -8,9 +8,9 @@ # # For more information, see https://github.com/haskell-CI/haskell-ci # -# version: 0.16 +# version: 0.17.20230826 # -# REGENDATA ("0.16",["github","cabal.project","--allow-failures",">= 9.2","--distribution","focal"]) +# REGENDATA ("0.17.20230826",["github","cabal.project","--allow-failures",">= 9.2","--distribution","focal"]) # name: Haskell-CI on: @@ -32,9 +32,14 @@ jobs: strategy: matrix: include: - - compiler: ghc-9.2.7 + - compiler: ghc-9.4.7 compilerKind: ghc - compilerVersion: 9.2.7 + compilerVersion: 9.4.7 + setup-method: ghcup + allow-failure: true + - compiler: ghc-9.2.8 + compilerKind: ghc + compilerVersion: 9.2.8 setup-method: ghcup allow-failure: true - compiler: ghc-9.0.2 @@ -65,7 +70,7 @@ jobs: apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 if [ "${{ matrix.setup-method }}" = ghcup ]; then mkdir -p "$HOME/.ghcup/bin" - curl -sL https://downloads.haskell.org/ghcup/0.1.19.2/x86_64-linux-ghcup-0.1.19.2 > "$HOME/.ghcup/bin/ghcup" + curl -sL https://downloads.haskell.org/ghcup/0.1.19.5/x86_64-linux-ghcup-0.1.19.5 > "$HOME/.ghcup/bin/ghcup" chmod a+x "$HOME/.ghcup/bin/ghcup" "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false) "$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false) @@ -74,7 +79,7 @@ jobs: apt-get update apt-get install -y "$HCNAME" mkdir -p "$HOME/.ghcup/bin" - curl -sL https://downloads.haskell.org/ghcup/0.1.19.2/x86_64-linux-ghcup-0.1.19.2 > "$HOME/.ghcup/bin/ghcup" + curl -sL https://downloads.haskell.org/ghcup/0.1.19.5/x86_64-linux-ghcup-0.1.19.5 > "$HOME/.ghcup/bin/ghcup" chmod a+x "$HOME/.ghcup/bin/ghcup" "$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false) fi @@ -90,10 +95,12 @@ jobs: echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV" HCDIR=/opt/$HCKIND/$HCVER if [ "${{ matrix.setup-method }}" = ghcup ]; then - HC=$HOME/.ghcup/bin/$HCKIND-$HCVER + HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER") + HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#') + HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#') echo "HC=$HC" >> "$GITHUB_ENV" - echo "HCPKG=$HOME/.ghcup/bin/$HCKIND-pkg-$HCVER" >> "$GITHUB_ENV" - echo "HADDOCK=$HOME/.ghcup/bin/haddock-$HCVER" >> "$GITHUB_ENV" + echo "HCPKG=$HCPKG" >> "$GITHUB_ENV" + echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV" echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV" else HC=$HCDIR/bin/$HCKIND @@ -243,16 +250,28 @@ jobs: - name: prepare for constraint sets run: | rm -f cabal.project.local + - name: constraint set servant-0.20 + run: | + $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='servant ==0.20.*' all --dry-run + cabal-plan topo | sort + $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='servant ==0.20.*' --dependencies-only -j2 all + $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='servant ==0.20.*' all - name: constraint set servant-0.19 run: | + $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='servant ==0.19.*' all --dry-run + cabal-plan topo | sort $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='servant ==0.19.*' --dependencies-only -j2 all $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='servant ==0.19.*' all - name: constraint set servant-0.18 run: | + if [ $((HCNUMVER < 90200)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='servant ==0.18.*' all --dry-run ; fi + if [ $((HCNUMVER < 90200)) -ne 0 ] ; then cabal-plan topo | sort ; fi if [ $((HCNUMVER < 90200)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='servant ==0.18.*' --dependencies-only -j2 all ; fi if [ $((HCNUMVER < 90200)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='servant ==0.18.*' all ; fi - name: constraint set servant-0.17 run: | + if [ $((HCNUMVER < 81000)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='servant ==0.17.*' all --dry-run ; fi + if [ $((HCNUMVER < 81000)) -ne 0 ] ; then cabal-plan topo | sort ; fi if [ $((HCNUMVER < 81000)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='servant ==0.17.*' --dependencies-only -j2 all ; fi if [ $((HCNUMVER < 81000)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='servant ==0.17.*' all ; fi - name: save cache diff --git a/cabal.haskell-ci b/cabal.haskell-ci index ed6a933..5d766d6 100644 --- a/cabal.haskell-ci +++ b/cabal.haskell-ci @@ -9,5 +9,9 @@ constraint-set servant-0.18 constraints: servant ==0.18.* constraint-set servant-0.19 - ghc: >= 8.0 && <9.4 + ghc: >= 8.6 && <9.6 constraints: servant ==0.19.* + +constraint-set servant-0.20 + ghc: >= 8.6 && <9.8 + constraints: servant ==0.20.* diff --git a/servant-multipart-api/servant-multipart-api.cabal b/servant-multipart-api/servant-multipart-api.cabal index 5c6919b..cad1cfa 100644 --- a/servant-multipart-api/servant-multipart-api.cabal +++ b/servant-multipart-api/servant-multipart-api.cabal @@ -20,7 +20,8 @@ tested-with: || ==8.8.4 || ==8.10.7 || ==9.0.2 - || ==9.2.7 + || ==9.2.8 + || ==9.4.7 library default-language: Haskell2010 @@ -36,7 +37,7 @@ library -- other dependencies build-depends: - servant >=0.16 && <0.20 + servant >=0.16 && <0.21 -- servant-0.19 dropped support for GHC-8.4 (latest GHCJS version), -- due to QuantifiedConstraints diff --git a/servant-multipart-client/servant-multipart-client.cabal b/servant-multipart-client/servant-multipart-client.cabal index 20bd706..797510b 100644 --- a/servant-multipart-client/servant-multipart-client.cabal +++ b/servant-multipart-client/servant-multipart-client.cabal @@ -19,7 +19,8 @@ tested-with: || ==8.8.4 || ==8.10.7 || ==9.0.2 - || ==9.2.7 + || ==9.2.8 + || ==9.4.7 library default-language: Haskell2010 @@ -38,8 +39,8 @@ library build-depends: servant-multipart-api == 0.12.* , http-media >=0.7.1.3 && <0.9 - , servant >=0.16 && <0.20 - , servant-client-core >=0.16 && <0.20 + , servant >=0.16 && <0.21 + , servant-client-core >=0.16 && <0.21 -- servant-0.19 dropped support for GHC-8.4 (latest GHCJS version), -- due to QuantifiedConstraints diff --git a/servant-multipart-client/src/Servant/Multipart/Client.hs b/servant-multipart-client/src/Servant/Multipart/Client.hs index 6eba689..2eae047 100644 --- a/servant-multipart-client/src/Servant/Multipart/Client.hs +++ b/servant-multipart-client/src/Servant/Multipart/Client.hs @@ -74,7 +74,7 @@ instance MultipartClient Tmp where readHandle hdl = fromActionStep LBS.null (LBS.hGet hdl 4096) instance MultipartClient Mem where - loadFile _ = source . pure + loadFile _ = source . pure @[] -- | Generates a boundary to be used to separate parts of the multipart. -- Requires 'IO' because it is randomized. @@ -132,7 +132,7 @@ multipartToBody boundary mp = RequestBodySource $ files' <> source ["--", bounda renderInput input = renderPart (lencode . iName $ input) "text/plain" "" - (source . pure . lencode . iValue $ input) + (source . pure @[] . lencode . iValue $ input) inputs' = foldl' (\acc x -> acc `mappend'` renderInput x) mempty' (inputs mp) renderFile :: FileData tag -> SourceIO LBS.ByteString renderFile file = renderPart (lencode . fdInputName $ file) diff --git a/servant-multipart/servant-multipart.cabal b/servant-multipart/servant-multipart.cabal index 31f56a7..90b2947 100644 --- a/servant-multipart/servant-multipart.cabal +++ b/servant-multipart/servant-multipart.cabal @@ -19,7 +19,8 @@ tested-with: || ==8.8.4 || ==8.10.7 || ==9.0.2 - || ==9.2.7 + || ==9.2.8 + || ==9.4.7 library default-language: Haskell2010 @@ -37,11 +38,11 @@ library build-depends: servant-multipart-api == 0.12.* , lens >=4.17 && <5.3 - , resourcet >=1.2.2 && <1.3 - , servant >=0.16 && <0.20 - , servant-docs >=0.10 && <0.20 - , servant-foreign >=0.15 && <0.20 - , servant-server >=0.16 && <0.20 + , resourcet >=1.2.2 && <1.4 + , servant >=0.16 && <0.21 + , servant-docs >=0.10 && <0.14 + , servant-foreign >=0.15 && <0.17 + , servant-server >=0.16 && <0.21 , string-conversions >=0.4.0.1 && <0.5 , wai >=3.2.1.2 && <3.3 , wai-extra >=3.0.24.3 && <3.2