From 3f02fec85bd3fb0f4631096ff58c90422b966865 Mon Sep 17 00:00:00 2001 From: Felix Paulusma Date: Sun, 26 May 2024 21:59:16 +0200 Subject: [PATCH 1/9] update all stack files to build with recent updates and remove outdated stack files --- stack-lts-14.yaml | 28 ---------------------------- stack-lts-17.yaml | 28 ---------------------------- stack-lts-18.yaml | 7 ++++--- stack-lts-19.yaml | 19 +++++++++++-------- stack-lts-20.yaml | 18 ++++++++++-------- stack-lts-21.yaml | 19 +++++++++++-------- stack-nightly.yaml | 8 +++----- stack.yaml | 15 +++++++++------ 8 files changed, 48 insertions(+), 94 deletions(-) delete mode 100644 stack-lts-14.yaml delete mode 100644 stack-lts-17.yaml diff --git a/stack-lts-14.yaml b/stack-lts-14.yaml deleted file mode 100644 index 65bbae4ad..000000000 --- a/stack-lts-14.yaml +++ /dev/null @@ -1,28 +0,0 @@ -resolver: lts-14.27 -packages: -- ./recv -- ./auto-update -- ./mime-types -- ./wai -- ./wai-extra -- ./warp -- ./warp-tls -- ./wai-app-static -- ./wai-websockets -- ./wai-conduit -- ./time-manager -flags: - wai-extra: - build-example: true -nix: - enable: false - packages: - - fcgi - - zlib -extra-deps: -- http2-3.0.1@sha256:584900e2aacd033d714d4603abd0f9249203a40b5a476889d792ba91661843c0,15814 -- tls-1.5.5@sha256:f6681d6624071211edd509a8f56e0c96b4f003bb349b7dc706d4333775a373c5,6996 -- cryptonite-0.29@sha256:147724f6a8e4394fcbd51bf52aba7a8b92d3fc8f42055cd6ca9486655e2ab614,18312 -- network-byte-order-0.1.6@sha256:23d8b609ac43a69d04d5e8f411e5f86a0266c0e8b33b65f8c92ebda64273fe3a,1313 -- wai-logger-2.3.7@sha256:19a0dc5122e22d274776d80786fb9501956f5e75b8f82464bbdad5604d154d82,1671 -- fast-logger-3.1.0@sha256:8bdaa5714c5e02bc1b5680a331cee1c22d605b692dfaf60569119b9baf975471,2398 diff --git a/stack-lts-17.yaml b/stack-lts-17.yaml deleted file mode 100644 index 716c8ae89..000000000 --- a/stack-lts-17.yaml +++ /dev/null @@ -1,28 +0,0 @@ -resolver: lts-17.15 -packages: -- ./recv -- ./auto-update -- ./mime-types -- ./wai -- ./wai-extra -- ./warp -- ./warp-tls -- ./wai-app-static -- ./wai-frontend-monadcgi -- ./wai-http2-extra -- ./wai-websockets -- ./wai-conduit -- ./time-manager -flags: - wai-extra: - build-example: true -nix: - enable: false - packages: - - fcgi - - zlib -extra-deps: - - http2-3.0.1@sha256:584900e2aacd033d714d4603abd0f9249203a40b5a476889d792ba91661843c0,15814 - - wai-logger-2.3.7@sha256:19a0dc5122e22d274776d80786fb9501956f5e75b8f82464bbdad5604d154d82,1671 - - cgi-3001.5.0.0@sha256:3d1193a328d5f627a021a0ef3927c1ae41dd341e32dba612fed52d0e3a6df056,2990 - - multipart-0.2.1@sha256:387e7c7a7927cee015e3a7d3cec00f7e6fe1f0046a2fee57f431c9554e55ab45,1100 diff --git a/stack-lts-18.yaml b/stack-lts-18.yaml index 00f981328..e2bc5c401 100644 --- a/stack-lts-18.yaml +++ b/stack-lts-18.yaml @@ -1,4 +1,4 @@ -resolver: lts-18 +resolver: lts-18.28 packages: - ./auto-update - ./mime-types @@ -26,8 +26,9 @@ extra-deps: - crypton-x509-1.7.6 - crypton-x509-store-1.6.9 - crypton-x509-validation-1.6.12 - - http2-5.1.0 + - http-semantics-0.0.0 + - http2-5.2.1 - network-byte-order-0.1.7 - - network-control-0.0.2 + - network-control-0.1.0 - tls-1.7.0 - unix-time-0.4.11 diff --git a/stack-lts-19.yaml b/stack-lts-19.yaml index c2b3c265d..22d7b21db 100644 --- a/stack-lts-19.yaml +++ b/stack-lts-19.yaml @@ -1,4 +1,4 @@ -resolver: lts-19 +resolver: lts-19.33 packages: - ./auto-update - ./mime-types @@ -23,21 +23,24 @@ nix: - fcgi - zlib extra-deps: - - crypto-token-0.0.2 + - basement-0.0.16 + - crypto-token-0.1.1 - crypton-0.34 - crypton-x509-1.7.6 - crypton-x509-store-1.6.9 - crypton-x509-system-1.6.7 - crypton-x509-validation-1.6.12 - fast-logger-3.2.2 - - http2-5.1.0 - - http3-0.0.8 + - http-semantics-0.0.0 + - http2-5.2.1 + - http3-0.0.11 - memory-0.18.0 - network-3.1.4.0 - network-byte-order-0.1.7 - - network-control-0.0.2 + - network-control-0.1.0 - network-udp-0.0.0 - - quic-0.1.12 + - quic-0.1.20 - sockaddr-0.0.1 - - tls-1.9.0 - - unix-time-0.4.11 + - tls-2.0.6 + - tls-session-manager-0.0.5 + - unix-time-0.4.12 diff --git a/stack-lts-20.yaml b/stack-lts-20.yaml index 8e0b107b5..da0827638 100644 --- a/stack-lts-20.yaml +++ b/stack-lts-20.yaml @@ -1,4 +1,4 @@ -resolver: lts-20 +resolver: lts-20.26 packages: - ./auto-update - ./mime-types @@ -24,21 +24,23 @@ nix: - zlib extra-deps: - cgi-3001.5.0.1 - - crypto-token-0.0.2 + - crypto-token-0.1.1 - crypton-0.34 - crypton-x509-1.7.6 - crypton-x509-store-1.6.9 - crypton-x509-system-1.6.7 - crypton-x509-validation-1.6.12 - fast-logger-3.2.2 - - http2-5.1.0 - - http3-0.0.8 + - http-semantics-0.0.0 + - http2-5.2.1 + - http3-0.0.11 - memory-0.18.0 - multipart-0.2.1 - network-byte-order-0.1.7 - - network-control-0.0.2 + - network-control-0.1.0 - network-udp-0.0.0 - - quic-0.1.12 + - quic-0.1.20 - sockaddr-0.0.1 - - tls-1.9.0 - - unix-time-0.4.11 + - tls-2.0.6 + - tls-session-manager-0.0.5 + - unix-time-0.4.12 diff --git a/stack-lts-21.yaml b/stack-lts-21.yaml index e09e0c785..b83d8f47a 100644 --- a/stack-lts-21.yaml +++ b/stack-lts-21.yaml @@ -1,4 +1,4 @@ -resolver: lts-21.21 +resolver: lts-21.25 packages: - ./auto-update - ./mime-types @@ -23,16 +23,19 @@ nix: - fcgi - zlib extra-deps: - - crypto-token-0.0.2 - - crypton-0.34 + - crypto-token-0.1.1 + - crypton-1.0.0 - crypton-x509-1.7.6 - crypton-x509-store-1.6.9 - crypton-x509-system-1.6.7 - crypton-x509-validation-1.6.12 - - http2-5.1.0 - - http3-0.0.8 - - network-control-0.0.2 + - http-semantics-0.0.0 + - http2-5.2.1 + - http3-0.0.11 + - network-control-0.1.0 - network-udp-0.0.0 - - quic-0.1.12 + - quic-0.1.20 - sockaddr-0.0.1 - - tls-1.9.0 + - tls-2.0.6 + - tls-session-manager-0.0.5 + - unix-time-0.4.12 diff --git a/stack-nightly.yaml b/stack-nightly.yaml index cc371ba5f..b5b65631c 100644 --- a/stack-nightly.yaml +++ b/stack-nightly.yaml @@ -24,9 +24,7 @@ nix: - fcgi - zlib extra-deps: - - crypto-token-0.1.0 - - http2-5.1.0 - - http3-0.0.8 + - http3-0.0.11 - network-udp-0.0.0 - - quic-0.1.15 - - sockaddr-0.0.1 \ No newline at end of file + - quic-0.1.20 + - sockaddr-0.0.1 diff --git a/stack.yaml b/stack.yaml index f6b7791e8..0545b86ef 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,4 +1,4 @@ -resolver: lts-22.6 +resolver: lts-22.23 packages: - ./auto-update - ./mime-types @@ -23,10 +23,13 @@ nix: - fcgi - zlib extra-deps: - - crypto-token-0.1.0 - - http2-5.1.0 - - http3-0.0.8 + - crypto-token-0.1.1 + - http-semantics-0.0.0 + - http2-5.2.1 + - http3-0.0.11 + - network-control-0.1.0 - network-udp-0.0.0 - - quic-0.1.14 + - quic-0.1.20 - sockaddr-0.0.1 - - tls-1.9.0 + - tls-2.0.6 + - tls-session-manager-0.0.5 From 85bd62ff4dc6205174a64c376c89119b363d8766 Mon Sep 17 00:00:00 2001 From: Felix Paulusma Date: Sun, 26 May 2024 23:09:30 +0200 Subject: [PATCH 2/9] use haskell-actions for stack setup in CI --- .github/workflows/tests.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2fe69936f..5c669f5a7 100755 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -14,6 +14,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, macos-latest, windows-latest] + stack: ["latest"] args: - "--resolver nightly --stack-yaml stack-nightly.yaml" - "--resolver lts-22" @@ -26,6 +27,12 @@ jobs: - name: Clone project uses: actions/checkout@v4 + - uses: haskell-actions/setup@v2 + name: Setup Haskell Stack + with: + stack-version: ${{ matrix.stack }} + enable-stack: true + # Getting weird OS X errors... # - name: Cache dependencies # uses: actions/cache@v1 @@ -39,8 +46,6 @@ jobs: shell: bash run: | set -ex - stack upgrade - stack --version EXTRA="" if [[ ${{ matrix.os }} = "windows-latest" ]] then From e6d9363658f6b0df56e78aa250b7efd1debd4197 Mon Sep 17 00:00:00 2001 From: Felix Paulusma Date: Sun, 26 May 2024 23:46:22 +0200 Subject: [PATCH 3/9] don't build benchmarks on macos --- .github/workflows/tests.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 5c669f5a7..9a00ad8b9 100755 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -47,8 +47,12 @@ jobs: run: | set -ex EXTRA="" + BENCH="--bench" if [[ ${{ matrix.os }} = "windows-latest" ]] then EXTRA="--no-run-tests" + elif [[ ${{ matrix.os }} = "macos-latest" ]] + then + BENCH="" fi - stack test --no-terminal ${{ matrix.args }} --haddock --no-haddock-deps --bench --no-run-benchmarks $EXTRA + stack test --no-terminal ${{ matrix.args }} --haddock --no-haddock-deps $BENCH --no-run-benchmarks $EXTRA From 4ee333c4be13f2e2318d6151247140c0cde3d189 Mon Sep 17 00:00:00 2001 From: Felix Paulusma Date: Sun, 26 May 2024 23:52:29 +0200 Subject: [PATCH 4/9] only install stack and let stack install GHC --- .github/workflows/tests.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9a00ad8b9..fe7c40922 100755 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -31,6 +31,8 @@ jobs: name: Setup Haskell Stack with: stack-version: ${{ matrix.stack }} + stack-no-global: true + stack-setup-ghc: true enable-stack: true # Getting weird OS X errors... From eec3530de0872190c28f45f161e618951bd0becd Mon Sep 17 00:00:00 2001 From: Felix Paulusma Date: Mon, 27 May 2024 00:03:15 +0200 Subject: [PATCH 5/9] hopefully fixed Haddock parse error --- wai-extra/Network/Wai/Middleware/ValidateHeaders.hs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/wai-extra/Network/Wai/Middleware/ValidateHeaders.hs b/wai-extra/Network/Wai/Middleware/ValidateHeaders.hs index 9a4f0a457..6e952b5c2 100644 --- a/wai-extra/Network/Wai/Middleware/ValidateHeaders.hs +++ b/wai-extra/Network/Wai/Middleware/ValidateHeaders.hs @@ -6,12 +6,12 @@ -- -- 'validateHeadersMiddleware' enforces these constraints for response headers by responding with a 500 Internal Server Error when an offending character is present. This is meant to catch programmer errors early on and reduce attack surface. module Network.Wai.Middleware.ValidateHeaders - -- * Middleware - ( validateHeadersMiddleware - -- * Settings + ( -- * Middleware + validateHeadersMiddleware + -- * Settings , ValidateHeadersSettings (..) , defaultValidateHeadersSettings - -- * Types + -- * Types , InvalidHeader (..) , InvalidHeaderReason (..) ) where @@ -39,7 +39,7 @@ validateHeadersMiddleware settings app req respond = Nothing -> respond response -- | Configuration for 'validateHeadersMiddleware'. --- +-- -- @since 3.1.15 data ValidateHeadersSettings = ValidateHeadersSettings -- | Called when an invalid header is present. @@ -123,7 +123,7 @@ invalidHeaderResponse (InvalidHeader (headerName, headerValue) reason) = , "In header '" , BSL.fromStrict $ original headerName , "' with value '" - , BSL.fromStrict $ headerValue + , BSL.fromStrict headerValue , "': " , showReason reason , "\nYou are seeing this error message because validateHeadersMiddleware is enabled." From db5b0db6aa9480721459bc094a695323b2a13410 Mon Sep 17 00:00:00 2001 From: Felix Paulusma Date: Mon, 27 May 2024 00:21:53 +0200 Subject: [PATCH 6/9] setup still installs GHC twice, whatever --- .github/workflows/tests.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index fe7c40922..b28e3a222 100755 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -27,12 +27,13 @@ jobs: - name: Clone project uses: actions/checkout@v4 + # Not sure how to have GHC not setup twice + # Something with settings "ghc-version"? + # ["9.8", "9.6", "9.4", "9.2", "9.0", "8.10"] - uses: haskell-actions/setup@v2 name: Setup Haskell Stack with: stack-version: ${{ matrix.stack }} - stack-no-global: true - stack-setup-ghc: true enable-stack: true # Getting weird OS X errors... From b4349bdda3c6d4527ce8761a713dbeb79304e42c Mon Sep 17 00:00:00 2001 From: Felix Paulusma Date: Mon, 27 May 2024 00:23:40 +0200 Subject: [PATCH 7/9] final haddock fix? --- wai-extra/Network/Wai/Middleware/ValidateHeaders.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wai-extra/Network/Wai/Middleware/ValidateHeaders.hs b/wai-extra/Network/Wai/Middleware/ValidateHeaders.hs index 6e952b5c2..8576e0032 100644 --- a/wai-extra/Network/Wai/Middleware/ValidateHeaders.hs +++ b/wai-extra/Network/Wai/Middleware/ValidateHeaders.hs @@ -42,8 +42,8 @@ validateHeadersMiddleware settings app req respond = -- -- @since 3.1.15 data ValidateHeadersSettings = ValidateHeadersSettings - -- | Called when an invalid header is present. - { onInvalidHeader :: InvalidHeader -> Middleware + { -- | Called when an invalid header is present. + onInvalidHeader :: InvalidHeader -> Middleware } -- | Default configuration for 'validateHeadersMiddleware'. From 8e4f806aa8eba3f0343ab761ff74c57c8322bc35 Mon Sep 17 00:00:00 2001 From: Felix Paulusma Date: Mon, 27 May 2024 00:36:29 +0200 Subject: [PATCH 8/9] skip old 'macos-latest' builds --- .github/workflows/tests.yml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b28e3a222..420ab9a8f 100755 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -13,15 +13,20 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, macos-latest, windows-latest] + os: ["ubuntu-latest", "macos-latest", "windows-latest"] stack: ["latest"] args: - - "--resolver nightly --stack-yaml stack-nightly.yaml" - - "--resolver lts-22" - - "--resolver lts-21 --stack-yaml stack-lts-21.yaml" - - "--resolver lts-20 --stack-yaml stack-lts-20.yaml" - - "--resolver lts-19 --stack-yaml stack-lts-19.yaml" - - "--resolver lts-18 --stack-yaml stack-lts-18.yaml" + - "--resolver nightly --stack-yaml stack-nightly.yaml" + - "--resolver lts-22" + - "--resolver lts-21 --stack-yaml stack-lts-21.yaml" + - "--resolver lts-20 --stack-yaml stack-lts-20.yaml" + - "--resolver lts-19 --stack-yaml stack-lts-19.yaml" + - "--resolver lts-18 --stack-yaml stack-lts-18.yaml" + exclude: + - os: "macos-latest" + args: "--resolver lts-19 --stack-yaml stack-lts-19.yaml" + - os: "macos-latest" + args: "--resolver lts-18 --stack-yaml stack-lts-18.yaml" steps: - name: Clone project From 71b66018dfa6e1a63a7af11a42b352107c83e289 Mon Sep 17 00:00:00 2001 From: Felix Paulusma Date: Mon, 27 May 2024 21:09:54 +0200 Subject: [PATCH 9/9] multipart works with 'bytestring-0.12' now, so building everything works again --- stack-nightly.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/stack-nightly.yaml b/stack-nightly.yaml index b5b65631c..cb357ff35 100644 --- a/stack-nightly.yaml +++ b/stack-nightly.yaml @@ -8,8 +8,7 @@ packages: - ./wai-app-static - ./wai-conduit - ./wai-extra - # Needs 'multipart' to accept 'bytestring < 0.13' - # - ./wai-frontend-monadcgi + - ./wai-frontend-monadcgi - ./wai-http2-extra - ./wai-websockets - ./warp @@ -24,7 +23,9 @@ nix: - fcgi - zlib extra-deps: + - cgi-3001.5.0.1 - http3-0.0.11 + - multipart-0.2.1 - network-udp-0.0.0 - quic-0.1.20 - sockaddr-0.0.1