diff --git a/CHANGELOG.md b/CHANGELOG.md index 536d634..fc39251 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +3.6.1 +----- + + * Update to ppxlib >= 0.14.0 + (#127) + Kate Deplaix + 3.6.0 ----- @@ -6,7 +13,7 @@ Rudi Grinberg, Thierry Martinez, Kate Deplaix and Gabriel Scherer * Fix issues when the equality operator `(=)` is shadowed - (#126, #128, fixes #79) + (#126, #128, #131, fixes #79) Martin Slota, Kate Deplaix 3.5.3 diff --git a/ppx_deriving_yojson.opam b/ppx_deriving_yojson.opam index 4e63d7b..1547af6 100644 --- a/ppx_deriving_yojson.opam +++ b/ppx_deriving_yojson.opam @@ -16,8 +16,8 @@ depends: [ "dune" {>= "1.0"} "yojson" {>= "1.6.0" & < "2.0.0"} "result" - "ppx_deriving" {>= "5.0"} - "ppxlib" {>= "0.9.0" & < "0.14.0"} + "ppx_deriving" {>= "5.1"} + "ppxlib" {>= "0.14.0"} "ounit" {with-test & >= "2.0.0"} ] synopsis: diff --git a/src/ppx_deriving_yojson.ml b/src/ppx_deriving_yojson.ml index abae6a0..1a611c9 100644 --- a/src/ppx_deriving_yojson.ml +++ b/src/ppx_deriving_yojson.ml @@ -23,7 +23,7 @@ let disable_warning_39 () = Ast_helper.Attr.mk ~loc name (PStr [%str "-39"]) -let mod_mknoloc x = mknoloc x +let mod_mknoloc x = mknoloc (Some x) let deriver = "yojson" let raise_errorf = Ppx_deriving.raise_errorf @@ -369,7 +369,7 @@ let ser_str_of_type ~options ~path ({ ptype_loc = loc } as type_decl) = 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 = Ast_builder.Default.estring ~loc:Location.none type_path in [%expr fun _ -> invalid_arg ("to_yojson: Maybe a [@@deriving yojson] is missing when extending the type "^ [%e e_type_path])]