From accb6b84b247434fdc6b1a51d4fc4abceb423d83 Mon Sep 17 00:00:00 2001 From: Paul-Elliot Date: Thu, 2 Jun 2022 17:24:19 +0200 Subject: [PATCH 1/3] [new release] yojson and yojson-bench (2.0.0) CHANGES: ### Removed - Removed dependency on easy-format and removed `pretty_format` from `Yojson`, `Yojson.Basic`, `Yojson.Safe` and `Yojson.Raw`. (@c-cube, ocaml-community/yojson#90) - Removed dependency on `biniou`, simplifying the chain of dependencies. This changes some APIs: * `Bi_outbuf.t` in signatures is replaced with `Buffer.t` * `to_outbuf` becomes `to_buffer` and `stream_to_outbuf` becomes `stream_to_buffer` (@Leonidas-from-XIV, ocaml-community/yojson#74, and @gasche, ocaml-community/yojson#132) - Removed `yojson-biniou` library - Removed deprecated `json` type aliasing type `t` which has been available since 1.6.0 (@Leonidas-from-XIV, ocaml-community/yojson#100). - Removed `json_max` type (@Leonidas-from-XIV, ocaml-community/yojson#103) - Removed constraint that the "root" value being rendered (via either `pretty_print` or `to_string`) must be an object or array. (@cemerick, ocaml-community/yojson#121) - Removed `validate_json` as it only made sense if the type was called `json`. (@Leonidas-from-XIV, ocaml-community/yojson#137) ### Add - Add an opam package `yojson-bench` to deal with benchmarks dependency (@tmcgilchrist, ocaml-community/yojson#117) - Add a benchmark to judge the respective performance of providing a buffer vs letting Yojson create an internal (ocaml-community/yojson#134, @Leonidas-from-XIV) - Add an optional `suf` keyword argument was added to functions that write serialized JSON, thus allowing NDJSON output. Most functions default to not adding any suffix except for `to_file` (ocaml-community/yojson#124, @panglesd) and functions writing sequences of values where the default is `\n` (ocaml-community/yojson#135, @Leonidas-from-XIV) ### Change - The `stream_from_*` and `stream_to_*` functions now use a `Seq.t` instead of a `Stream.t`, and they are renamed into `seq_from_*` and `seq_to_*` (@gasche, ocaml-community/yojson#131). ### Fix - Avoid copying unnecessarily large amounts of strings when parsing (ocaml-community/yojson#85, ocaml-community/yojson#108, @Leonidas-from-XIV) - Fix `stream_to_file` (ocaml-community/yojson#133, @tcoopman and @gasche) --- packages/yojson-bench/yojson-bench.2.0.0/opam | 34 +++++++++++++++++ packages/yojson/yojson.2.0.0/opam | 38 +++++++++++++++++++ 2 files changed, 72 insertions(+) create mode 100644 packages/yojson-bench/yojson-bench.2.0.0/opam create mode 100644 packages/yojson/yojson.2.0.0/opam diff --git a/packages/yojson-bench/yojson-bench.2.0.0/opam b/packages/yojson-bench/yojson-bench.2.0.0/opam new file mode 100644 index 00000000000..63e2470e385 --- /dev/null +++ b/packages/yojson-bench/yojson-bench.2.0.0/opam @@ -0,0 +1,34 @@ +opam-version: "2.0" +maintainer: ["paul-elliot@tarides.com" "nathan@tarides.com" "marek@tarides.com"] +authors: ["Martin Jambon"] +homepage: "https://github.com/ocaml-community/yojson" +bug-reports: "https://github.com/ocaml-community/yojson/issues" +dev-repo: "git+https://github.com/ocaml-community/yojson.git" +doc: "https://ocaml-community.github.io/yojson/" +license: "BSD-3-Clause" +depends: [ + "ocaml" {>= "4.08"} + "yojson" {= version} + "dune" + "core_bench" {>= "v0.14.0"} + "core" {>= "v0.14.0"} + "core_unix" {>= "v0.14.0"} +] +build: [ + ["dune" "subst"] {pinned} + ["dune" "build" "-p" name "-j" jobs] +] +synopsis: "Run Yojson benchmarks" +description: """\ +Yojson benchmarks require `Core_bench` which is not a dependency of Yojson, +because it is not part of the regular installation/testing flow. This is solely +meant for developers that are worried about performance changes in Yojson.""" +url { + src: + "https://github.com/ocaml-community/yojson/releases/download/2.0.0/yojson-2.0.0.tbz" + checksum: [ + "sha256=ab5d863f7f951a8f7fb4a708399ca2da2cf139a5e0af7818145c20295420cb1a" + "sha512=3ea982dbeef7ec8da54d29124ddb8b86f90583eb96ed3947851cedec9e3d2d47b981e3465d41f2c94943e6865ba6a9a51c6f0252efa6df2386d398b679aae8f2" + ] +} +x-commit-hash: "9c5cee131ae0ec79713e62397076d597486844ed" diff --git a/packages/yojson/yojson.2.0.0/opam b/packages/yojson/yojson.2.0.0/opam new file mode 100644 index 00000000000..b096689a020 --- /dev/null +++ b/packages/yojson/yojson.2.0.0/opam @@ -0,0 +1,38 @@ +opam-version: "2.0" +maintainer: ["nathan@cryptosense.com" "marek@xivilization.net"] +authors: ["Martin Jambon"] +homepage: "https://github.com/ocaml-community/yojson" +bug-reports: "https://github.com/ocaml-community/yojson/issues" +dev-repo: "git+https://github.com/ocaml-community/yojson.git" +doc: "https://ocaml-community.github.io/yojson/" +license: "BSD-3-Clause" +build: [ + ["dune" "subst"] {pinned} + ["dune" "build" "-p" name "-j" jobs] + ["dune" "runtest" "-p" name "-j" jobs] {with-test} + ["dune" "build" "@doc" "-p" name "-j" jobs] {with-doc} +] +depends: [ + "ocaml" {>= "4.02.3"} + "dune" + "cppo" {build} + "alcotest" {with-test & >= "0.8.5"} + "odoc" {with-doc} + "seq" {>= "0.2.2"} +] +synopsis: + "Yojson is an optimized parsing and printing library for the JSON format" +description: """ +Yojson is an optimized parsing and printing library for the JSON format. + +ydump is a pretty-printing command-line program provided with the +yojson package.""" +url { + src: + "https://github.com/ocaml-community/yojson/releases/download/2.0.0/yojson-2.0.0.tbz" + checksum: [ + "sha256=ab5d863f7f951a8f7fb4a708399ca2da2cf139a5e0af7818145c20295420cb1a" + "sha512=3ea982dbeef7ec8da54d29124ddb8b86f90583eb96ed3947851cedec9e3d2d47b981e3465d41f2c94943e6865ba6a9a51c6f0252efa6df2386d398b679aae8f2" + ] +} +x-commit-hash: "9c5cee131ae0ec79713e62397076d597486844ed" From 013f6ae858df3311a2af9926cd338991fe2fe64d Mon Sep 17 00:00:00 2001 From: Marek Kubica Date: Thu, 9 Jun 2022 09:32:38 +0200 Subject: [PATCH 2/3] `pinned` -> `dev` --- packages/yojson-bench/yojson-bench.2.0.0/opam | 2 +- packages/yojson/yojson.2.0.0/opam | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/yojson-bench/yojson-bench.2.0.0/opam b/packages/yojson-bench/yojson-bench.2.0.0/opam index 63e2470e385..1553c3d29d4 100644 --- a/packages/yojson-bench/yojson-bench.2.0.0/opam +++ b/packages/yojson-bench/yojson-bench.2.0.0/opam @@ -15,7 +15,7 @@ depends: [ "core_unix" {>= "v0.14.0"} ] build: [ - ["dune" "subst"] {pinned} + ["dune" "subst"] {dev} ["dune" "build" "-p" name "-j" jobs] ] synopsis: "Run Yojson benchmarks" diff --git a/packages/yojson/yojson.2.0.0/opam b/packages/yojson/yojson.2.0.0/opam index b096689a020..68a4db218ac 100644 --- a/packages/yojson/yojson.2.0.0/opam +++ b/packages/yojson/yojson.2.0.0/opam @@ -7,7 +7,7 @@ dev-repo: "git+https://github.com/ocaml-community/yojson.git" doc: "https://ocaml-community.github.io/yojson/" license: "BSD-3-Clause" build: [ - ["dune" "subst"] {pinned} + ["dune" "subst"] {dev} ["dune" "build" "-p" name "-j" jobs] ["dune" "runtest" "-p" name "-j" jobs] {with-test} ["dune" "build" "@doc" "-p" name "-j" jobs] {with-doc} From 63cbf66956bbd16de6ff7ad951d4f06aa64758d4 Mon Sep 17 00:00:00 2001 From: Marek Kubica Date: Thu, 9 Jun 2022 13:12:14 +0200 Subject: [PATCH 3/3] Maximum constraint on merlin and calculon --- packages/calculon/calculon.0.5/opam | 2 +- packages/merlin/merlin.4.5-414/opam | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/calculon/calculon.0.5/opam b/packages/calculon/calculon.0.5/opam index 1e05951b9f6..b3f143ace27 100644 --- a/packages/calculon/calculon.0.5/opam +++ b/packages/calculon/calculon.0.5/opam @@ -16,7 +16,7 @@ depends: [ "irc-client" { >= "0.6.0" & < "0.7.0" } "irc-client-lwt" "irc-client-lwt-ssl" - "yojson" {>= "1.4.1"} + "yojson" {>= "1.4.1" & < "2.0.0"} "containers" { >= "1.2" & < "3.0" } "ISO8601" "stringext" diff --git a/packages/merlin/merlin.4.5-414/opam b/packages/merlin/merlin.4.5-414/opam index bef6f2d72d4..2c9a345eb3c 100644 --- a/packages/merlin/merlin.4.5-414/opam +++ b/packages/merlin/merlin.4.5-414/opam @@ -14,7 +14,7 @@ depends: [ "ocaml" {>= "4.14" & < "4.15"} "dune" {>= "2.9.0"} "dot-merlin-reader" {>= "4.2"} - "yojson" {>= "1.6.0"} + "yojson" {>= "1.6.0" & < "2.0.0"} "conf-jq" {with-test} "csexp" {>= "1.5.1"} "menhir" {dev}