[Haskell-cafe] Re: [Haskell] Re: Trying to install binary-0.4

Neil Mitchell ndmitchell at gmail.com
Wed Oct 17 05:56:02 EDT 2007


Hi

> > In general, if it compiles and type checks, it will work. It is rare
> > that an interface stays sufficiently similar that the thing compiles,
> > but then crashes at runtime. Given that, shouldn't the tested versions
> > be something a machine figures out - rather than something each
> > library author has to tend to with every new release of every other
> > library in hackage?
>
> The only reasonable way we have to test whether a package compiles with a
> new version of a dependency is to try compiling it.  To do anything else
> would be duplicating what the compiler does, and risks getting it wrong.

Agreed - that's what I meant by checking it. Ideally with multiple compilers.

> But you're right that tools could help a lot: for example, after a base
> version bump, Hackage could try to build all its packages against the new
> base to figure out which ones need source code modifications and which can
> probably just have their .cabal files tweaked to allow the new version.
> Hackage could tentatively fix the .cabal files itself and/or contact the
> maintainer.

Even better, after any new package release hackage could compute all
packages which depend on that one and try them. That way you can
always guarantee that every hackage package will work with the latest
hackage dependencies. Another way of saying this is that every package
on hackage should compile out the box with cabal-install on a fresh
system.

> We'll really need some tool to analyse API changes too, otherwise API
> versioning is too error-prone.  Anyone like to tackle this?  It shouldn't
> be too hard using the GHC API..

You can also do it with haddock and the --hoogle flag, to some extent.

Thanks

Neil


More information about the Haskell-Cafe mailing list