From 5461dcc07a5c3fe9014cd713b5094508976dd26e Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Mon, 12 Jan 2026 20:16:42 -0500 Subject: [PATCH] prepare for 3.17 --- CHANGELOG.md | 11 +++++ containers-data.opam | 2 +- containers.opam | 2 +- dune-project | 78 ++++++++++++++++++++++-------------- src/core/CCAtomic.ml | 2 +- src/pvec/containers_pvec.mli | 2 +- 6 files changed, 63 insertions(+), 34 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ca22b51e..05a24179 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,15 @@ + +## 3.17 + +- feat: add `CCAtomic.update_cas` +- feat: add `Pvec.flat_map` +- faster `List.take_drop` thanks to a trick by nojb + +- move to ocamlformat 0.27, format code +- test: enrich pvec test +- Patch CBor roundtrip property to hold for nan's too (thanks @jmid) + ## 3.16 diff --git a/containers-data.opam b/containers-data.opam index 2bb2c79b..de3c88b9 100644 --- a/containers-data.opam +++ b/containers-data.opam @@ -1,6 +1,6 @@ # This file is generated by dune, edit dune-project instead opam-version: "2.0" -version: "3.15" +version: "3.17" synopsis: "A set of advanced datatypes for containers" maintainer: ["c-cube"] authors: ["c-cube"] diff --git a/containers.opam b/containers.opam index 7d7fbd5c..8c64bca5 100644 --- a/containers.opam +++ b/containers.opam @@ -1,6 +1,6 @@ # This file is generated by dune, edit dune-project instead opam-version: "2.0" -version: "3.15" +version: "3.17" synopsis: "A modular, clean and powerful extension of the OCaml standard library" maintainer: ["c-cube"] diff --git a/dune-project b/dune-project index 042c4916..2f8f5c4e 100644 --- a/dune-project +++ b/dune-project @@ -1,42 +1,60 @@ (lang dune 3.0) + (name containers) + (generate_opam_files true) -(version 3.15) +(version 3.17) + (authors c-cube) + (maintainers c-cube) + (license BSD-2-Clause) + (homepage "https://github.com/c-cube/ocaml-containers/") -(source (github c-cube/ocaml-containers)) + +(source + (github c-cube/ocaml-containers)) (package - (name containers) - (synopsis "A modular, clean and powerful extension of the OCaml standard library") - (tags (stdlib containers iterators list heap queue)) - (depends - (ocaml (>= 4.08)) - either - dune-configurator - (qcheck-core (and (>= 0.18) :with-test)) - (yojson :with-test) - (iter :with-test) - (gen :with-test) - (csexp :with-test) - (uutf :with-test) - (odoc :with-doc)) - (depopts - base-unix - base-threads)) + (name containers) + (synopsis + "A modular, clean and powerful extension of the OCaml standard library") + (tags + (stdlib containers iterators list heap queue)) + (depends + (ocaml + (>= 4.08)) + either + dune-configurator + (qcheck-core + (and + (>= 0.18) + :with-test)) + (yojson :with-test) + (iter :with-test) + (gen :with-test) + (csexp :with-test) + (uutf :with-test) + (odoc :with-doc)) + (depopts base-unix base-threads)) (package - (name containers-data) - (synopsis "A set of advanced datatypes for containers") - (tags (containers RAL function vector okasaki)) - (depends - (ocaml (>= 4.08)) - (containers (= :version)) - (qcheck-core (and (>= 0.18) :with-test)) - (iter :with-test) - (gen :with-test) - (mdx :with-test) - (odoc :with-doc))) + (name containers-data) + (synopsis "A set of advanced datatypes for containers") + (tags + (containers RAL function vector okasaki)) + (depends + (ocaml + (>= 4.08)) + (containers + (= :version)) + (qcheck-core + (and + (>= 0.18) + :with-test)) + (iter :with-test) + (gen :with-test) + (mdx :with-test) + (odoc :with-doc))) diff --git a/src/core/CCAtomic.ml b/src/core/CCAtomic.ml index 48707e3c..05d89921 100644 --- a/src/core/CCAtomic.ml +++ b/src/core/CCAtomic.ml @@ -52,7 +52,7 @@ let[@inline never] decr r = [let res, x = f !atomic in atomic := x; res] done atomically. [f] might be called multiple times and must be as cheap as possible. - @since NEXT_RELEASE *) + @since 3.17 *) let update_cas (type res) (self : 'a t) (f : 'a -> res * 'a) : res = let exception Ret of res in let backoff = ref 1 in diff --git a/src/pvec/containers_pvec.mli b/src/pvec/containers_pvec.mli index 096de0b7..01065439 100644 --- a/src/pvec/containers_pvec.mli +++ b/src/pvec/containers_pvec.mli @@ -87,7 +87,7 @@ val map : ('a -> 'b) -> 'a t -> 'b t val flat_map : ('a -> 'b t) -> 'a t -> 'b t (** A basic, fairly slow [flat_map] operation like {!CCList.flat_map}. It exists for convenience but is not where this data structure shines. - @since NEXT_RELEASE *) + @since 3.17 *) val choose : 'a t -> 'a option (** Return an element. It is unspecified which one is returned. *)