[Hackage] #566: Don't try and resolve dependencies for packages that are not buildable

#566: Don't try and resolve dependencies for packages that are not buildable ----------------------------------+----------------------------------------- Reporter: batterseapower | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: Cabal library | Version: 1.6.0.1 Severity: normal | Keywords: Difficulty: very easy (<1 hour) | Ghcversion: Platform: | ----------------------------------+----------------------------------------- I had a component like this: {{{ Executable edit-distance-benchmark Main-Is: Text/EditDistance/Benchmark.hs if flag(splitBase) Build-Depends: base >= 3 && < 5, array >= 0.1, random >= 1.0, old-time >= 1.0, process >= 1.0, parallel >= 1.0, unix >= 2.3 else Build-Depends: base < 3, parallel >= 1.0, unix >= 2.3 if !flag(benchmark) Buildable: False Ghc-Options: -O2 -fvia-C -Wall }}} However, I've only just found out that this meant that you couldn't install any parts of my package on Windows, because Cabal tried to resolve the "unix" dependency even if "benchmark" was False (the default)! I've solved this like so: {{{ Executable edit-distance-benchmark Main-Is: Text/EditDistance/Benchmark.hs if !flag(benchmark) Buildable: False else if flag(splitBase) Build-Depends: base >= 3 && < 5, array >= 0.1, random >= 1.0, old-time >= 1.0, process >= 1.0, parallel >= 1.0, unix >= 2.3 else Build-Depends: base < 3, parallel >= 1.0, unix >= 2.3 Ghc-Options: -O2 -fvia-C -Wall }}} But really Cabal should not need to resolve dependencies for things that are not buildable. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/566 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#566: Don't try and resolve dependencies for packages that are not buildable -----------------------------+---------------------------------------------- Reporter: batterseapower | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: Cabal library | Version: 1.6.0.1 Severity: normal | Resolution: Keywords: | Difficulty: hard (< 1 day) Ghcversion: | Platform: -----------------------------+---------------------------------------------- Changes (by duncan): * difficulty: very easy (<1 hour) => hard (< 1 day) Comment: The semantics for "buildable: False" is actually rather tricky. We don't have a precise description of what it should mean. See this discussion: http://haskell.org/pipermail/glasgow-haskell- users/2009-December/018155.html -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/566#comment:1 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects
participants (1)
-
Hackage