Skip to content

Commit

Permalink
Add dependencies used by PackageTests to exe:cabal-tests
Browse files Browse the repository at this point in the history
The runner allows the tests to use extra dependencies and the custom Prelude
from 'cabal-testsuite'.
However, if the tests use a dependency, say 'directory', and there are two
packages with the same unit id available in the store, the test fails since
it doesn't know which one to pick.
By including an extra dependency to directory, we force the test runner to
use a specific version directory, fixing the test failure.
  • Loading branch information
fendor authored and Mikolaj committed Nov 10, 2023
1 parent 6330967 commit b83cc31
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions cabal-testsuite/cabal-testsuite.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,18 @@ executable cabal-tests
, transformers
-- dependencies specific to exe:cabal-tests
, clock ^>= 0.7.2 || ^>=0.8
-- Extra dependencies used by PackageTests.
--
-- The runner allows the tests to use extra dependencies and the custom Prelude
-- from 'cabal-testsuite'.
-- However, if the tests use a dependency, say 'directory', and there are two
-- packages with the same unit id available in the store, the test fails since
-- it doesn't know which one to pick.
-- By including an extra dependency to directory, we force the test runner to
-- use a specific version directory, fixing the test failure.
--
-- See issue description and discussion: https://github.com/haskell/cabal/issues/8356
, directory

build-tool-depends: cabal-testsuite:setup
default-extensions: TypeOperators
Expand Down

0 comments on commit b83cc31

Please sign in to comment.