From 52db3ecb52b324f164260257e7960c6978d0f566 Mon Sep 17 00:00:00 2001 From: Carine Morel Date: Thu, 21 Nov 2024 19:17:12 +0100 Subject: [PATCH 1/4] Change deps to backoff and qcheck-stm. --- dune-project | 5 +++-- saturn.opam | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/dune-project b/dune-project index 9fe76bba..de728b25 100644 --- a/dune-project +++ b/dune-project @@ -14,7 +14,7 @@ (synopsis "Collection of concurent-safe data structures for Multicore OCaml") (depends (ocaml (>= 4.14)) - (backoff (>= 0.1.0)) + (backoff (>= 0.1.1)) (multicore-magic (>= 2.3.0)) (alcotest (and (>= 1.7.0) :with-test)) (domain_shims (and (>= 0.1.0) :with-test)) @@ -25,7 +25,8 @@ (qcheck (and (>= 0.21.3) :with-test)) (qcheck-alcotest (and (>= 0.21.3) :with-test)) (qcheck-core (and (>= 0.21.3) :with-test)) - (qcheck-stm (and (>= 0.3) :with-test)) + (qcheck-stm (and (>= 0.4) :with-test)) + (qcheck-multicoretests-util (and (>= 0.4) :with-test)) (yojson (and (>= 2.0.2) :with-test)) (sherlodoc (and (>= 0.2) :with-doc)) (odoc (and (>= 2.4.1) :with-doc)))) diff --git a/saturn.opam b/saturn.opam index 0fa88fcb..04e7e293 100644 --- a/saturn.opam +++ b/saturn.opam @@ -10,7 +10,7 @@ bug-reports: "https://github.com/ocaml-multicore/saturn/issues" depends: [ "dune" {>= "3.14"} "ocaml" {>= "4.14"} - "backoff" {>= "0.1.0"} + "backoff" {>= "0.1.1"} "multicore-magic" {>= "2.3.0"} "alcotest" {>= "1.7.0" & with-test} "domain_shims" {>= "0.1.0" & with-test} @@ -21,7 +21,8 @@ depends: [ "qcheck" {>= "0.21.3" & with-test} "qcheck-alcotest" {>= "0.21.3" & with-test} "qcheck-core" {>= "0.21.3" & with-test} - "qcheck-stm" {>= "0.3" & with-test} + "qcheck-stm" {>= "0.4" & with-test} + "qcheck-multicoretests-util" {>= "0.4" & with-test} "yojson" {>= "2.0.2" & with-test} "sherlodoc" {>= "0.2" & with-doc} "odoc" {>= "2.4.1" & with-doc} From db0c7a01be21e550d0c11ed2f3b6b9c0fb675685 Mon Sep 17 00:00:00 2001 From: Carine Morel Date: Wed, 4 Dec 2024 14:41:42 +0100 Subject: [PATCH 2/4] Change deps on OCaml version to avoid ocaml >= 5.0.0 and < 5.2.0 --- dune-project | 2 +- saturn.opam | 2 +- src/saturn.mli | 7 +++++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/dune-project b/dune-project index de728b25..ce1c5c95 100644 --- a/dune-project +++ b/dune-project @@ -13,7 +13,7 @@ (name saturn) (synopsis "Collection of concurent-safe data structures for Multicore OCaml") (depends - (ocaml (>= 4.14)) + (ocaml (or (and (>= 4.14) (< 5.0.0)) (>= 5.2.0))) (backoff (>= 0.1.1)) (multicore-magic (>= 2.3.0)) (alcotest (and (>= 1.7.0) :with-test)) diff --git a/saturn.opam b/saturn.opam index 04e7e293..ce03373b 100644 --- a/saturn.opam +++ b/saturn.opam @@ -9,7 +9,7 @@ doc: "https://ocaml-multicore.github.io/saturn/" bug-reports: "https://github.com/ocaml-multicore/saturn/issues" depends: [ "dune" {>= "3.14"} - "ocaml" {>= "4.14"} + "ocaml" {>= "4.14" & < "5.0.0" | >= "5.2.0"} "backoff" {>= "0.1.1"} "multicore-magic" {>= "2.3.0"} "alcotest" {>= "1.7.0" & with-test} diff --git a/src/saturn.mli b/src/saturn.mli index 55f63002..f084cc04 100644 --- a/src/saturn.mli +++ b/src/saturn.mli @@ -26,7 +26,7 @@ Copyright (c) 2017, Nicolas ASSOUAD ######## *) -(** Lock-free data structures for Multicore OCaml *) +(** Concurrent-safe data structures for Multicore OCaml. *) (** {1 Data structures} *) @@ -41,7 +41,10 @@ module Single_prod_single_cons_queue = Spsc_queue module Single_prod_single_cons_queue_unsafe = Spsc_queue_unsafe module Single_consumer_queue = Mpsc_queue module Skiplist = Skiplist -module Size = Size module Htbl = Htbl module Htbl_unsafe = Htbl_unsafe module Bag = Bag + +(** {1 Tools} *) + +module Size = Size From d51f594cfc374dfa2560a0ca021663e3597fd467 Mon Sep 17 00:00:00 2001 From: Carine Morel Date: Wed, 4 Dec 2024 14:57:32 +0100 Subject: [PATCH 3/4] Remove github action related to ocalm 5.0.0 and 5.1.0 --- .github/workflows/main.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1838869d..f950b626 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,8 +15,6 @@ jobs: fail-fast: false matrix: ocaml-compiler: - - ocaml.5.0.0,ocaml-option-mingw - - ocaml.5.1.1,ocaml-option-mingw - ocaml.5.2.0,ocaml-option-mingw runs-on: windows-latest From 6d52fca7e6083e14390dedcbd5b0b20853a579cb Mon Sep 17 00:00:00 2001 From: Carine Morel Date: Wed, 4 Dec 2024 15:02:53 +0100 Subject: [PATCH 4/4] Info in README about which OCaml version yto install. --- README.md | 8 ++++---- src/saturn.mli | 7 ++----- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 69a9cae8..673e56d1 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ You can learn more about the **motivation** behind `Saturn` through the implemen - [Saturn — Parallelism-Safe Data Structures for Multicore OCaml](#saturn--parallelism-safe-data-structures-for-multicore-ocaml) - [Contents](#contents) - [Installation](#installation) - - [Getting OCaml 5.0](#getting-ocaml-50) + - [Getting OCaml 5.2.0](#getting-ocaml-520) - [Getting Saturn](#getting-saturn) - [Provided data structures](#provided-data-structures) - [Treiber Lock-free Stack](#treiber-lock-free-stack) @@ -50,11 +50,11 @@ You can learn more about the **motivation** behind `Saturn` through the implemen # Installation -## Getting OCaml 5.0 +## Getting OCaml 5.2.0 -You’ll need OCaml 5.0.0 or later. Note that Saturn also works with OCaml 4.14, but only for compatibility reasons, as parallelism-safe data structures are not needed without OCaml 5.0. We also recommend using OCaml 5.2 or later, as some bugs in the `Atomic` module have been fixed. +To use Saturn, you need OCaml 5.2.0 or later. While Saturn is compatible with OCaml 4.14, this is primarily for compatibility purposes, as parallelism-safe data structures are not required without OCaml 5. Note that versions of OCaml 5 prior to 5.2 are not supported due to bugs in the `Atomic` module that affect the functionality of some data structures. -To install OCaml 5.0 yourself, first make sure you have opam 2.1 or later. You +To install OCaml 5.2.0 yourself, first make sure you have opam 2.1 or later. You can run this command to check: ```sh diff --git a/src/saturn.mli b/src/saturn.mli index f084cc04..55f63002 100644 --- a/src/saturn.mli +++ b/src/saturn.mli @@ -26,7 +26,7 @@ Copyright (c) 2017, Nicolas ASSOUAD ######## *) -(** Concurrent-safe data structures for Multicore OCaml. *) +(** Lock-free data structures for Multicore OCaml *) (** {1 Data structures} *) @@ -41,10 +41,7 @@ module Single_prod_single_cons_queue = Spsc_queue module Single_prod_single_cons_queue_unsafe = Spsc_queue_unsafe module Single_consumer_queue = Mpsc_queue module Skiplist = Skiplist +module Size = Size module Htbl = Htbl module Htbl_unsafe = Htbl_unsafe module Bag = Bag - -(** {1 Tools} *) - -module Size = Size