Skip to content

Commit

Permalink
Remove brittle version bound on filepath; replace with another more r…
Browse files Browse the repository at this point in the history
…obust solution
  • Loading branch information
tbagrel1 committed Sep 13, 2024
1 parent f9bd931 commit b1e17b7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
9 changes: 4 additions & 5 deletions cabal.project
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit b1e17b7

Please sign in to comment.