[Hackage] #797: Cabal includes test suite dependencies when building the library

#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

#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: | ----------------------------+----------------------------------------------- Changes (by tibbe): * cc: johan.tibell@… (added) -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/797#comment:1 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#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-install tool | Version: HEAD Severity: normal | Keywords: Difficulty: unknown | Ghcversion: Platform: | ---------------------------------+------------------------------------------ Changes (by tibbe): * component: Cabal library => cabal-install tool Comment: `./Setup configure` works as expected to this only affect cabal-install. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/797#comment:2 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#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-install tool | Version: HEAD Severity: normal | Keywords: Difficulty: unknown | Ghcversion: Platform: | ---------------------------------+------------------------------------------ Comment(by ttuegel): Replying to [comment:2 tibbe]:
`./Setup configure` works as expected to this only affect cabal-install.
Using cabal-install HEAD built against Cabal HEAD, I cannot reproduce this bug. Could you rebuild your cabal-install and try again? I suggest this because a patch I submitted that Duncan recently applied should have taken care of this. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/797#comment:3 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#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-install tool | Version: HEAD Severity: normal | Keywords: Difficulty: unknown | Ghcversion: Platform: | ---------------------------------+------------------------------------------ Comment(by duncan): From my testing, Thomas is right. That said, I think cabal-install will still need extending to pay attention to the --enable/disable-tests flag for its dependency planning. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/797#comment:4 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#797: Cabal includes test suite dependencies when building the library ---------------------------------+------------------------------------------ Reporter: tibbe | Owner: Type: defect | Status: closed Priority: high | Milestone: Cabal-1.10 Component: cabal-install tool | Version: HEAD Severity: normal | Resolution: fixed Keywords: | Difficulty: unknown Ghcversion: | Platform: ---------------------------------+------------------------------------------ Changes (by tibbe): * status: new => closed * resolution: => fixed Comment: Closing this as the reported problem is fixed in the 1.10 branch. We should create a new ticket for the dependency planning issue. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/797#comment:5 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#797: Cabal includes test suite dependencies when building the library ---------------------------------+------------------------------------------ Reporter: tibbe | Owner: Type: defect | Status: closed Priority: high | Milestone: Cabal-1.10 Component: cabal-install tool | Version: HEAD Severity: normal | Resolution: fixed Keywords: | Difficulty: unknown Ghcversion: | Platform: ---------------------------------+------------------------------------------ Comment(by elga): * [http://www.releve-identite-operateur.fr/rio-simyo.html simyo] -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/797#comment:6 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects
participants (1)
-
Hackage