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

Re: [MirageOS-devel] Binary Irmin slices



Hi,

> It seems that Irmin.Contents.String overrides the default Tc.String
> serialisation with one that doesn't include the length:
> 
> https://github.com/mirage/irmin/blob/ae42dab34d8451395910eb4cd534ee887a6871a5/lib/ir_contents.ml#L143
> 
> Why does it do this?

The goal is to have the file contents (once expanded on the filesystem) 
serialised as the raw string, not at the string with a prefix.

While I agree that this breaks composability, I'm not sure how to fix it 
properly. I'd probably wrap the contents in Ir_slice.t into something that make 
bin-prot happy. I've moved the bug is tracked to the issue tracker[1].

Note that the HTTP client/server code is using to_json/of_json to exchange 
slices, so they don't hit that bug. Would be nice to have a binary RPC backend 
exercising this code path. That might be an interesting project if ones want to 
learn about Irmin API (see [2]).

Best,
Thomas

[1] https://github.com/mirage/irmin/issues/204
[2] https://github.com/mirage/irmin/issues/205
_______________________________________________
MirageOS-devel mailing list
MirageOS-devel@xxxxxxxxxxxxxxxxxxxx
http://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®.