ocaml / opam-repository

Main public package repository for opam, the source package manager of OCaml.
https://opam.ocaml.org
Creative Commons Zero v1.0 Universal
516 stars 1.12k forks source link

policy question with respect to data races in opam packages and OCaml 5 upper bounds #25524

Open hannesm opened 5 months ago

hannesm commented 5 months ago

Dear Madam or Sir,

I understand that some people want to use OCaml 5. I also know that some opam packages are racy -- which is commonly not an issue at all, but with OCaml 5 this is more likely to become an issue.

So, my question is about policy: if a package that has races compiles fine with OCaml 5, and the test are running fine, should it nevertheless be restricted to "ocaml" {< "5"}? I'm asking since I don't quite understand what the expectation is from people trying out OCaml 5 -- also I'm asking since it seems not (easily) doable to setup a opam-repo-CI check that tests each opam package for race conditions.

Given that in OCaml 5, lots of users still only use a single core (or a specific library on a single core only), restricting to < 5 also sounds pretty restrictive.

Have there been previous discussions about that? The package I'm talking about is mirage-crypto (as well as nocrypto).

avsm commented 5 months ago

OCaml 5 was designed specifically to allow for running OCaml 4 and below code on the OCaml 5 compiler with minimal modifications and no change in behaviour, thus allowing for the migration to multiple cores as a separate step.

Therefore, it would be a real barrier to migration if parallel-unsafe code were disallowed via an upper bound to OCaml 5 in opam packages! The vast majority of code I run on OCaml 5 is still single-core, and that's completely ok.

There have been other approaches to documented the parallel safety of dependencies:

hannesm commented 5 months ago

Thanks @avsm for your opinion. I'm myself not using OCaml 5 anywhere, and just want to gather some feedback / opinions about what a potential OCaml 5 user could expect of the opam-repository packages. I understand your perspective, while it may be frustrating for new users that find every 2 seconds a data race - but c'est la vie.