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

Re: [MirageOS-devel] breaking up cstruct packages



On 03/11/2016 12:19, Anil Madhavapeddy wrote:
> I'm porting cstruct opam packages to topkg, and need to make a backwards 
> incompatible change to the ocamlfind layout.  It is currently:
> 
> cstruct
> cstruct.lwt
> cstruct.ppx
> cstruct.unix
> 
> I propose to change these ocamlfind packages to 
> 
> cstruct
> cstruct-lwt
> cstruct-ppx
> cstruct-unix
> 
> so that they are the same as the ocamlfind layout.  This also makes it 
> possible to have different version constraints on each package.  The specific 
> bug I am trying to fix is that "cstruct.async" is blocking OCaml 4.04 support 
> until the upstream Async release comes out, and I would like to get the core 
> package building and released as soon as possible.  With the new scheme there 
> is much looser coupling among the dependencies, at the cost of rewiring all 
> the existing users to a new ocamlfind syntax.

You mean cstruct.ppx here, instead of cstruct.async, or?

> Thoughts welcome!  This would be a bump to Cstruct 3.0 to account for the 
> large scale renaming.

Sounds good to me.  While at it, can the generated to/of string
functions of %%cenum be optional, please (by having a [@@string],
similar to [@@sexp] -- where sexp needs to imply string since it's
implementation uses to/of_string)?

IMHO this would be much cleaner (usually I use only to/of_int
functions), and the negative [@@nostring] looks very ugly.  Point here
is that it safes huge amount of memory (the generated tls library is
incredible big just because we have those strings around).

I know, a sufficiently advanced compiler should automatically get rid of
that, but AFAICS it does not (didn't try 4.04+flambda, though (neither
LTO due to ppx/sexp compilation troubles)).


Since we break things, no need to leave any bits behind,

hannes


_______________________________________________
MirageOS-devel mailing list
MirageOS-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.