Community help/advices need for ocaml-lua

Hi all, I’m the author of ocaml-lua, a complete binding to the Lua library, version 5.1.x.

I was recently asked to port the library to OCaml 4.08 and of course I want to make it available to the new compilers but I need some help. Here are the ideas/problems I’m facing and about which I’d like to hear your opinions:

  1. I decided to remove the dependency of the package on any external Lua library provided by the hosting OS: Lua 5.1.x is freezed and there no point in depending on an external library so I added the sources into ocaml-lua repository. This should greatly simplify the compiling/linking process. What do you think?

  2. I’m porting the build from OASIS to dune: no problem here but in the present version of ocaml-lua (1.7) installs a library named “lua”. So you opam install ocaml-lua and then, in the toplevel, you #require "lua" which is very unusual.
    In the dune version: the package remains ocaml-lua but the library itself has the same name. This will certainly break the build process of programs using the library. It’s not an API change but… I don’t know if this is acceptable.

  3. In the coming 1.8 version I want to support OCaml >= 4.08: this way the old versions (<= 1.7) will continue to be installable for old compilers. Again in my opinion this is not a limitation because the library is the same but I’m open to critics.

  4. A question about OPAM CI: is there a way to locally test the CI process? I usually submit a new version of the package and for one reason or another some test fails. This is a loss of time for the OPAM guys and I want to keep their effort ideally near zero. I’m particularly interested in how to test the build process for OSX and Windows (because I was requested to support Windows) and being a Linux programmer I have no idea on how the OCaml ecosystem works in OSX (ok, via brew I suppose, but still… I don’t hava a Mac) and… Windows. Someone out there using OCaml/OPAM in a Windows environment? And how to start a complete CI cycle locally?

  5. I’m grudgingly going to drop support for LuaJIT: the reason is to keep the library as simple as possible to be compiled everywhere. Anyone using ocaml-lua and LuaJIT?

Regarding 2, one option if you want to minimise breakages is to rename the package just lua and then have ocaml-lua be a proxy for lua.

I would expect ocaml-lua to be used only as a direct dependency of end point programs rather than be a dependency of intermediate libraries. ocaml-lua has no reverse dependencies in opam for instance. In this case, renaming the library is probably Ok, especially as it is a simple change for users of ocaml-lua.


Thanks @jeremiedimino, I’m probably going to rename the opam package, it seems more linear than a proxy for such a simple library. This is not a jbuilder -> dune scenario.

Regarding 4) I’m still groping in the dark… After days of Google and a lot of reading I have no clue about how to achieve the task.

See and as an examples for working with Windows and OS X CI/opam.

1 Like

In the past I’ve used autoci to generate the travis/appveyor configuration and it worked well.


@XVilka @jeremiedimino thanks!