Fix for OCaml 4.11, sent upstream today:
https://github.com/ocaml-ppx/ppx_deriving_yojson/issues/116
This commit is contained in:
parent
a09571f19f
commit
b5cef0a32f
|
@ -0,0 +1,11 @@
|
|||
--- ppx_deriving_yojson-3.5.2.old/src/ppx_deriving_yojson.cppo.ml 2020-02-20 21:01:12.000000000 +0000
|
||||
+++ ppx_deriving_yojson-3.5.new/src/ppx_deriving_yojson.cppo.ml 2020-04-22 18:15:35.242395194 +0100
|
||||
@@ -385,7 +385,7 @@
|
||||
let ty = Typ.poly poly_vars (polymorphize_ser [%type: [%t typ] -> Yojson.Safe.t]) in
|
||||
let default_fun =
|
||||
let type_path = String.concat "." (path @ [type_decl.ptype_name.txt]) in
|
||||
- let e_type_path = Exp.constant (Pconst_string (type_path, None)) in
|
||||
+ let e_type_path = Exp.constant (Pconst_string (type_path, Location.none, None)) in
|
||||
[%expr fun _ ->
|
||||
invalid_arg ("to_yojson: Maybe a [@@deriving yojson] is missing when extending the type "^
|
||||
[%e e_type_path])]
|
|
@ -14,6 +14,9 @@ License: MIT
|
|||
URL: https://github.com/ocaml-ppx/%{upname}
|
||||
Source0: %{url}/archive/v%{version}/%{upname}-%{version}.tar.gz
|
||||
|
||||
# Fix for OCaml 4.11. Sent upstream 2020-04-22.
|
||||
Patch1: ocaml-411.patch
|
||||
|
||||
BuildRequires: ocaml >= 4.04.0
|
||||
BuildRequires: ocaml-biniou-devel
|
||||
BuildRequires: ocaml-cppo
|
||||
|
|
Loading…
Reference in New Issue