build-depends in old-style package descriptions

Ross Paterson ross at soi.city.ac.uk
Sun Sep 9 05:21:20 EDT 2007


The build-depends field has been moved from the package level to the
individual library and executable components.  (And the new build-tools
and pkgconfig-depends fields are similarly attached to components.)
I'm not sure whether this is a good idea, but more specifically I
came across this in the parser for old-style package descriptions in
Distribution.PackageDescription:

	-- The 'build-depends' field was global so far.  Now it's 
	-- supported in each section. 
	-- XXX: we actially have two options here
	--  (1) put all dependencies into the library section, if the
	--      library section would be empty, mark it as not buildable
	--  (2) duplicate all dependencies in each section, libraries
	--      and executables
	-- Right now we go with (1)

Surely (1) is just wrong.  Is there any reason not to do (2)?


More information about the cabal-devel mailing list