[opam-devel] opam 2 containers/building toplevel

Louis Gesbert louis.gesbert at ocamlpro.com
Tue May 31 14:36:01 BST 2016


Le mardi 31 mai 2016, 14:03:30 Anil Madhavapeddy a écrit :
> I'm just building Docker containers for the OPAM 2 master tree to sit
> alongside the existing 1.x containers.  The build currently uses the
> builtin libraries (make lib-ext), but this does not build the admin scripts
> for some reason.
> 
> The admin scripts are needed for transitioning the 1.x repo to the 2.x
> format -- is there any reason why this functionality shouldn't be
> integrated into `opam admin` rather than requiring external scripts that
> are difficult to build?  It would really help with testing the 2.x
> branch...
> 
> Anil

I usually don't build them, but rather run them directly, and using them as 
scripts is quite convenient to test out various operations on the repo. Most 
of them are throw-away and don't justify to be added to a tool that gets 
installed everywhere. Doing it this way reduces the cost of testing out 
scripts as well as the maintenance cost (obsolete scripts may lag behind API 
changes, then either get updated when needed or removed).

The issue with `make lib-ext` may be that `opam-admin.top` can't find the 
proper opam libraries installed. The Makefile in `admin-scripts/` has a quick 
hack to build bytecode versions, but that reiles on `ocamlfind` to locate the 
installed versions of the dependencies; it wouldn't be difficult to improve it 
to work with `lib-ext` though.

Now, for scripts that get generally useful and somewhat stable, it's perfectly 
fine to migrate them to be part of opam-admin. Moving the scripts to their own 
repo would also be fine if they reach a critical weight.

Should we improve compat of the Makefile and/or move the 1.2->2.0 
functionality to opam-admin ?

Best,
Louis


More information about the opam-devel mailing list