portability and .cabal files?
ross at soi.city.ac.uk
Thu Nov 22 20:42:32 EST 2007
On Fri, Nov 23, 2007 at 01:05:42AM -0000, Claus Reinke wrote:
> how is portability (meant to be) documented in .cabal files?
> the only thing i can find in Cabal/authors.html are 'os()' and
> 'arch()', but those are tests, rather than dependency fields.
> should .cabal files for non-portable packages consist of
> a big if with the tested and known-to-work os/arch
> combinations as test and an empty else-branch for
> unknown/untested/known-to-fail combinations?
> shouldn't hackage display portability of its packages?
> if i look through the system-dependent packages on
> hackage, hardly any of them indicate their platform
> limitations anywhere but in free-form comments and
> module names, so if you wanted to filter packages
> by supported platforms, you'd be stuck..
Hackage ought to show impl, os and arch tests, but it doesn't yet.
One possibility is to put them in the dependency lists, e.g.
os(windows), base, Win32 OR
!os(windows), base, X11
I guess you could indicate that a package won't build in some
configuration using the buildable field. Hackage ought to learn
to use that too.
More information about the cabal-devel