Skip to content

Commit ae75485

Browse files
authored
Use ppxlib.0.36 in tests (#2043)
* constraints * update ppx_deriving_json * update ppx_js * bump constraint on ppxlib * fix * opam lint
1 parent 0ea2d6f commit ae75485

15 files changed

+216
-245
lines changed

.github/workflows/build-wasm_of_ocaml.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ jobs:
106106
run: |
107107
opam repo add js janestreet/opam-repository
108108
opam install opam-format
109+
opam pin add ppxlib -n 0.35.0
109110
opam exec -- dune exec --root wasm_of_ocaml tools/ci_setup.exe
110111
111112
- name: Pin Jane Street packages

dune-project

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
(ocaml (and (>= 4.13) (< 5.4)))
2222
(num :with-test)
2323
(ppx_expect (and (>= v0.16.1) :with-test))
24-
(ppxlib (>= 0.15))
24+
(ppxlib (>= 0.35))
2525
(re :with-test)
2626
(cmdliner (>= 1.1.0))
2727
(sedlex (>= 3.3))
@@ -49,7 +49,6 @@
4949
(lwt (>= 2.4.4))
5050
(num :with-test)
5151
(ppx_expect (and (>= v0.14.2) :with-test))
52-
(ppxlib (and (>= 0.22.0) :with-test))
5352
(re (and (>= 1.9.0) :with-test)))
5453
(depopts
5554
graphics
@@ -64,7 +63,7 @@
6463
(depends
6564
(ocaml (>= 4.13))
6665
(js_of_ocaml (= :version))
67-
(ppxlib (>= 0.15))
66+
(ppxlib (>= 0.35))
6867
(num :with-test)
6968
(ppx_expect (and (>= v0.14.2) :with-test))
7069
(re (and (>= 1.9.0) :with-test))
@@ -78,8 +77,7 @@
7877
(depends
7978
(ocaml (>= 4.13))
8079
(js_of_ocaml (= :version))
81-
(ppxlib (>= 0.15))
82-
(ppxlib (and (< 0.36) :with-test))
80+
(ppxlib (>= 0.35))
8381
(num :with-test)
8482
(ppx_expect (and (>= v0.14.2) :with-test))
8583
(re (and (>= 1.9.0) :with-test))
@@ -98,7 +96,7 @@
9896
(graphics :with-test)
9997
(num :with-test)
10098
(ppx_expect (and (>= v0.14.2) :with-test))
101-
(ppxlib (>= 0.15))
99+
(ppxlib (>= 0.35))
102100
(re (and (>= 1.9.0) :with-test))
103101
))
104102

@@ -116,7 +114,6 @@
116114
(tyxml (>= 4.6))
117115
(num :with-test)
118116
(ppx_expect (and (>= v0.14.2) :with-test))
119-
(ppxlib (and (>= 0.22.0) :with-test))
120117
(re (and (>= 1.9.0) :with-test))
121118
))
122119

@@ -128,9 +125,9 @@
128125
(depends
129126
(ocaml (>= 4.13))
130127
(js_of_ocaml-compiler (= :version))
131-
(ppxlib (>= 0.15))
132128
(num :with-test)
133129
(ppx_expect (and (>= v0.14.2) :with-test))
130+
(ppxlib (>= 0.35))
134131
(re (and (>= 1.9.0) :with-test))
135132
))
136133

@@ -144,7 +141,7 @@
144141
(js_of_ocaml (= :version))
145142
(num :with-test)
146143
(ppx_expect (and (>= v0.14.2) :with-test))
147-
(ppxlib (>= 0.15))
144+
(ppxlib (>= 0.35))
148145
(re :with-test)
149146
(cmdliner (>= 1.1.0))
150147
(opam-format :with-test)

js_of_ocaml-compiler.opam

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ depends: [
1616
"ocaml" {>= "4.13" & < "5.4"}
1717
"num" {with-test}
1818
"ppx_expect" {>= "v0.16.1" & with-test}
19-
"ppxlib" {>= "0.15"}
19+
"ppxlib" {>= "0.35"}
2020
"re" {with-test}
2121
"cmdliner" {>= "1.1.0"}
2222
"sedlex" {>= "3.3"}

js_of_ocaml-lwt.opam

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ depends: [
1919
"lwt" {>= "2.4.4"}
2020
"num" {with-test}
2121
"ppx_expect" {>= "v0.14.2" & with-test}
22-
"ppxlib" {>= "0.22.0" & with-test}
2322
"re" {>= "1.9.0" & with-test}
2423
"odoc" {with-doc}
2524
]

js_of_ocaml-ppx.opam

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ depends: [
1515
"dune" {>= "3.19"}
1616
"ocaml" {>= "4.13"}
1717
"js_of_ocaml" {= version}
18-
"ppxlib" {>= "0.15"}
19-
"ppxlib" {< "0.36" & with-test}
18+
"ppxlib" {>= "0.35"}
2019
"num" {with-test}
2120
"ppx_expect" {>= "v0.14.2" & with-test}
2221
"re" {>= "1.9.0" & with-test}

js_of_ocaml-ppx_deriving_json.opam

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ depends: [
1515
"dune" {>= "3.19"}
1616
"ocaml" {>= "4.13"}
1717
"js_of_ocaml" {= version}
18-
"ppxlib" {>= "0.15"}
18+
"ppxlib" {>= "0.35"}
1919
"num" {with-test}
2020
"ppx_expect" {>= "v0.14.2" & with-test}
2121
"re" {>= "1.9.0" & with-test}

js_of_ocaml-toplevel.opam

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ depends: [
1919
"graphics" {with-test}
2020
"num" {with-test}
2121
"ppx_expect" {>= "v0.14.2" & with-test}
22-
"ppxlib" {>= "0.15"}
22+
"ppxlib" {>= "0.35"}
2323
"re" {>= "1.9.0" & with-test}
2424
"odoc" {with-doc}
2525
]

js_of_ocaml-tyxml.opam

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ depends: [
2121
"tyxml" {>= "4.6"}
2222
"num" {with-test}
2323
"ppx_expect" {>= "v0.14.2" & with-test}
24-
"ppxlib" {>= "0.22.0" & with-test}
2524
"re" {>= "1.9.0" & with-test}
2625
"odoc" {with-doc}
2726
]

js_of_ocaml.opam

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ depends: [
1515
"dune" {>= "3.19"}
1616
"ocaml" {>= "4.13"}
1717
"js_of_ocaml-compiler" {= version}
18-
"ppxlib" {>= "0.15"}
1918
"num" {with-test}
2019
"ppx_expect" {>= "v0.14.2" & with-test}
20+
"ppxlib" {>= "0.35"}
2121
"re" {>= "1.9.0" & with-test}
2222
"odoc" {with-doc}
2323
]

ppx/ppx_deriving_json/lib/ppx_deriving_json.ml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,12 @@ let poly_fun_of_type_decl type_decl expr =
174174
fold_right_type_decl
175175
(fun name expr ->
176176
let name = name.txt in
177-
Exp.fun_ nolabel None (pvar ("poly_" ^ name)) expr)
177+
Ppxlib.Ast_builder.Default.pexp_fun
178+
~loc:Location.none
179+
nolabel
180+
None
181+
(pvar ("poly_" ^ name))
182+
expr)
178183
type_decl
179184
expr
180185

0 commit comments

Comments
 (0)