[Hackage] #811: test-suite type not detected
#811: test-suite type not detected ----------------------------+----------------------------------------------- Reporter: basvandijk | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: Cabal library | Version: 1.10.1.0 Severity: normal | Keywords: Difficulty: unknown | Ghcversion: Platform: | ----------------------------+----------------------------------------------- I just installed the latest `cabal`: {{{ $ cabal --version cabal-install version 0.10.2 using version 1.10.1.0 of the Cabal library }}} I'm trying to rewrite the custom test-suite of my [http://hackage.haskell.org/package/threads threads] package to the new Cabal test-suite feature. The original `.cabal` contains: {{{ ... executable test-threads main-is: test.hs ... }}} When I rewrite that to: {{{ ... test-suite test-threads type: exitcode-stdio-1.0 main-is: test.hs ... }}} And than configure it, I get the following error: {{{ $ cabal configure cabal: threads.cabal:60: The 'type' field is required for test suites. The available test types are: exitcode-stdio-1.0 }}} I attached the package. Duncan on `#haskell` figured out that if a .cabal contains conditionals, like the one I have, the bug appears. -- Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/811> Hackage <http://haskell.org/cabal/> Hackage: Cabal and related projects
#811: test-suite type not detected ----------------------------+----------------------------------------------- Reporter: basvandijk | Owner: ttuegel Type: defect | Status: new Priority: normal | Milestone: Cabal-1.10 Component: Cabal library | Version: 1.10.1.0 Severity: normal | Keywords: Difficulty: unknown | Ghcversion: Platform: | ----------------------------+----------------------------------------------- Changes (by duncan): * owner: => ttuegel * milestone: => Cabal-1.10 Comment: The threads.cabal file in question is attached. If necessary the rest of the repo is at http://code.haskell.org/~basvandijk/code/threads -- Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/811#comment:1> Hackage <http://haskell.org/cabal/> Hackage: Cabal and related projects
#811: test-suite type not detected ----------------------------+----------------------------------------------- Reporter: basvandijk | Owner: ttuegel Type: defect | Status: new Priority: normal | Milestone: Cabal-1.10 Component: Cabal library | Version: 1.10.1.0 Severity: normal | Keywords: Difficulty: unknown | Ghcversion: Platform: | ----------------------------+----------------------------------------------- Comment(by ttuegel): Replying to [comment:1 duncan]:
The threads.cabal file in question is attached. If necessary the rest of the repo is at
I'm looking into this now. It definitely seems to be a bug. However, none of the conditionals used in this particular .cabal file seem to be necessary. I'm attaching what I believe to be an equivalent .cabal file to show you what I mean. -- Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/811#comment:2> Hackage <http://haskell.org/cabal/> Hackage: Cabal and related projects
#811: test-suite type not detected ----------------------------+----------------------------------------------- Reporter: basvandijk | Owner: ttuegel Type: defect | Status: new Priority: normal | Milestone: Cabal-1.10 Component: Cabal library | Version: 1.10.1.0 Severity: normal | Keywords: Difficulty: unknown | Ghcversion: Platform: | ----------------------------+----------------------------------------------- Comment(by ttuegel): I uploaded two patches that fix this problem (one for the Cabal-1.10 branch and one for HEAD). I did upload a prior version of these patches this morning, but I realized they introduced a subtle bug in the way BuildInfo was being handled. Please disregard the old version of these patches. -- Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/811#comment:3> Hackage <http://haskell.org/cabal/> Hackage: Cabal and related projects
#811: test-suite type not detected ----------------------------+----------------------------------------------- Reporter: basvandijk | Owner: ttuegel Type: defect | Status: new Priority: normal | Milestone: Cabal-1.10 Component: Cabal library | Version: 1.10.1.0 Severity: normal | Keywords: Difficulty: unknown | Ghcversion: Platform: | ----------------------------+----------------------------------------------- Comment(by duncan): Applied the version of the patch sent by email {{{ Fri Apr 1 20:21:13 BST 2011 Thomas Tuegel <ttuegel@gmail.com> * Fix for test suite stanzas with conditionals. Ticket #811. This fixes a problem where Cabal would fail to detect the "type" field of a test suite when the test suite contained a conditional. Conditionals can now be used, with the restriction that the "type" field and the appropriate "main-is" or "test-module" field must be specified together in any conditional branch where they occur. }}} TODO: merge to 1.10 branch. -- Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/811#comment:4> Hackage <http://haskell.org/cabal/> Hackage: Cabal and related projects
#811: test-suite type not detected ----------------------------+----------------------------------------------- Reporter: basvandijk | Owner: ttuegel Type: defect | Status: closed Priority: normal | Milestone: Cabal-1.10 Component: Cabal library | Version: 1.10.1.0 Severity: normal | Resolution: fixed Keywords: | Difficulty: unknown Ghcversion: | Platform: ----------------------------+----------------------------------------------- Changes (by ttuegel): * status: new => closed * resolution: => fixed Comment: Duncan, I noticed that you did apply the 1.10 branch patch I sent you, so I am closing this bug. -- Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/811#comment:5> Hackage <http://haskell.org/cabal/> Hackage: Cabal and related projects
#811: test-suite type not detected ----------------------------+----------------------------------------------- Reporter: basvandijk | Owner: ttuegel Type: defect | Status: closed Priority: normal | Milestone: Cabal-1.10 Component: Cabal library | Version: 1.10.1.0 Severity: normal | Resolution: fixed Keywords: | Difficulty: unknown Ghcversion: | Platform: ----------------------------+----------------------------------------------- Comment(by elga): * [http://www.releve-identite-operateur.fr/numbero-de-virgin-mobile.html virgin mobile] -- Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/811#comment:6> Hackage <http://haskell.org/cabal/> Hackage: Cabal and related projects
participants (1)
-
Hackage