[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Ocaml do hash-based dependency

> Hi,
> Just FYI: Today at lunch I listened to some Ocaml maintainer dicussions.
> They are going to implement a hash-based dependency system: Library
> packages calculate a (short, 5-letter) hash over their interface. This
> is appended to the library name and put in the Provides. Depending
> libraries then Depend on that virtual package.

GHC computes such a hash in its interface files!

    $ cat A.hs
    module M (f) where

    f = 10

    $ ghc --show-iface A.hi

    interface main:M 6103
      interface hash:   347ebd883561c2573459cb79ce49e598
      ABI hash:         c4d50865aafadb9b103e54bd49948429
      export-list hash: 380b973aee72b0a3dba58233eac02964
      orphan hash:      693e9af84d3dfcc71e640e005bdc5e2e

    export main:M f
> I once proposed such a system for Haskell, but it was turned down,
> saying (IIRC) that dpkg might choke on such a large amount of virtual
> packages. I guess we can watch how it goes for the Ocaml guys and, in a
> while, see if this approach would be useful for us as well.

-- Don

Reply to: