From 223b94aa67a6dc30d65f9b1bbee14a11d3bc01da Mon Sep 17 00:00:00 2001 From: Janus Troelsen Date: Tue, 9 Jul 2024 07:40:38 -0600 Subject: [PATCH 1/7] Allow newer dependencies --- influxdb.cabal | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/influxdb.cabal b/influxdb.cabal index dc0155c..fe63a86 100644 --- a/influxdb.cabal +++ b/influxdb.cabal @@ -40,7 +40,7 @@ flag examples custom-setup setup-depends: base >= 4 && < 5 - , Cabal >= 1.24 && < 3.11 + , Cabal >= 1.24 && < 3.13 , cabal-doctest >= 1 && < 1.1 library @@ -80,7 +80,7 @@ library ViewPatterns ghc-options: -Wall build-depends: - base >= 4.11 && < 4.20 + base >= 4.11 && < 4.21 , aeson >= 0.7 && < 2.3 , attoparsec < 0.15 , attoparsec-aeson >= 2.1 && < 2.3 @@ -90,8 +90,8 @@ library , foldl < 1.5 , http-client >= 0.5 && < 0.8 , http-types >= 0.8.6 && < 0.13 - , lens >= 4.9 && < 5.3 - , network >= 2.6 && < 3.2 + , lens >= 4.9 && < 5.4 + , network >= 2.6 && < 3.3 , optional-args >= 1.0 && < 1.1 , scientific >= 0.3.3 && < 0.4 , tagged >= 0.1 && < 0.9 @@ -109,7 +109,7 @@ test-suite doctests base , doctest >= 0.11.3 && < 0.23 , influxdb - , template-haskell < 2.22 + , template-haskell < 2.23 ghc-options: -Wall -threaded hs-source-dirs: tests default-language: Haskell2010 From d4bad0410f6b1b607088450a0627b34acdfa5a5a Mon Sep 17 00:00:00 2001 From: Janus Troelsen Date: Tue, 9 Jul 2024 20:03:38 -0600 Subject: [PATCH 2/7] CI: Test GHC 9.10.1 --- .github/workflows/haskell-ci.yml | 90 ++++++++++++-------------------- influxdb.cabal | 7 +-- 2 files changed, 38 insertions(+), 59 deletions(-) diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml index 7a17c78..dbe87dd 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.17.20231110 +# version: 0.19.20240702 # -# REGENDATA ("0.17.20231110",["github","influxdb.cabal"]) +# REGENDATA ("0.19.20240702",["github","influxdb.cabal"]) # name: Haskell-CI on: @@ -23,29 +23,29 @@ jobs: timeout-minutes: 60 container: - image: buildpack-deps:bionic + image: buildpack-deps:jammy continue-on-error: ${{ matrix.allow-failure }} - services: - influxdb: - image: influxdb:1.8.10 - env: - INFLUXDB_REPORTING_DISABLED: true strategy: matrix: include: - - compiler: ghc-9.8.1 + - compiler: ghc-9.10.1 + compilerKind: ghc + compilerVersion: 9.10.1 + setup-method: ghcup + allow-failure: false + - compiler: ghc-9.8.2 compilerKind: ghc - compilerVersion: 9.8.1 + compilerVersion: 9.8.2 setup-method: ghcup allow-failure: false - - compiler: ghc-9.6.3 + - compiler: ghc-9.6.6 compilerKind: ghc - compilerVersion: 9.6.3 + compilerVersion: 9.6.6 setup-method: ghcup allow-failure: false - - compiler: ghc-9.4.7 + - compiler: ghc-9.4.8 compilerKind: ghc - compilerVersion: 9.4.7 + compilerVersion: 9.4.8 setup-method: ghcup allow-failure: false - compiler: ghc-9.2.8 @@ -66,46 +66,33 @@ jobs: - compiler: ghc-8.8.4 compilerKind: ghc compilerVersion: 8.8.4 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.6.5 compilerKind: ghc compilerVersion: 8.6.5 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false - compiler: ghc-8.4.4 compilerKind: ghc compilerVersion: 8.4.4 - setup-method: hvr-ppa + setup-method: ghcup allow-failure: false fail-fast: false steps: - name: apt run: | apt-get update - apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git socat software-properties-common libtinfo5 - if [ "${{ matrix.setup-method }}" = ghcup ]; then - mkdir -p "$HOME/.ghcup/bin" - curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$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.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false) - else - apt-add-repository -y 'ppa:hvr/ghc' - apt-get update - apt-get install -y "$HCNAME" - mkdir -p "$HOME/.ghcup/bin" - curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup" - chmod a+x "$HOME/.ghcup/bin/ghcup" - "$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false) - fi + apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 libnuma-dev + mkdir -p "$HOME/.ghcup/bin" + curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$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.12.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false) env: HCKIND: ${{ matrix.compilerKind }} HCNAME: ${{ matrix.compiler }} HCVER: ${{ matrix.compilerVersion }} - - name: influxdb forward - run: | - socat TCP-LISTEN:8086,fork TCP:influxdb:8086 & - name: Set PATH and environment variables run: | echo "$HOME/.cabal/bin" >> $GITHUB_PATH @@ -113,22 +100,13 @@ jobs: echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV" echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV" HCDIR=/opt/$HCKIND/$HCVER - if [ "${{ matrix.setup-method }}" = ghcup ]; then - 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=$HCPKG" >> "$GITHUB_ENV" - echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV" - echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV" - else - HC=$HCDIR/bin/$HCKIND - echo "HC=$HC" >> "$GITHUB_ENV" - echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV" - echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV" - echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV" - fi - + 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=$HCPKG" >> "$GITHUB_ENV" + echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV" + echo "CABAL=$HOME/.ghcup/bin/cabal-3.12.1.0 -vnormal+nowrap" >> "$GITHUB_ENV" HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))') echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV" echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV" @@ -185,7 +163,7 @@ jobs: chmod a+x $HOME/.cabal/bin/cabal-plan cabal-plan --version - name: checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: source - name: initial cabal.project for sdist @@ -213,7 +191,7 @@ jobs: echo " ghc-options: -Werror=missing-methods" >> cabal.project cat >> cabal.project <> cabal.project.local + $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(influxdb)$/; }' >> cabal.project.local cat cabal.project cat cabal.project.local - name: dump install plan @@ -221,7 +199,7 @@ jobs: $CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all cabal-plan - name: restore cache - uses: actions/cache/restore@v3 + uses: actions/cache/restore@v4 with: key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }} path: ~/.cabal/store @@ -251,7 +229,7 @@ jobs: rm -f cabal.project.local $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all - name: save cache - uses: actions/cache/save@v3 + uses: actions/cache/save@v4 if: always() with: key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }} diff --git a/influxdb.cabal b/influxdb.cabal index fe63a86..d2ba86f 100644 --- a/influxdb.cabal +++ b/influxdb.cabal @@ -21,9 +21,10 @@ tested-with: GHC == 8.10.7 GHC == 9.0.2 GHC == 9.2.8 - GHC == 9.4.7 - GHC == 9.6.3 - GHC == 9.8.1 + GHC == 9.4.8 + GHC == 9.6.6 + GHC == 9.8.2 + GHC == 9.10.1 extra-source-files: README.md From abcf2557db848464904a593e0ae219560ec50449 Mon Sep 17 00:00:00 2001 From: Janus Troelsen Date: Tue, 9 Jul 2024 20:21:19 -0600 Subject: [PATCH 3/7] Re-add services block to CI config --- .github/workflows/haskell-ci.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml index dbe87dd..418815d 100644 --- a/.github/workflows/haskell-ci.yml +++ b/.github/workflows/haskell-ci.yml @@ -24,6 +24,11 @@ jobs: 60 container: image: buildpack-deps:jammy + services: + influxdb: + image: influxdb:1.8.10 + env: + INFLUXDB_REPORTING_DISABLED: true continue-on-error: ${{ matrix.allow-failure }} strategy: matrix: From fa771561636b327afb8b88967b8de2d041889dc9 Mon Sep 17 00:00:00 2001 From: Janus Troelsen Date: Tue, 9 Jul 2024 20:42:07 -0600 Subject: [PATCH 4/7] Re-add influxdb forwarding --- .github/workflows/haskell-ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml index 418815d..b1c5313 100644 --- a/.github/workflows/haskell-ci.yml +++ b/.github/workflows/haskell-ci.yml @@ -98,6 +98,9 @@ jobs: HCKIND: ${{ matrix.compilerKind }} HCNAME: ${{ matrix.compiler }} HCVER: ${{ matrix.compilerVersion }} + - name: influxdb forward + run: | + socat TCP-LISTEN:8086,fork TCP:influxdb:8086 & - name: Set PATH and environment variables run: | echo "$HOME/.cabal/bin" >> $GITHUB_PATH From 2d0ed084cbbe9373db11c185773e2c3017ade362 Mon Sep 17 00:00:00 2001 From: Janus Troelsen Date: Wed, 10 Jul 2024 08:17:08 -0600 Subject: [PATCH 5/7] Re-add installation of socat --- .github/workflows/haskell-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml index b1c5313..5259a9c 100644 --- a/.github/workflows/haskell-ci.yml +++ b/.github/workflows/haskell-ci.yml @@ -88,7 +88,7 @@ jobs: - name: apt run: | apt-get update - apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 libnuma-dev + apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 libnuma-dev socat mkdir -p "$HOME/.ghcup/bin" curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup" chmod a+x "$HOME/.ghcup/bin/ghcup" From a6321a6edbecc9ccc6e643293f7d750bba5a0f03 Mon Sep 17 00:00:00 2001 From: Mitsutoshi Aoe Date: Fri, 12 Jul 2024 09:51:56 +0900 Subject: [PATCH 6/7] Enable TypeOperators extension to suppress a GHC warning --- src/Database/InfluxDB/Format.hs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Database/InfluxDB/Format.hs b/src/Database/InfluxDB/Format.hs index bbed333..fc7414b 100644 --- a/src/Database/InfluxDB/Format.hs +++ b/src/Database/InfluxDB/Format.hs @@ -1,6 +1,7 @@ {-# LANGUAGE GADTs #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE TypeOperators #-} module Database.InfluxDB.Format ( -- $setup From 35325ba5ec2c226177e7b3bb5f266b46937658a2 Mon Sep 17 00:00:00 2001 From: Mitsutoshi Aoe Date: Fri, 12 Jul 2024 23:15:37 +0900 Subject: [PATCH 7/7] Prepare v1.9.3.2 --- CHANGELOG.md | 4 ++++ influxdb.cabal | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 396b5b6..3d49873 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Revision history for influxdb +## v1.9.3.2 - 2024-07-12 + +* Allow newer dependencies ([101](https://github.com/maoe/influxdb-haskell/pull/101)) + ## v1.9.3.1 - 2024-03-15 * Support GHC 9.8 ([#98](https://github.com/maoe/influxdb-haskell/pull/98)) diff --git a/influxdb.cabal b/influxdb.cabal index d2ba86f..86612b4 100644 --- a/influxdb.cabal +++ b/influxdb.cabal @@ -1,6 +1,6 @@ cabal-version: 1.24 name: influxdb -version: 1.9.3.1 +version: 1.9.3.2 synopsis: InfluxDB client library for Haskell description: @influxdb@ is an InfluxDB client library for Haskell.