Issue with package "pretty"

David MacIver david.maciver at gmail.com
Sun Apr 27 16:29:32 EDT 2008


On Sun, Apr 27, 2008 at 9:25 PM, Duncan Coutts
<duncan.coutts at worc.ox.ac.uk> wrote:
>
>  On Sun, 2008-04-27 at 23:49 +0400, Bulat Ziganshin wrote:
>  > Hello Duncan,
>  >
>  > Sunday, April 27, 2008, 11:42:01 PM, you wrote:
>  >
>  > >> > The problem is that if you install pretty, Cabal will suddenly cease
>  > >> > working until you recompile it. It depends on a version of pretty
>  > >> > which gets bundled with GHC is purportedly of the same version as the
>  > >> > one on hackage, but the two aren't binary compatible. So when it tries
>  > >> > to use it, everything goes boom.
>  >
>  > > The solution is not to identify installed packages by their name and
>  > > version but by a hash that identifies the package ABI.
>  >
>  > probably not ABI (it should be the same), but random number generated
>  > when compilation (build) occurs
>
>  The package name and version do not identify an ABI. You change the ABI
>  by using -O0 vs -O1.
>
>  Also, I think modeling build processes as randomness isn't the right
>  approach. Build are really pure functions but with a rather large number
>  of inputs. The Nix approach is to identify them all and calculate a hash
>  of them all and use that to identify each built package.

The main thing I'd like to borrow from the Nix approach is the ability
to back out of the package change. I'm really more bothered about the
fact that it left me with a nonfunctioning build system (until someone
pointed out runghc would compile everything from source) than anything
else. :-)


More information about the Libraries mailing list