[Unison-hackers] More invasive code cleanup?

Stéphane Glondu steph at glondu.net
Fri Feb 5 04:55:42 EST 2021


Le 03/02/2021 à 16:01, Greg Troxel a écrit :
> I know Stéphane has some code for a new protocol, and I think we should
> have a big picture discussion about the approach.  The world has
> increasing gone to "JSON is the answer" for interchange in many places,
> and there is BSON.  I realize there is also protobuf and some others.  I
> would like to avoid a format used only by uniso, and prefer a way to use
> something maintained by others and widely depended on.

I agree a big picture discussion is welcome.

In my branch:

  https://github.com/glondu/unison/tree/umarshal

I use a simple custom serialization format on which the protocol is
built. The core is in src/ubase/umarshal.ml. The changes may look big,
but are pretty simple and systematic. The constraints for this version
were: 1) do not depend on OCaml version and 2) do not add dependencies.
I also previously did two other trials (protobuf and bin-prot), but only
with constraint 1.

>   Besides that
> sort of issue, I think we need a plan for being able to extend the
> format while allowing version compat.

Note that my branch is not that, but I think is an interesting first
step towards it (which would need even more invasive changes).


Cheers,

-- 
Stéphane


More information about the Unison-hackers mailing list