[opam-devel] having an iocamljs for every pull request

Anil Madhavapeddy anil at recoil.org
Sun Oct 5 23:21:35 BST 2014


On 6 May 2014, at 11:43, Andy Ray <andy.ray at ujamjar.com> wrote:

> On Tue, May 6, 2014 at 11:16 AM, Anil Madhavapeddy <anil at recoil.org> wrote:
>> Jeremy enquired about what is required to have an iocamljs toplevel available for every new package pull request into OPAM repository.  I believe we actually have many of the mechanics already:
>> 
>> - Set up an `i.ocaml.org` virtual machine to serve the Cohttp static site for IOCamlJS.  This never runs native code, but does all the URL remapping for the JavaScript frontend to work.  We would need to add virtual hosting support for it, which should be fairly easy.
> 
> As discussed previously there are one or two things to 'harden' in the
> server to make this safe but nothing difficult or time consuming.
> 
>> - Detect if there's a new ocamlfind package in the pull request, which could be done using Thomas' ocamlfind-detection patch.
>> 
>> - Alter the OPAM-repository Travis scripts to POST to i.ocaml.org with the OPAM repository merge point and the name of the new package(s), and have the VM build the new libraries and make the cmo available.
> 
> Yeah, the only trick is keeping the opam/ocamlfind installation
> working correctly as new packages are installed/updated to the
> universe.
> 
>> - Have the Travis script comment on the original pull request with the URL of the toplevel.
> 
> Using the dynamic loading approach there would only be one generic
> iocamljs kernel (/url) and the packages would be loaded by the user.
> You could I suppose auto generate a notebook with the appropriate
> #require directives though.

Now that we have `findlib` files in the OPAM repository, I've been
wondering if it's practical to maintain an .ocamlinit that requires
all the installed libraries.  It might well be too slow, but I would
find that quite convenient, and it would also reduce confusion among
new users.

It would also help with the iocamljs use-case, since the list of
installed packages in a switch could be used to generate the directives
in the notebook.

-anil


More information about the opam-devel mailing list