Working on a fix for ticket #89
Stephen Blackheath [to cabal-devel]
rubbernecking.trumpet.stephen at blacksapphire.com
Tue May 5 19:50:30 EDT 2009
All,
I'm working on a fix for ticket #89
(http://hackage.haskell.org/trac/hackage/ticket/89), and I have a
specific question for the list:
----
If I do this...
build-depends: base
Library
build-depends: bytestring
...then when the library compiles, it will fail to find the Prelude
(i.e. -package base doesn't get passed to ghc). Is there a reason why
the global 'build-depends' doesn't add to all targets (i.e. all exes &
libs)? That's what I would expect it to do, but that might be just me.
Or more to the point, should this be fixed?
----
The code changes I'm working on also fix a couple of other things, so
this is the complete list:
- Ticket #89: Make it so the executable can depend on the library
defined in the same package. If hs-source-dirs is used, you can avoid it
compiling the .hs files multiple times.
- Make it so build-depends: defined in a Library or Executable block
affects only the build of those components, not all components as
currently happens. For avoidance of package breakage, this behaviour
only happens if you specify cabal-version: >= 1.7 (that is, versions
less than 1.7 are entirely excluded).
- Make a really simple unit test harness using the test-framework
package, and add some test cases for the new behaviour. The idea is that
we can gradually integrate existing tests (hunit & quickcheck) into it.
- Make UnitTests compile (though hardly any of the tests pass).
This patch is not yet tidy enough to submit, but it is complete enough
to actually work for GHC. I would welcome any comments. Here it is
(against HEAD):
http://upcycle.it/~blackh/cabal/cabal-ticket-89-v3.patch
Steve
More information about the cabal-devel
mailing list