PSA: cstruct 3.4.0 removes old ocamlfind subpackage aliases

mirageos

#1

Just a headsup about an incoming deprecation to the cstruct library.

In the old days (pre cstruct.3.0.0), the ocamlfind libraries were subpackages of the main cstruct library: cstruct.lwt, cstruct.async, cstruct.ppx and cstruct.unix. They were also built in the same directory in some cases, so it was possible to “accidentally” use one of the submodules and have linking work without accurate dependencies being specified.

In Cstruct 3.0.0, we split out all the subpackages into their own first-class opam packages, so that they became cstruct-async, cstruct-lwt, cstruct-unix and ppx_cstruct. However, to ease the transition for old projects, the META file still exposed the old names as a dependency redirect.

With Cstruct 3.4.0 about to go into opam, those compatibility shims will now be removed. The reverse dependency analysis of the opam build doesn’t look too bad, and it’s mainly mirage projects that were affected. However, if you mysteriously find that your project is failing due to finding a cstruct library, try just (e.g.) renaming cstruct.lwt to cstruct-lwt in the dune file, and adding cstruct-lwt to the opam dependency list.

The reason for removing the compatibility shim is that the old ocamlfind names do not work when embedding the dune libraries in a dune vendor workspace. So I’m removing the technical debt now to make those so-called “duniverse” deployments significantly easier to manage.


PSA: cohttp 2.0 removes old ocamlfind subpackage aliases
#2

This has now been merged into opam-repository so please don’t forget to update any dev versions of opam files you have in your own repositories with the new ocamlfind names, and an opam constraint to "cstruct" >= "3.0.0" to make them available.