ocaml-community / ocaml-mariadb

OCaml bindings to MariaDB, supporting the nonblocking API
55 stars 18 forks source link

Switch build system to dune and dune-configurator. #52

Closed paurkedal closed 1 month ago

paurkedal commented 7 months ago

I suggest we switch the build system to Dune to easy future contributions to the project. This PR is my proposal of how to do it as conservatively as possible, but I had to rename the mariadb_bindings library to mariadb.bindings.

There are some warnings which can easily be resolved with a subsequent commit, after which we can remove the dune-workspace file. There are also deprecations from async, which I think we can resolve now since they are from 2021.

paurkedal commented 6 months ago

I can see I've duplicated efforts from #51 with this PR (though with the differences that it uses dune-configurator to replace the logic of the previous configure script and that it uses the ctypes dune stanza).

paurkedal commented 3 months ago

I can see I promised in a comment in the dune-workspace file to fix some warnings enabled by default by dune. I'm on it.

paurkedal commented 3 months ago

Done, except I left some warnings which may need to be addressed. Esp. I wonder whether this could explain the remaining leek reported in #29:

File "lib/nonblocking.ml", line 621, characters 8-12:
621 |     let free res =
              ^^^^
Warning 32 [unused-value-declaration]: unused value free.
paurkedal commented 3 months ago

I missed some updates to the opam file (and .gitignore). Pinning the package to this branch works now. (It might be worth squashing the 3 last commits, or maybe all, before merging.)

paurkedal commented 2 months ago

Force pushed due to rebase to master and squashing two fixup commits. I'll use this as the base for CI.

paurkedal commented 2 months ago

@ygrek Do you want to have a look at this before I merge? I think I have reasonable OS coverage in my testing now: