[Hackage] #797: Cabal includes test suite dependencies when building the library
Hackage
cvs-ghc at haskell.org
Sun Jan 30 20:34:46 CET 2011
#797: Cabal includes test suite dependencies when building the library
----------------------------+-----------------------------------------------
Reporter: tibbe | Owner:
Type: defect | Status: new
Priority: high | Milestone: Cabal-1.10
Component: Cabal library | Version: HEAD
Severity: normal | Keywords:
Difficulty: unknown | Ghcversion:
Platform: |
----------------------------+-----------------------------------------------
`cabal configure` currently includes the test suite dependencies even
without `--enable-tests`. This means that `cabal install <some lib>` will
pull in e.g. test-framework, even though that isn't necessary to install
the library.
For example, given this configuration:
{{{
library
...
build-depends:
base >= 3 && < 4.4,
bytestring < 1.0,
parsec >= 2.0 && < 3.1.1
if !os(windows)
build-depends:
unix >= 2 && < 3
test-suite simple
...
build-depends:
base < 4.4,
bytestring < 0.10,
HUnit < 1.3,
network,
test-framework < 0.4,
test-framework-hunit < 0.3
test-suite uri
...
build-depends:
base < 4.4,
HUnit < 1.3,
network,
test-framework < 0.4,
test-framework-hunit < 0.3
}}}
we get this:
{{{
$ cabal configure -v
...
Resolving dependencies...
selecting network-2.3.0.2 (hackage)
selecting HUnit-1.2.2.3 (installed)
selecting base-4.3.0.0 (installed)
selecting bytestring-0.9.1.8 (installed)
selecting ffi-1.0 (installed)
selecting ghc-prim-0.2.0.0 (installed)
selecting integer-gmp-0.2.0.2 (installed)
selecting rts-1.0 (installed)
selecting test-framework-0.3.3 (installed) and discarding
containers-0.3.0.0
and mtl-1.1.1.0
selecting ansi-terminal-0.5.5 (installed)
selecting ansi-wl-pprint-0.6.3 (installed)
selecting array-0.3.0.2 (installed)
selecting containers-0.4.0.0 (installed)
selecting extensible-exceptions-0.1.1.2 (installed)
selecting hostname-1.0 (installed)
selecting mtl-2.0.1.0 (installed)
selecting old-locale-1.0.0.2 (installed)
selecting random-1.0.0.3 (installed)
selecting regex-base-0.93.2 (installed)
selecting regex-posix-0.94.4 (installed)
selecting test-framework-hunit-0.2.6 (installed)
selecting time-1.2.0.3 (installed)
selecting transformers-0.2.2.0 (installed)
selecting unix-2.4.1.0 (installed)
selecting xml-1.3.7 (installed)
selecting parsec-2.1.0.1 (installed) and discarding parsec-3.1.0
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/797>
Hackage <http://haskell.org/cabal/>
Hackage: Cabal and related projects
More information about the cabal-devel
mailing list