[ANN] opam-minver 0.2.0 - automatically determine minimum dependency versions

I have published opam-minver 0.2.0 (previous versions were not released to the public). What it does is use a binary search to find the minimum passing versions of a project’s dependencies listed in its opam file and optionally writes them out to the opam file in-place. I wrote this because I was working on another project (not yet published) and got to the point of listing all the dependencies, and realizing I had no idea what versions it was compatible with. This tool finds that out automatically.

It’s pretty well polished at this point, and it has a cmdliner interface, stores its state in a json file so sessions can be resumed if need be, and it also finds the minimum compiler versions and handles split OCaml compiler bounds if, for example, a project doesn’t work specifically with early OCaml 5 versions. This could be used not only for new projects, but also to relax version bounds on any project where they haven’t been determined precisely.

Homepage and readme is here: GitHub - luminous-moose/opam-minver: Automatically determines minimum dependency versions for an opam package. · GitHub

Did you consider using the opam solver to run a lower bounds solve?

The opam-repo-ci does something similar with one of its checks. That would split up the finding a solution for a package install from whether it builds successfully.

I tried that, and it kept timing out, even when giving it 10 minutes to solve, or relaxing the requirements. Using aspcud, it failed to find solutions that the default solver could find. Not only that, that doesn’t do the build and run tests step that this does.

mccs isn’t good at looking for lower-bounds so yes i’m not surprised it takes forever.
If you want to look for lower-bounds you should use builtin-0install, that’s also what opam-repo-ci uses. It just needs the right criteria and it should work just fine.

Also note that aspcud hasn’t been an opam solver for about 10 years now