Archival policy, pcre2 and backlevel ocaml: a conflict

This post is asking for advice on how to resolve what I think is a coming version-compatibility/availability problem related to pcre2-ocaml.

I just now realized that

(1) the archival policy specifies

The current compiler cutoff threshold is 4.08 .

(2) It turns out that when a very kind gentleman ported forward the pcre-ocaml wrapper to pcre2, he did so at OCaml version 4.12.0. The folks over at semgrep have a version of pcre2-ocaml, which also only works for versions >= 4.12.0.

(3) Since pcre1 is slowly going away, that means that eventually people will need to switch to pcre2.

There is a obvious conflict here, and I’m not sure how to address it.

(a) backport: It has been a long time since I hacked C FFI extensions to OCaml (it doesn’t help that the build uses dune, which I know nothing about, being a Makefile partisan); I could remember how to do it, and specifically how to do it for backlevel OCaml compiler/runtime versions. I remember looking into the situation, and pcre2-ocaml does not compile for backlevel OCaml versions (< 4.12.0).

I’m a little loath to put in that work, when it’s for backlevel versions of OCaml, using an FFI that is no longer supported by any recent OCaml versions.

(b) Just wait: maybe simplest is to just wait; eventually the “compiler cutoff threshold” will rise to 4.12.0, and the problem will just go away.

But I don’t want to just sit on this and wait for a problem to blow up, so I figured I should ask for advice for the best way forward.

The needed adaptations are of the trivial kind: something like 4.08 compatibility · semgrep/pcre2-ocaml@5e600e6 · GitHub seems to be enough to get it compiling on 4.08.

Cheers,
Nicolas

1 Like

Thank you for kicking me out of my laziness. There were a couple more things that needed to be defined, but it was pretty much as you describe: a few names to be defined, nothing serious.

Again, thank you!