[Hackage] #742: build-depends in Executable sections are unexpectedly global

#742: build-depends in Executable sections are unexpectedly global ----------------------------+----------------------------------------------- Reporter: benmachine | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: Cabal library | Version: HEAD Severity: normal | Keywords: Difficulty: unknown | Ghcversion: Platform: | ----------------------------+----------------------------------------------- When I have two executable sections, it seems that the build-depends of one are used in the other. For example, the following: state.cabal {{{ Cabal-Version: >= 1.2 Name: state Version: 0.1 Build-type: Simple Executable state-tf Main-is: Main.hs Build-depends: base, transformers, monads-tf Executable state-mtl Main-is: Main.hs Build-depends: base, mtl }}} Main.hs {{{ module Main where import Control.Monad.State main = print $ runState (put ()) undefined }}} fails to compile: {{{ Preprocessing executables for state-0.1... Building state-0.1... Main.hs:3:7: Ambiguous module name `Control.Monad.State': it was found in multiple packages: monads-tf-0.1.0.0 mtl-1.1.1.0 }}} If this is intended (which I doubt) it's at least confusing. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/742 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#742: build-depends are unexpectedly global prior to Cabal-1.8 (needs documenting) ----------------------------+----------------------------------------------- Reporter: benmachine | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: Cabal library | Version: HEAD Severity: normal | Keywords: Difficulty: unknown | Ghcversion: Platform: | ----------------------------+----------------------------------------------- Comment(by duncan): Yes this was the old behaviour and it was not intentional. Because changing the behaviour would have broken old packages we made the change so that it only affects packages that declare themselves to follow a recent version of the Cabal spec, that is if you write: {{{ cabal-version: >=1.8 }}} then you'll get the new sensible behaviour. I'm not sure that this is actually documented anywhere. Would you like to send in a patch for the user guide? It's in the Cabal repo in simple markdown format. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/742#comment:1 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#742: build-depends are unexpectedly global prior to Cabal-1.8 (needs documenting) ----------------------------+----------------------------------------------- Reporter: benmachine | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: Cabal library | Version: HEAD Severity: normal | Keywords: Difficulty: unknown | Ghcversion: Platform: | ----------------------------+----------------------------------------------- Comment(by benmachine): I darcs sent a patch but I've never really used darcs send before so I'm not really sure if it worked - I've attached it here as well just in case. I couldn't work out how to build the docs from the markdown source - they are built from an xml file, which I assume is generated from the markdown, but I couldn't work out the regeneration command. I don't think I'm likely to have broken anything, though. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/742#comment:2 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#742: build-depends are unexpectedly global prior to Cabal-1.8 (needs documenting) ----------------------------+----------------------------------------------- Reporter: benmachine | Owner: Type: defect | Status: closed Priority: normal | Milestone: Component: Cabal library | Version: HEAD 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/742#comment:4 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects
participants (1)
-
Hackage