build-depends in old-style package descriptions

Thomas Schilling nominolo at googlemail.com
Sun Sep 9 09:18:43 EDT 2007


On Sun, 2007-09-09 at 10:21 +0100, Ross Paterson wrote:
> 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)?

(1) was easier at the time.  (2) should be relatively easy to implement
now, but since the current implementation works, I didn't bother so far.
I know that (1) is a rather hackish solution, but why is it "just
wrong"?  (After all, it works.)




More information about the cabal-devel mailing list