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

Re: Bug#479152: ITP: core -- Jane Street Capital's alternative standard library for OCaml

On Sat, May 03, 2008 at 11:20:21PM +0200, Stefano Zacchiroli wrote:
> > - If you have patches either to make bin-prot big-endian or to excise
> > those bits of core that depend on bin-prot, then I'll take them, or
> > try to help.
> I haven't yet attacked the big-endian bits, but I'm working on a patch
> to make bin-prot dependency optional and detected at compile time. Will
> mail you back when I've something fully working.

So, here is my current "solution". Beware, it's really "hackish" :)

The main part to get rid of the bin_prot dependency is emptying the
Binable interface so that other modules are not require to implement
serialization stuff. This is easy. The tricky part is a lot of other
places are using "with bin_io" modifiers and have in their
pseudo-headers declared that they want to be processed by camlp4 with
the bin_prot syntax extension.

For this reason the patch removing support for bin_prot is rather large,
and hard to make compile-time conditional. For the same reasons is not
something I will push to Jane St.  Hence what I did for the Debian
package is to use a $DVCS (git in this case) to fork a branch in which I
maintain a "no-bin-prot" branch, in the hope that this will make it easy
adapting to future upstream changes.

Then from it I'm automatically extracting the patch which is included in
the Debian source package, but is only applied on the architectures
which are lacking bin_prot.  The (automatically generated) patch is at
[1]. The branches used to generate it are master[2] and no-bin-prot[3].

For users this mean that they would get legacy "core" on i386 and amd64,
while they will be getting a stripped down version on other
architecture, not support type safe serialization. Better than nothing.

Time to push for the port of bin_prot to all architectures ...


[1] http://git.debian.org/?p=pkg-ocaml-maint/packages/janest-core.git;a=blob;f=debian/patches/no-bin-prot;h=0821305725ce00908be3ee71b582200f8b979120;hb=HEAD
[2] http://git.debian.org/?p=pkg-ocaml-maint/packages/janest-core.git;a=tree;h=master
[3] http://git.debian.org/?p=pkg-ocaml-maint/packages/janest-core.git;a=tree;h=no-bin-prot

Stefano Zacchiroli -*- PhD in Computer Science ............... now what?
zack@{upsilon.cc,cs.unibo.it,debian.org}  -<%>-  http://upsilon.cc/zack/
(15:56:48)  Zack: e la demo dema ?    /\    All one has to do is hit the
(15:57:15)  Bac: no, la demo scema    \/    right keys at the right time

Reply to: