Skip to content

Commit

Permalink
Merge pull request #22 from NathanReb/upgrade-ppxlib-0-18
Browse files Browse the repository at this point in the history
Make ppx_yojson compatible with ppxlib.0.18.0
  • Loading branch information
NathanReb authored Oct 21, 2020
2 parents 6fb3b8c + c44fec5 commit 73741a7
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 4 deletions.
6 changes: 6 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## unreleased

### Added

- Make ppx_yojson fully compatible with 4.11 (#22, @NathanReb)

## 1.0.0

### Additions
Expand Down
2 changes: 1 addition & 1 deletion dune-project
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@
(depends
(ocaml (>= 4.04.2))
(alcotest :with-test)
(ppxlib (and (>= 0.3.0) (< 0.18.0)))
(ppxlib (>= 0.18.0))
(yojson (and :with-test (>= 1.6.0)))))
2 changes: 1 addition & 1 deletion lib/expression.ml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ let rec expand ~loc ~path expr =
| [%expr None] -> [%expr `Null]
| [%expr true] -> [%expr `Bool true]
| [%expr false] -> [%expr `Bool false]
| { pexp_desc = Pexp_constant (Pconst_string (s, None)); _ } ->
| { pexp_desc = Pexp_constant (Pconst_string (s, _, None)); _ } ->
expand_string ~loc s
| { pexp_desc = Pexp_constant (Pconst_integer (s, None)); pexp_loc; _ } ->
expand_int ~loc ~pexp_loc s
Expand Down
2 changes: 1 addition & 1 deletion lib/pattern.ml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ let rec expand ~loc ~path pat =
| [%pat? None] -> [%pat? `Null]
| [%pat? true] -> [%pat? `Bool true]
| [%pat? false] -> [%pat? `Bool false]
| { ppat_desc = Ppat_constant (Pconst_string (s, None)); _ } ->
| { ppat_desc = Ppat_constant (Pconst_string (s, _, None)); _ } ->
expand_string ~loc s
| { ppat_desc = Ppat_constant (Pconst_integer (s, None)); ppat_loc; _ } ->
expand_int ~loc ~ppat_loc s
Expand Down
2 changes: 1 addition & 1 deletion ppx_yojson.opam
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ depends: [
"dune" {>= "2.1"}
"ocaml" {>= "4.04.2"}
"alcotest" {with-test}
"ppxlib" {>= "0.3.0" & < "0.18.0"}
"ppxlib" {>= "0.18.0"}
"yojson" {with-test & >= "1.6.0"}
]
build: [
Expand Down

0 comments on commit 73741a7

Please sign in to comment.