Unsupported ocaml versions (any policy)?

Hi, I’m wondering if there’s some standard policy in ocaml, for which version is the oldest supported version? So for instance, maybe any Ocaml version < 4.00 would be unsupported, meaning that any request for help from the maintainers would get a “upgrade to something more recent and then check back with us” ??

I personally use something pretty recent, and upgrade my code as I revisit it, but just wondering what’s the standard.


For my personal projects I try to keep my code compatible with ocaml { >= "4.03" }. CI helps a lot. Otherwise, imho, a reasonable policy for libraries is to depend on >= 4.06, which is now available almost everywhere, even BS. For a binary, do what you want :slight_smile:

1 Like

I guess I better explain why I’m asking. I’m wondering (for an Ocaml project I’m trying to maintain) what version of Ocaml I should consider as the “oldest I’ll try to support”. I mean, if nobody using version 3.NN is going to get support from the maintainers, it’s reasonable to not bother supporting it, myself.

I think a reasonable “oldest supported version” to pick is the one that is currently available in debian stable, as it’s probably a lower bound on the versions that people might have in the wild.

That would mean ocaml 4.05 right now (in debian buster).


To support Armael’s point, I believe there was a recent discussion within the dev team that concluded with “we’re supporting whatever version is on Debian stable, we should not make changes that break code aimed at that version.”

Note that I don’t speak for the dev team, but you can place your bet on 4.05.

By the way, I’d be curious to know if some people were using 3.XX in a development setting and why they do so.

I just support the oldest version I can without jumping through too many painful hoops (like my dependencies not working on older versions). It certainly helps to have CI to see when you have regressions regarding that and can then act (by either fixing it or declaring it outdated). I don’t think I would even consider supporting anything older than 4.02 and certainly not 3.xx.

1 Like

If you need to support older versions you can take a look at Future syntax, stdlib-shims and stdcompat.
Although you’ll probably be limited by what Dune itself supports: Dune 1.x needs OCaml 4.02 minimum, and Dune 2.x needs 4.06 minimum.

1 Like