Skip to content

Commit 41e5ec9

Browse files
committed
Fix dependency challenges with 4.x
1 parent a1e8a74 commit 41e5ec9

5 files changed

Lines changed: 17 additions & 11 deletions

File tree

.github/workflows/workflow.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ jobs:
6363
- name: Test (${{ matrix.package }})
6464
if: startsWith(matrix.ocaml-compiler, '5')
6565
run: |
66-
opam_files="./ppx_protocol_conv.opam"
66+
dune_packages="${{ matrix.package }}"
6767
if [ "${{ matrix.package }}" != "ppx_protocol_conv" ]; then
68-
opam_files="$opam_files ./${{ matrix.package }}.opam"
68+
dune_packages="ppx_protocol_conv,${{ matrix.package }}"
6969
fi
70-
opam install $opam_files --deps-only --with-test
71-
opam exec -- dune runtest -p ${{ matrix.package }}
70+
opam install ./*.opam --deps-only --with-test
71+
opam exec -- dune runtest -p "$dune_packages"

drivers/json/dune

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
11
(library
22
(name protocol_conv_json)
33
(public_name ppx_protocol_conv_json)
4-
(private_modules test_expect)
4+
(modules (:standard \ test_expect))
55
(libraries ppx_protocol_conv.runtime ppx_protocol_conv.driver yojson)
66
(synopsis "yojson (de)serialization driver for ppx_protocol_conv")
7+
(preprocess (pps ppx_protocol_conv))
8+
)
9+
10+
(library
11+
(name protocol_conv_json_inline_tests)
12+
(modules test_expect)
13+
(libraries ppx_protocol_conv_json ppx_protocol_conv.driver)
714
(preprocess (pps ppx_protocol_conv ppx_expect))
15+
(inline_tests)
816
)

drivers/json/test_expect.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module Default_parameters = Ppx_protocol_driver.Default_parameters
2-
module Make = Json.Make
2+
module Make = Protocol_conv_json.Json.Make
33

44
(** Test parameters. *)
55
module Test = struct
@@ -182,7 +182,7 @@ module Test = struct
182182
end
183183

184184
module Yojson_test = struct
185-
module Json = Json.Yojson
185+
module Json = Protocol_conv_json.Json.Yojson
186186
type 'a v = A of int | B of { int: int; t: 'a } | C [@name "C-D"]
187187
and t = {
188188
int : int [@default 5];

dune-project

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@
3131
(ocaml (>= 4.08))
3232
(ppx_protocol_conv (= :version))
3333
(yojson (>= 1.6.0))
34-
ppx_expect
35-
ppx_inline_test
34+
(ppx_expect :with-test)
3635
(ppx_sexp_conv :with-test)
3736
(sexplib :with-test)
3837
(alcotest :with-test)))

ppx_protocol_conv_json.opam

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ depends: [
1313
"ocaml" {>= "4.08"}
1414
"ppx_protocol_conv" {= version}
1515
"yojson" {>= "1.6.0"}
16-
"ppx_expect"
17-
"ppx_inline_test"
16+
"ppx_expect" {with-test}
1817
"ppx_sexp_conv" {with-test}
1918
"sexplib" {with-test}
2019
"alcotest" {with-test}

0 commit comments

Comments
 (0)