[ocaml-platform] Bytes

Daniel Bünzli daniel.buenzli at erratique.ch
Sat Jun 25 18:29:13 BST 2016


Le samedi, 25 juin 2016 à 17:54, Gabriel Scherer a écrit :
> I initially sent it to Gerd Stolpmann on the idea that there may be non-opam users out there for which it would be a good distribution channel. The idea came from the fact that ocamlfind already had all those base-* packages, and that base-bytes was a nice extension of this principle.

ocamlfind has META files for the base packages, not implementations…

> I have no strong opinion on where such compatibility packages should go, and I think (as we both pointed out) that it would be important to have a consistent process for those things. If you or someone else are willing to give clear directives on how to go forward with compatibility packages, I think it could be really nice. In particular, is there a way to avoid a combinatorial explosion of small compatibility packages, or is this ok for users?
It depends a bit if we are talking about module additions or function additions. For module additions we could choose to have either of these:  

1) One compatibility package stdlib-compat, for Bytes, Uchar and Result  
2) One compatibility package per module.

> There is also the question of what the responsibility of this package is. The initial plan was to provide only the features available at the time Bytes was introduced (4.02), but I think it could be nice to add new functions to keep up with recent stdlib versions of Bytes. This could be done as a separate package, but it can also be done in findlib.  
I really don't think this should be done in findlib. This fails to separate concerns and is out of scope for ocamlfind. As you noted some people do not use ocamlfind and this may actually get in the way at a certain point in the long term goal of simplifying the packaging and build eco-system. Also for the end user it makes it easier to understand the system if to each $LIBPREFIX/$PKG corresponds one OPAM package whose install instructions he can inspect.

> If we decide to update the bytes package, we have to decide on a versioning scheme. The simplest may be to have base-bytes version follow upstream OCaml version, so that people can request
>  
> base-bytes {>= 4.03}
>  
> if they use a Bytes feature only available since 4.03.
That looks like overkill to me, why don't we simply have a package that is up-to-date with the latest version of the compiler ?  

Best,

Daniel


More information about the Platform mailing list