Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
hannesm opened this issue Mar 19, 2024 · 2 comments

Comments

@hannesm
Copy link
Member

hannesm commented Mar 19, 2024

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).

@hannesm hannesm changed the title policy question with respect to OCaml 5 policy question with respect to data races in opam packages and OCaml 5 upper bounds Mar 19, 2024
@avsm
Copy link
Member

avsm commented Mar 19, 2024

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
Copy link
Member Author

hannesm commented Mar 19, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants