Hi everyone,
I've just pushed a branch that replaces omake by the solvuu_build ocamlbuild plugin for compilation. This build system features:
- declarative description of the libraries, apps and their dependencies
- compilation unit discovery (no need to list modules in each library)
- conditional compilation (a library/app can be omitted if it depends on an ocamlfind package that is not installed, or a library that is omitted)
- C code compilation (automated discovery of compilation units)
- generation of project files (META, .ocamlinit, .merlin)
- a Utop-friendly ocamlfind installation of sublibraries
The last item is a reference to the problem described by Sébastien last Friday. If we have sublibraries foo.bar and foo.baz, requiring foo.bar under the toplevel makes modules of foo.baz visible, while they are not even loaded. One solution we proposed (and used in ketrew) was to define several independent libraries (foo_bar and foo_baz). This solves the issue but didn't feel totally right to me with respect to OPAM, although I acknowledge there are OPAM packages that behave this way, like oasis, ocamlnet and ... ketrew ;o). There is no major constraint that an OPAM package should correspond to exactly one ocamlfind package (could even correspond to 0, for all that matters) but still... Anyway, I found a simple approach to install our libraries as biocaml.async, biocaml.lwt and biocaml.unix *and* make it so that requiring one doesn't show the other. Actually this is a feature of the META file, I didn't have to do much.
There are still some minor issues (related to lack of configuration in solvuu_build, Ashish and I should be taking care of that), but I think this is enough to get started and add new libraries in biocaml. I refrained from pushing to master yet, because I depend on the master branch of solvuu_build and I'd rather wait for a new release of solvuu_build. I'll keep you informed as soon as it's ready. If you want to test it, just pin solvuu_build to #master and biocaml to #solvuu_build.
Any comments welcome, don't hesitate if you have questions.
ph.