[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MirageOS-devel] supported OCaml versions



Hannes Mehnert <hannes@xxxxxxxxxxx> writes:

> - Mirage supports 4.04.2 upwards (this is true for the mirage tool
> itself as well as libraries only used with mirage, other libraries used
> elsewhere as well (such as ipaddr, uri, cstruct, tls, etc.) may want to
> support more OCaml versions

One thing that I'd like to advertise to maintainers of such libraries
and users of jbuilder is the workspace construct in jbuilder. It's a
very effective way to test a library against multiple versions of OCaml
at once. This is far easier than relying on the very slow travis
feedback loop. To make use of it all you need to do is a workspace file
like:

$ cat jbuild-workspace.dev

;; This file is used by `make all-supported-ocaml-versions`
(context ((switch 4.02.3)))
(context ((switch 4.03.0)))
(context ((switch 4.04.2)))
(context ((switch 4.05.0)))
(context ((switch 4.06.0)))

And a Makefile target that includes the following:

.PHONY: all-supported-ocaml-versions
all-supported-ocaml-versions:
        jbuilder build --dev @runtest @install --workspace jbuild-workspace.dev

Following this, $ make all-supported-ocaml-versions will build your
library, and run all tests against all the versions of OCaml defined in
your workspace file.

I've used this trick in a few libraries already, and it's quite a useful
tool. Obviously, this might be overkill for many smaller projects, but
for widespread libraries like ocaml-cstruct, this could be a time-saver.

_______________________________________________
MirageOS-devel mailing list
MirageOS-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.