From b1e17b7295110ff0443f73199093cb9e76499c6d Mon Sep 17 00:00:00 2001 From: Thomas BAGREL Date: Fri, 13 Sep 2024 15:12:11 +0200 Subject: [PATCH] Remove brittle version bound on filepath; replace with another more robust solution --- .github/workflows/ci.yaml | 10 ++++------ cabal.project | 9 ++++----- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 6efd7e5f..37dc2c84 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -33,17 +33,15 @@ jobs: - name: Update Cabal's database run: nix-shell --arg ghcVersion '"${{ matrix.ghc-version }}"' --arg installHls 'false' --pure --run "cabal update" - name: Build Cabal's dependencies - run: nix-shell --arg ghcVersion '"${{ matrix.ghc-version }}"' --arg installHls 'false' --pure --run "cabal build --allow-newer --disable-tests --disable-benchmarks --dependencies-only" + run: nix-shell --arg ghcVersion '"${{ matrix.ghc-version }}"' --arg installHls 'false' --pure --run "cabal build --dependencies-only" - name: Build - run: nix-shell --arg ghcVersion '"${{ matrix.ghc-version }}"' --arg installHls 'false' --pure --run "cabal build --allow-newer --disable-tests --disable-benchmarks" + run: nix-shell --arg ghcVersion '"${{ matrix.ghc-version }}"' --arg installHls 'false' --pure --run "cabal build" - name: Haddock - run: nix-shell --arg ghcVersion '"${{ matrix.ghc-version }}"' --arg installHls 'false' --pure --run "cabal haddock --allow-newer" + run: nix-shell --arg ghcVersion '"${{ matrix.ghc-version }}"' --arg installHls 'false' --pure --run "cabal haddock" - name: cabal-docspec run: nix-shell --arg ghcVersion '"${{ matrix.ghc-version }}"' --arg installHls 'false' --pure --run "cabal-docspec" - - name: Build benchmarks - run: nix-shell --arg ghcVersion '"${{ matrix.ghc-version }}"' --arg installHls 'false' --pure --run "cabal build linear-base:bench:bench --allow-newer" - name: Run benchmarks - run: nix-shell --arg ghcVersion '"${{ matrix.ghc-version }}"' --arg installHls 'false' --pure --run "cabal bench --allow-newer 2>&1 | tee benchmark_ghc${{ matrix.ghc-version }}.txt" + run: nix-shell --arg ghcVersion '"${{ matrix.ghc-version }}"' --arg installHls 'false' --pure --run "cabal bench | tee benchmark_ghc${{ matrix.ghc-version }}.txt" - name: Upload benchmark results uses: actions/upload-artifact@v3 with: diff --git a/cabal.project b/cabal.project index ecef8cef..f416fef5 100644 --- a/cabal.project +++ b/cabal.project @@ -1,7 +1,6 @@ packages: *.cabal --- We need the `--alloc-newer` flag on cabal invocations because otherwise a build plan cannot be found. --- But as of 2024-09-11, the latest version of the `unix` 2.8.5.1 package has a conditional bound on `filepath` depending on the `os-string` flag (see https://hackage.haskell.org/package/unix-2.8.5.1/dependencies). --- With no extra parameter or setting, we get a dependency conflict on `filepath`, as other libs use a version of `filepath` incompatible with the one `unix` wants. --- Setting `filepath` to 1.4.2.2 fixes that. -constraints: filepath ==1.4.2.2 +tests: True +benchmarks: True +allow-newer: all +index-state: 2024-09-13T13:31:57Z