diff --git a/CHANGES.md b/CHANGES.md index e95b5e0..55287dc 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,7 +1,8 @@ # Unreleased -## Bug fixes + * Drop ezjsonm dependency for `gitlab` (#76 @tmcgilchrist) +## Bug fixes * `gitlab.atd`: `description` is nullable (#75 @maiste) # 0.1.6 - 2022-11-08 diff --git a/dune-project b/dune-project index 1443b0d..47a14bc 100644 --- a/dune-project +++ b/dune-project @@ -18,7 +18,6 @@ (cohttp-lwt (>= 4.0)) (atdgen (>= 2.8.0)) (yojson (>= 1.7.0)) - ezjsonm (ISO8601 (>= 0.2.6)) stringext) (synopsis "GitLab APIv4 OCaml library") diff --git a/gitlab-unix.opam b/gitlab-unix.opam index f8c65c7..19be4bc 100644 --- a/gitlab-unix.opam +++ b/gitlab-unix.opam @@ -25,6 +25,7 @@ depends: [ "alcotest" {with-test} "odoc" {with-doc} ] +dev-repo: "git+https://github.com/tmcgilchrist/ocaml-gitlab.git" build: [ ["dune" "subst"] {dev} [ @@ -41,5 +42,5 @@ build: [ ] ["dune" "install" "-p" name "--create-install-files" name] ] -dev-repo: "git+https://github.com/tmcgilchrist/ocaml-gitlab.git" + available: [ arch != "x86_32" & arch != "arm32" & arch != "ppc32" ] diff --git a/gitlab.opam b/gitlab.opam index 5bcd719..d255c61 100644 --- a/gitlab.opam +++ b/gitlab.opam @@ -20,7 +20,6 @@ depends: [ "cohttp-lwt" {>= "4.0"} "atdgen" {>= "2.8.0"} "yojson" {>= "1.7.0"} - "ezjsonm" "ISO8601" {>= "0.2.6"} "stringext" "odoc" {with-doc} diff --git a/lib/dune b/lib/dune index 4f4ef15..d430791 100644 --- a/lib/dune +++ b/lib/dune @@ -21,4 +21,4 @@ (public_name gitlab) (wrapped false) (modules gitlab_s gitlab_core gitlab_j gitlab_t gitlab_json) - (libraries cohttp-lwt ISO8601 ezjsonm uri yojson atdgen str)) + (libraries cohttp-lwt ISO8601 uri yojson atdgen str)) diff --git a/lib/gitlab_json.ml b/lib/gitlab_json.ml index 08d35b5..5f77551 100644 --- a/lib/gitlab_json.ml +++ b/lib/gitlab_json.ml @@ -8,6 +8,8 @@ module Adapter = struct end) end +exception Parse_error of Yojson.Safe.t * string + module Date = struct type t = float @@ -15,7 +17,7 @@ module Date = struct try ISO8601.Permissive.date str with Failure _ -> raise - (Ezjsonm.Parse_error + (Parse_error ( `String str, Format.sprintf "%s: Date.wrap can't parse date format YYYY-MM-DD" str )) @@ -30,7 +32,7 @@ module DateTime = struct try ISO8601.Permissive.datetime str with Failure _ -> raise - (Ezjsonm.Parse_error + (Parse_error ( `String str, Format.sprintf "%s: DateTime.wrap can't parse ISO8601 date" str ))