On Tue, Jan 21, 2014 at 9:48 PM, Anil Madhavapeddy <a...@recoil.org> wrote:
> On 21 Jan 2014, at 21:31, David Scott <scott...@gmail.com> wrote: > > NB: I think I'm hitting an opam 1.1.0-beta bug where "mirage-types" > optionally depends on "lwt & ipaddr"; some other package depends on "lwt"; > but "ipaddr" is not being demanded. Anyone else seeing this? Perhaps I've > misunderstood the meaning of depopts in opam. A workaround is just to > install "ipaddr" first. > > > The intention here is to have: > > - a 'mirage-types' package that is completely dependency free, and only > has module type definitions with completely abstract types. > - a 'mirage-types.lwt' package which specializes the above types with some > concrete common defaults, specifically Lwt for IO and Cstruct for buffer, > Ipaddr.V4.t for ipaddr. Because these are concrete types in the module > signature, you now need those libraries installed to get the cmi files for > them. > > The OPAM line of: > > depopts: [ ("lwt" & "cstruct" & "ipaddr") ] > > means that if all three of the packages are present, then an optional > dependency (the mirage-types.lwt) will be compiled. However, upstream > users of mirage-types.lwt will thus need to explicitly depend on > lwt/cstruct/ipaddr to ensure that mirage-types.lwt will actually be present. > Ah ok. In my case the BLOCK signature is being used by mirage-block-xen, so I guess I should explicitly add ipaddr to its depends (I'm sure lwt and cstruct are already there). Pity I can't say it depends on 'mirage-types.lwt' -- I guess that would require yet another package. I notice the new mirage-types.lwt will try to build IFF 'lwt' is present: https://github.com/avsm/mirage/blob/split-libs/build#L3 Perhaps we should change this to IFF 'lwt & cstruct & ipaddr' so the error manifests as a 'mirage-types.lwt' is missing higher up the dependency chain where the missing dependency on 'ipaddr' is? Cheers, Dave
_______________________________________________ Xen-api mailing list Xen-api@lists.xen.org http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api