From 249dc3596e7ab5d03c0cc86b67840af2d477f181 Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Wed, 6 Jul 2022 16:45:25 -0400 Subject: [PATCH] prepare for 3.9 --- CHANGELOG.md | 12 ++++++++++++ containers-data.opam | 5 +++-- containers-thread.opam | 5 +++-- containers.opam | 5 +++-- src/cbor/containers_cbor.mli | 2 +- src/cbor/tests/dune | 1 + src/core/CCEqualLabels.mli | 4 ++-- src/core/CCInt32.mli | 2 +- src/core/CCInt64.mli | 2 +- src/data/CCBV.mli | 8 ++++---- 10 files changed, 31 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 27d8a5194..acb09eaa3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## 3.9 + +- feat: add `Containers_cbor` module +- feat(CCInt32): add popcount function +- feat(CCInt64): add `popcount` operation +- CCBV: + * more extensive test suite + * use `bytes` underneath, not an array of integers +- add `containers_testlib`, removing qtest and ounit. + +- fix: handle uppercase in string/hex + ## 3.8 - add `Containers_bencode` for lightweight (de)ser diff --git a/containers-data.opam b/containers-data.opam index bc3be0374..383becbaf 100644 --- a/containers-data.opam +++ b/containers-data.opam @@ -1,5 +1,5 @@ opam-version: "2.0" -version: "3.8" +version: "3.9" author: "Simon Cruanes" maintainer: "simon.cruanes.2007@m4x.org" synopsis: "A set of advanced datatypes for containers" @@ -14,7 +14,8 @@ depends: [ "dune" { >= "2.0" } "containers" { = version } "seq" - "qcheck-core" { with-test } + (("ocaml" {with-test & < "4.08"} & "qcheck-core" {>= "0.17" & with-test}) + | ("ocaml" {with-test & >= "4.08"} & "qcheck-core" {>= "0.18" & with-test})) "iter" { with-test } "gen" { with-test } #"mdx" { with-test & >= "1.5.0" & < "2.0.0" } diff --git a/containers-thread.opam b/containers-thread.opam index 56acb9730..a5cbc373a 100644 --- a/containers-thread.opam +++ b/containers-thread.opam @@ -1,5 +1,5 @@ opam-version: "2.0" -version: "3.8" +version: "3.9" author: "Simon Cruanes" maintainer: "simon.cruanes.2007@m4x.org" license: "BSD-2-Clause" @@ -16,7 +16,8 @@ depends: [ "dune-configurator" "containers" { = version } "iter" { with-test } - "qcheck-core" { with-test } + (("ocaml" {with-test & < "4.08"} & "qcheck-core" {>= "0.17" & with-test}) + | ("ocaml" {with-test & >= "4.08"} & "qcheck-core" {>= "0.18" & with-test})) "uutf" { with-test } "odoc" { with-doc } ] diff --git a/containers.opam b/containers.opam index e37930dec..2a436a480 100644 --- a/containers.opam +++ b/containers.opam @@ -1,6 +1,6 @@ opam-version: "2.0" name: "containers" -version: "3.8" +version: "3.9" author: "Simon Cruanes" maintainer: "simon.cruanes.2007@m4x.org" license: "BSD-2-Clause" @@ -16,7 +16,8 @@ depends: [ "dune-configurator" "seq" # compat "either" # compat - "qcheck-core" { >= "0.14" & with-test } + (("ocaml" {with-test & < "4.08"} & "qcheck-core" {>= "0.17" & with-test}) + | ("ocaml" {with-test & >= "4.08"} & "qcheck-core" {>= "0.18" & with-test})) "yojson" { with-test } "iter" { with-test } "gen" { with-test } diff --git a/src/cbor/containers_cbor.mli b/src/cbor/containers_cbor.mli index dca02fe61..fe3537f74 100644 --- a/src/cbor/containers_cbor.mli +++ b/src/cbor/containers_cbor.mli @@ -8,7 +8,7 @@ {b note} this is only available on OCaml >= 4.08. Below that, the module is empty. - @since NEXT_RELEASE + @since 3.9 *) type t = diff --git a/src/cbor/tests/dune b/src/cbor/tests/dune index a596ddc26..e235aab1a 100644 --- a/src/cbor/tests/dune +++ b/src/cbor/tests/dune @@ -9,5 +9,6 @@ (rule (alias runtest) (deps t_appendix_a.exe appendix_a.json) + (package containers) (action (run ./t_appendix_a.exe ./appendix_a.json))) diff --git a/src/core/CCEqualLabels.mli b/src/core/CCEqualLabels.mli index 032af33aa..74d604caa 100644 --- a/src/core/CCEqualLabels.mli +++ b/src/core/CCEqualLabels.mli @@ -35,13 +35,13 @@ val map : f:('a -> 'b) -> 'b t -> 'a t val always_eq : _ t (** Always returns true. All values are equal. - @since NEXT_RELEASE *) + @since 3.9 *) val never_eq : _ t (** Always returns false. No values are, so this is not even reflexive (i.e. [x=x] is false). Be careful! - @since NEXT_RELEASE *) + @since 3.9 *) module Infix : sig val ( >|= ) : 'b t -> ('a -> 'b) -> 'a t diff --git a/src/core/CCInt32.mli b/src/core/CCInt32.mli index 8086d18f1..c3c8403fa 100644 --- a/src/core/CCInt32.mli +++ b/src/core/CCInt32.mli @@ -43,7 +43,7 @@ val pow : t -> t -> t val popcount : t -> int (** Number of bits set to 1. - @since NEXT_RELEASE *) + @since 3.9 *) val floor_div : t -> t -> t (** [floor_div x n] is integer division rounding towards negative infinity. diff --git a/src/core/CCInt64.mli b/src/core/CCInt64.mli index eee5b711d..56dbecaea 100644 --- a/src/core/CCInt64.mli +++ b/src/core/CCInt64.mli @@ -32,7 +32,7 @@ val hash : t -> int val popcount : t -> int (** Number of bits set to 1. - @since NEXT_RELEASE *) + @since 3.9 *) val sign : t -> int (** [sign x] return [0] if [x = 0], [-1] if [x < 0] and [1] if [x > 0]. diff --git a/src/data/CCBV.mli b/src/data/CCBV.mli index af726dd81..b432a0e07 100644 --- a/src/data/CCBV.mli +++ b/src/data/CCBV.mli @@ -26,7 +26,7 @@ val create : size:int -> bool -> t val init : int -> (int -> bool) -> t (** [init len f] initializes a bitvector of length [len], where bit [i] is true iff [f i] is. - @since NEXT_RELEASE *) + @since 3.9 *) val copy : t -> t (** Copy of bitvector. *) @@ -55,7 +55,7 @@ val resize_minimize_memory : t -> int -> unit (** Same as {!resize}, but this can also shrink the underlying array if this reduces the size. @raise Invalid_argument on negative sizes. - @since NEXT_RELEASE *) + @since 3.9 *) val is_empty : t -> bool (** Are there any true bits? *) @@ -71,7 +71,7 @@ val reset : t -> int -> unit val set_bool : t -> int -> bool -> unit (** Set or reset [i]-th bit. - @since NEXT_RELEASE *) + @since 3.9 *) val flip : t -> int -> unit (** Flip i-th bit, extending the bitvector if needed. *) @@ -81,7 +81,7 @@ val clear : t -> unit val clear_and_shrink : t -> unit (** Set every bit to 0, and set length to 0. - @since NEXT_RELEASE *) + @since 3.9 *) val iter : t -> (int -> bool -> unit) -> unit (** Iterate on all bits. *)