From c96e766fd3c215f2231aa7b431cf859da288d327 Mon Sep 17 00:00:00 2001 From: Dave Aitken Date: Thu, 3 Aug 2023 14:46:34 +0100 Subject: [PATCH 1/9] feat: decoders-mel, melange backend --- ..._bs_json_test.ml => decoders_json_test.ml} | 2 +- ...rs_bs_xml_test.ml => decoders_xml_test.ml} | 4 +-- __tests__/dune | 11 ++++++ bsconfig.json | 5 ++- decoders-bencode.opam | 2 +- decoders-cbor.opam | 2 +- decoders-ezjsonm.opam | 2 +- decoders-ezxmlm.opam | 2 +- decoders-jsonaf.opam | 2 +- decoders-jsonm.opam | 2 +- decoders-mel.opam | 34 +++++++++++++++++++ decoders-msgpck.opam | 2 +- decoders-sexplib.opam | 2 +- decoders-yojson.opam | 2 +- decoders.opam | 2 +- dune | 2 +- dune-project | 17 +++++++++- src-bs/bs_json.ml => src-js/Js_json.ml | 0 src-bs/bs_json.mli => src-js/Js_json.mli | 0 src-bs/bs_xml.ml => src-js/Js_xml.ml | 0 src-bs/bs_xml.mli => src-js/Js_xml.mli | 0 src-js/dune | 6 ++++ {src-bs => src-js}/shims_let_ops_.ml | 0 {src-bs => src-js}/util.ml | 0 {src-bs => src-js}/util.mli | 0 src/dune | 3 +- 26 files changed, 85 insertions(+), 19 deletions(-) rename __tests__/{decoders_bs_json_test.ml => decoders_json_test.ml} (99%) rename __tests__/{decoders_bs_xml_test.ml => decoders_xml_test.ml} (98%) create mode 100644 __tests__/dune create mode 100644 decoders-mel.opam rename src-bs/bs_json.ml => src-js/Js_json.ml (100%) rename src-bs/bs_json.mli => src-js/Js_json.mli (100%) rename src-bs/bs_xml.ml => src-js/Js_xml.ml (100%) rename src-bs/bs_xml.mli => src-js/Js_xml.mli (100%) create mode 100644 src-js/dune rename {src-bs => src-js}/shims_let_ops_.ml (100%) rename {src-bs => src-js}/util.ml (100%) rename {src-bs => src-js}/util.mli (100%) diff --git a/__tests__/decoders_bs_json_test.ml b/__tests__/decoders_json_test.ml similarity index 99% rename from __tests__/decoders_bs_json_test.ml rename to __tests__/decoders_json_test.ml index bfae460..e4a51d4 100644 --- a/__tests__/decoders_bs_json_test.ml +++ b/__tests__/decoders_json_test.ml @@ -1,5 +1,5 @@ open Jest -open Bs_json +open Js_json external parse_int : string -> int = "parseInt" [@@bs.scope "window"] [@@bs.val] diff --git a/__tests__/decoders_bs_xml_test.ml b/__tests__/decoders_xml_test.ml similarity index 98% rename from __tests__/decoders_bs_xml_test.ml rename to __tests__/decoders_xml_test.ml index d6610ef..be16ea5 100644 --- a/__tests__/decoders_bs_xml_test.ml +++ b/__tests__/decoders_xml_test.ml @@ -1,5 +1,5 @@ open Jest -open Bs_xml +open Js_xml let () = describe @@ -257,7 +257,7 @@ let () = test "tree" (fun () -> let encoded = encode_string root xml_tree in let expected = - Js.String.splitByRe [%re "/\\n/"] xml_str + Js.String.splitByRe (Js.Re.fromString "\\n") xml_str |> Array.to_list |> Decoders.Util.My_list.filter_map (function | None -> diff --git a/__tests__/dune b/__tests__/dune new file mode 100644 index 0000000..9d25be9 --- /dev/null +++ b/__tests__/dune @@ -0,0 +1,11 @@ +(melange.emit + (target decoders_json_test) + (modules decoders_json_test) + (compile_flags :standard -open Decoders_mel) + (libraries decoders_mel melange-jest.jest)) + +(melange.emit + (target decoders_xml_test) + (modules decoders_xml_test) + (compile_flags :standard -open Decoders_mel) + (libraries decoders_mel melange-jest.jest)) diff --git a/bsconfig.json b/bsconfig.json index 742c0c8..2729627 100644 --- a/bsconfig.json +++ b/bsconfig.json @@ -18,14 +18,13 @@ "xml.ml" ] }, { - "dir" : "src-bs" + "dir" : "src-js" }, { "dir": "__tests__", "type": "dev" }], "package-specs": { - "module": "commonjs", - "in-source": true + "module": "commonjs" }, "suffix": ".bs.js", "bs-dependencies": [ diff --git a/decoders-bencode.opam b/decoders-bencode.opam index bfc0e21..1865743 100644 --- a/decoders-bencode.opam +++ b/decoders-bencode.opam @@ -10,7 +10,7 @@ homepage: "https://github.com/mattjbray/ocaml-decoders" doc: "https://mattjbray.github.io/ocaml-decoders/" bug-reports: "https://github.com/mattjbray/ocaml-decoders/issues" depends: [ - "dune" {>= "3.1"} + "dune" {>= "3.8"} "ocaml" {>= "4.03.0"} "decoders" {= version} "bencode" {>= "2.0"} diff --git a/decoders-cbor.opam b/decoders-cbor.opam index 50535eb..8d5779a 100644 --- a/decoders-cbor.opam +++ b/decoders-cbor.opam @@ -10,7 +10,7 @@ homepage: "https://github.com/mattjbray/ocaml-decoders" doc: "https://mattjbray.github.io/ocaml-decoders/" bug-reports: "https://github.com/mattjbray/ocaml-decoders/issues" depends: [ - "dune" {>= "3.1"} + "dune" {>= "3.8"} "ocaml" {>= "4.03.0"} "decoders" {= version} "cbor" diff --git a/decoders-ezjsonm.opam b/decoders-ezjsonm.opam index d0e0485..840720c 100644 --- a/decoders-ezjsonm.opam +++ b/decoders-ezjsonm.opam @@ -10,7 +10,7 @@ homepage: "https://github.com/mattjbray/ocaml-decoders" doc: "https://mattjbray.github.io/ocaml-decoders/" bug-reports: "https://github.com/mattjbray/ocaml-decoders/issues" depends: [ - "dune" {>= "3.1"} + "dune" {>= "3.8"} "ocaml" {>= "4.03.0"} "decoders" {= version} "ezjsonm" {>= "0.4.0"} diff --git a/decoders-ezxmlm.opam b/decoders-ezxmlm.opam index c5073d8..640fefa 100644 --- a/decoders-ezxmlm.opam +++ b/decoders-ezxmlm.opam @@ -10,7 +10,7 @@ homepage: "https://github.com/mattjbray/ocaml-decoders" doc: "https://mattjbray.github.io/ocaml-decoders/" bug-reports: "https://github.com/mattjbray/ocaml-decoders/issues" depends: [ - "dune" {>= "3.1"} + "dune" {>= "3.8"} "ocaml" {>= "4.03.0"} "decoders" {= version} "ezxmlm" {>= "1.1.0"} diff --git a/decoders-jsonaf.opam b/decoders-jsonaf.opam index 4a88fbb..af0253e 100644 --- a/decoders-jsonaf.opam +++ b/decoders-jsonaf.opam @@ -12,7 +12,7 @@ homepage: "https://github.com/mattjbray/ocaml-decoders" doc: "https://mattjbray.github.io/ocaml-decoders/" bug-reports: "https://github.com/mattjbray/ocaml-decoders/issues" depends: [ - "dune" {>= "3.1"} + "dune" {>= "3.8"} "ocaml" {>= "4.10.0"} "decoders" {= version} "jsonaf" {>= "0.15.0"} diff --git a/decoders-jsonm.opam b/decoders-jsonm.opam index 7b398f8..ef57e19 100644 --- a/decoders-jsonm.opam +++ b/decoders-jsonm.opam @@ -10,7 +10,7 @@ homepage: "https://github.com/mattjbray/ocaml-decoders" doc: "https://mattjbray.github.io/ocaml-decoders/" bug-reports: "https://github.com/mattjbray/ocaml-decoders/issues" depends: [ - "dune" {>= "3.1"} + "dune" {>= "3.8"} "ocaml" {>= "4.03.0"} "decoders" {= version} "jsonm" diff --git a/decoders-mel.opam b/decoders-mel.opam new file mode 100644 index 0000000..5162cff --- /dev/null +++ b/decoders-mel.opam @@ -0,0 +1,34 @@ +# This file is generated by dune, edit dune-project instead +opam-version: "2.0" +synopsis: "Melange backend for decoders" +description: + "A combinator library for \"decoding\" JSON-like values into your own Ocaml types, inspired by Elm's `Json.Decode` and `Json.Encode`." +maintainer: ["Matt Bray "] +authors: ["Matt Bray "] +license: "ISC" +homepage: "https://github.com/mattjbray/ocaml-decoders" +doc: "https://mattjbray.github.io/ocaml-decoders/" +bug-reports: "https://github.com/mattjbray/ocaml-decoders/issues" +depends: [ + "dune" {>= "3.8"} + "ocaml" {>= "4.03.0"} + "decoders" {= version} + "odoc" {with-doc} + "containers" {with-test & >= "0.16"} + "melange-jest" {with-test} +] +build: [ + ["dune" "subst"] {dev} + [ + "dune" + "build" + "-p" + name + "-j" + jobs + "@install" + "@runtest" {with-test} + "@doc" {with-doc} + ] +] +dev-repo: "git+https://github.com/mattjbray/ocaml-decoders.git" diff --git a/decoders-msgpck.opam b/decoders-msgpck.opam index 6ac7f13..e6e503c 100644 --- a/decoders-msgpck.opam +++ b/decoders-msgpck.opam @@ -12,7 +12,7 @@ homepage: "https://github.com/mattjbray/ocaml-decoders" doc: "https://mattjbray.github.io/ocaml-decoders/" bug-reports: "https://github.com/mattjbray/ocaml-decoders/issues" depends: [ - "dune" {>= "3.1"} + "dune" {>= "3.8"} "ocaml" {>= "4.03.0"} "decoders" {= version} "msgpck" {>= "1.3"} diff --git a/decoders-sexplib.opam b/decoders-sexplib.opam index d1487c5..f862b9b 100644 --- a/decoders-sexplib.opam +++ b/decoders-sexplib.opam @@ -10,7 +10,7 @@ homepage: "https://github.com/mattjbray/ocaml-decoders" doc: "https://mattjbray.github.io/ocaml-decoders/" bug-reports: "https://github.com/mattjbray/ocaml-decoders/issues" depends: [ - "dune" {>= "3.1"} + "dune" {>= "3.8"} "ocaml" {>= "4.03.0"} "decoders" {= version} "sexplib0" diff --git a/decoders-yojson.opam b/decoders-yojson.opam index 44c5f3f..d7cc6f6 100644 --- a/decoders-yojson.opam +++ b/decoders-yojson.opam @@ -10,7 +10,7 @@ homepage: "https://github.com/mattjbray/ocaml-decoders" doc: "https://mattjbray.github.io/ocaml-decoders/" bug-reports: "https://github.com/mattjbray/ocaml-decoders/issues" depends: [ - "dune" {>= "3.1"} + "dune" {>= "3.8"} "ocaml" {>= "4.03.0"} "decoders" {= version} "yojson" {>= "1.6.0"} diff --git a/decoders.opam b/decoders.opam index c5ade6f..4fa8848 100644 --- a/decoders.opam +++ b/decoders.opam @@ -10,7 +10,7 @@ homepage: "https://github.com/mattjbray/ocaml-decoders" doc: "https://mattjbray.github.io/ocaml-decoders/" bug-reports: "https://github.com/mattjbray/ocaml-decoders/issues" depends: [ - "dune" {>= "3.1"} + "dune" {>= "3.8"} "ocaml" {>= "4.03.0"} "odoc" {with-doc} "containers" {with-test & >= "0.16"} diff --git a/dune b/dune index 8765da5..9b11947 100644 --- a/dune +++ b/dune @@ -1 +1 @@ -(dirs :standard \ node_modules) +(dirs :standard __tests__ \ node_modules) diff --git a/dune-project b/dune-project index 1ff060a..c49d5ef 100644 --- a/dune-project +++ b/dune-project @@ -1,4 +1,7 @@ -(lang dune 3.1) +(lang dune 3.8) + +(using melange 0.1) + (name decoders) (generate_opam_files true) (license ISC) @@ -127,6 +130,18 @@ (containers (and :with-test (>= 0.16))) (ounit2 :with-test))) +(package + (name decoders-mel) + (synopsis "Melange backend for decoders") + (description + "A combinator library for \"decoding\" JSON-like values into your own Ocaml types, inspired by Elm's `Json.Decode` and `Json.Encode`.") + (depends + (ocaml (>= 4.03.0)) + (decoders (= :version)) + (odoc :with-doc) + (containers (and :with-test (>= 0.16))) + (melange-jest :with-test))) + (package (name decoders) (synopsis "Elm-inspired decoders for Ocaml") diff --git a/src-bs/bs_json.ml b/src-js/Js_json.ml similarity index 100% rename from src-bs/bs_json.ml rename to src-js/Js_json.ml diff --git a/src-bs/bs_json.mli b/src-js/Js_json.mli similarity index 100% rename from src-bs/bs_json.mli rename to src-js/Js_json.mli diff --git a/src-bs/bs_xml.ml b/src-js/Js_xml.ml similarity index 100% rename from src-bs/bs_xml.ml rename to src-js/Js_xml.ml diff --git a/src-bs/bs_xml.mli b/src-js/Js_xml.mli similarity index 100% rename from src-bs/bs_xml.mli rename to src-js/Js_xml.mli diff --git a/src-js/dune b/src-js/dune new file mode 100644 index 0000000..4916fe0 --- /dev/null +++ b/src-js/dune @@ -0,0 +1,6 @@ +(library + (name decoders_mel) + (flags :standard -warn-error -a+8) + (public_name decoders-mel) + (modes melange) + (libraries decoders)) diff --git a/src-bs/shims_let_ops_.ml b/src-js/shims_let_ops_.ml similarity index 100% rename from src-bs/shims_let_ops_.ml rename to src-js/shims_let_ops_.ml diff --git a/src-bs/util.ml b/src-js/util.ml similarity index 100% rename from src-bs/util.ml rename to src-js/util.ml diff --git a/src-bs/util.mli b/src-js/util.mli similarity index 100% rename from src-bs/util.mli rename to src-js/util.mli diff --git a/src/dune b/src/dune index e60d8a2..94312a0 100644 --- a/src/dune +++ b/src/dune @@ -1,7 +1,8 @@ (library (name decoders) (flags :standard -warn-error -a+8) - (public_name decoders)) + (public_name decoders) + (modes native byte melange)) (rule (targets shims_let_ops_.ml) From 8571c424d761567320e70064864f295d30f3413a Mon Sep 17 00:00:00 2001 From: Dave Aitken Date: Sun, 20 Aug 2023 17:43:58 +0100 Subject: [PATCH 2/9] rename: melange-decoders --- dune-project | 2 +- decoders-mel.opam => melange-decoders.opam | 0 src-js/dune | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) rename decoders-mel.opam => melange-decoders.opam (100%) diff --git a/dune-project b/dune-project index c49d5ef..25a5add 100644 --- a/dune-project +++ b/dune-project @@ -131,7 +131,7 @@ (ounit2 :with-test))) (package - (name decoders-mel) + (name melange-decoders) (synopsis "Melange backend for decoders") (description "A combinator library for \"decoding\" JSON-like values into your own Ocaml types, inspired by Elm's `Json.Decode` and `Json.Encode`.") diff --git a/decoders-mel.opam b/melange-decoders.opam similarity index 100% rename from decoders-mel.opam rename to melange-decoders.opam diff --git a/src-js/dune b/src-js/dune index 4916fe0..2434856 100644 --- a/src-js/dune +++ b/src-js/dune @@ -1,6 +1,6 @@ (library (name decoders_mel) (flags :standard -warn-error -a+8) - (public_name decoders-mel) + (public_name melange-decoders) (modes melange) (libraries decoders)) From 4d84137d8c80ada47bc627ff815e1724ac3ca246 Mon Sep 17 00:00:00 2001 From: Dave Aitken Date: Sun, 20 Aug 2023 17:44:06 +0100 Subject: [PATCH 3/9] ci: opam install and run jest tests --- .github/workflows/build.yml | 39 +++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index eba50de..7d8473f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -72,3 +72,42 @@ jobs: - run: npm ci - run: npm run build - run: npm test + + build-melange: + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + node-version: + - 16.x + ocaml-compiler: + - 4.14.x + + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v3 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + + - run: npm ci + + - name: Use OCaml ${{ matrix.ocaml-compiler }} + uses: ocaml/setup-ocaml@v2 + with: + ocaml-compiler: ${{ matrix.ocaml-compiler }} + opam-pin: false + opam-depext: false + cache-prefix: v2 + + - run: | + opam pin -y -n melange-jest git+https://github.com/melange-community/melange-jest.git + opam pin -y -n melange-webapi git+https://github.com/melange-community/melange-webapi.git + + - run: opam install ./decoders.opam ./melange-decoders.opam --with-test + - run: npx jest _build/default/__tests__ From 6626283a6ed222abb994e7a07783a1f585980a67 Mon Sep 17 00:00:00 2001 From: Dave Aitken Date: Sun, 20 Aug 2023 18:16:19 +0100 Subject: [PATCH 4/9] fix: add melange dep --- decoders.opam | 1 + dune-project | 4 +++- melange-decoders.opam | 3 ++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/decoders.opam b/decoders.opam index 4fa8848..ced82de 100644 --- a/decoders.opam +++ b/decoders.opam @@ -12,6 +12,7 @@ bug-reports: "https://github.com/mattjbray/ocaml-decoders/issues" depends: [ "dune" {>= "3.8"} "ocaml" {>= "4.03.0"} + "melange" "odoc" {with-doc} "containers" {with-test & >= "0.16"} ] diff --git a/dune-project b/dune-project index 25a5add..a22997a 100644 --- a/dune-project +++ b/dune-project @@ -136,7 +136,8 @@ (description "A combinator library for \"decoding\" JSON-like values into your own Ocaml types, inspired by Elm's `Json.Decode` and `Json.Encode`.") (depends - (ocaml (>= 4.03.0)) + (ocaml (>= 4.13.0)) + melange (decoders (= :version)) (odoc :with-doc) (containers (and :with-test (>= 0.16))) @@ -149,5 +150,6 @@ "A combinator library for \"decoding\" JSON-like values into your own Ocaml types, inspired by Elm's `Json.Decode` and `Json.Encode`.") (depends (ocaml (>= 4.03.0)) + melange (odoc :with-doc) (containers (and :with-test (>= 0.16))))) diff --git a/melange-decoders.opam b/melange-decoders.opam index 5162cff..4fd7c0d 100644 --- a/melange-decoders.opam +++ b/melange-decoders.opam @@ -11,7 +11,8 @@ doc: "https://mattjbray.github.io/ocaml-decoders/" bug-reports: "https://github.com/mattjbray/ocaml-decoders/issues" depends: [ "dune" {>= "3.8"} - "ocaml" {>= "4.03.0"} + "ocaml" {>= "4.13.0"} + "melange" "decoders" {= version} "odoc" {with-doc} "containers" {with-test & >= "0.16"} From c03cbb7e34ac25af98430ca8accdfa022fdffa3a Mon Sep 17 00:00:00 2001 From: Dave Aitken Date: Sun, 20 Aug 2023 18:29:39 +0100 Subject: [PATCH 5/9] try pin-depends --- .github/workflows/build.yml | 13 +++++-------- melange-decoders.opam | 5 +++++ melange-decoders.opam.template | 5 +++++ 3 files changed, 15 insertions(+), 8 deletions(-) create mode 100644 melange-decoders.opam.template diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7d8473f..4ff94aa 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -101,13 +101,10 @@ jobs: uses: ocaml/setup-ocaml@v2 with: ocaml-compiler: ${{ matrix.ocaml-compiler }} - opam-pin: false - opam-depext: false - cache-prefix: v2 - - - run: | - opam pin -y -n melange-jest git+https://github.com/melange-community/melange-jest.git - opam pin -y -n melange-webapi git+https://github.com/melange-community/melange-webapi.git + opam-depext-flags: --with-test + opam-local-packages: | + decoders.opam + melange-decoders.opam - - run: opam install ./decoders.opam ./melange-decoders.opam --with-test + - run: opam exec -- dune build src-js - run: npx jest _build/default/__tests__ diff --git a/melange-decoders.opam b/melange-decoders.opam index 4fd7c0d..4d2bb3e 100644 --- a/melange-decoders.opam +++ b/melange-decoders.opam @@ -33,3 +33,8 @@ build: [ ] ] dev-repo: "git+https://github.com/mattjbray/ocaml-decoders.git" +pin-depends: [ + ["melange-jest.~dev" "git+https://github.com/melange-community/melange-jest.git"] + ["melange-fetch.~dev" "git+https://github.com/melange-community/melange-fetch.git"] + ["melange-webapi.~dev" "git+https://github.com/melange-community/melange-webapi.git"] +] \ No newline at end of file diff --git a/melange-decoders.opam.template b/melange-decoders.opam.template new file mode 100644 index 0000000..767c40f --- /dev/null +++ b/melange-decoders.opam.template @@ -0,0 +1,5 @@ +pin-depends: [ + ["melange-jest.~dev" "git+https://github.com/melange-community/melange-jest.git"] + ["melange-fetch.~dev" "git+https://github.com/melange-community/melange-fetch.git"] + ["melange-webapi.~dev" "git+https://github.com/melange-community/melange-webapi.git"] +] \ No newline at end of file From b692aa3881494c735898f903f60f07e3c87d2ccd Mon Sep 17 00:00:00 2001 From: Dave Aitken Date: Sun, 20 Aug 2023 19:09:02 +0100 Subject: [PATCH 6/9] fix: still needs install --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4ff94aa..b90d303 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -106,5 +106,6 @@ jobs: decoders.opam melange-decoders.opam + - run: opam install ./melange-decoders.opam --with-test - run: opam exec -- dune build src-js - run: npx jest _build/default/__tests__ From 08ae212607e26ca9fad4b760f62d4d4cb38c2760 Mon Sep 17 00:00:00 2001 From: Dave Aitken Date: Sun, 20 Aug 2023 19:17:33 +0100 Subject: [PATCH 7/9] fix: build all @melange --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b90d303..6646d45 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -107,5 +107,5 @@ jobs: melange-decoders.opam - run: opam install ./melange-decoders.opam --with-test - - run: opam exec -- dune build src-js + - run: opam exec -- dune build @melange - run: npx jest _build/default/__tests__ From dca574969df4e0c4c0b45a856f6ceb6dcdb8282d Mon Sep 17 00:00:00 2001 From: Dave Aitken Date: Mon, 21 Aug 2023 10:01:01 +0100 Subject: [PATCH 8/9] tidy: pin test deps as part of the build, not from opam file --- .github/workflows/build.yml | 5 +++++ melange-decoders.opam | 5 ----- melange-decoders.opam.template | 5 ----- 3 files changed, 5 insertions(+), 10 deletions(-) delete mode 100644 melange-decoders.opam.template diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6646d45..4e94dc1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -106,6 +106,11 @@ jobs: decoders.opam melange-decoders.opam + - run: | + opam pin -y -n melange-jest git+https://github.com/melange-community/melange-jest.git + opam pin -y -n melange-fetch git+https://github.com/melange-community/melange-fetch.git + opam pin -y -n melange-webapi git+https://github.com/melange-community/melange-webapi.git + - run: opam install ./melange-decoders.opam --with-test - run: opam exec -- dune build @melange - run: npx jest _build/default/__tests__ diff --git a/melange-decoders.opam b/melange-decoders.opam index 4d2bb3e..4fd7c0d 100644 --- a/melange-decoders.opam +++ b/melange-decoders.opam @@ -33,8 +33,3 @@ build: [ ] ] dev-repo: "git+https://github.com/mattjbray/ocaml-decoders.git" -pin-depends: [ - ["melange-jest.~dev" "git+https://github.com/melange-community/melange-jest.git"] - ["melange-fetch.~dev" "git+https://github.com/melange-community/melange-fetch.git"] - ["melange-webapi.~dev" "git+https://github.com/melange-community/melange-webapi.git"] -] \ No newline at end of file diff --git a/melange-decoders.opam.template b/melange-decoders.opam.template deleted file mode 100644 index 767c40f..0000000 --- a/melange-decoders.opam.template +++ /dev/null @@ -1,5 +0,0 @@ -pin-depends: [ - ["melange-jest.~dev" "git+https://github.com/melange-community/melange-jest.git"] - ["melange-fetch.~dev" "git+https://github.com/melange-community/melange-fetch.git"] - ["melange-webapi.~dev" "git+https://github.com/melange-community/melange-webapi.git"] -] \ No newline at end of file From a9121870548b3a0ea51bd4348ceafd8c7edd20d5 Mon Sep 17 00:00:00 2001 From: Dave Aitken Date: Mon, 21 Aug 2023 10:39:29 +0100 Subject: [PATCH 9/9] fix: remove --with-test from depext flags --- .github/workflows/build.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4e94dc1..2a99062 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -101,7 +101,6 @@ jobs: uses: ocaml/setup-ocaml@v2 with: ocaml-compiler: ${{ matrix.ocaml-compiler }} - opam-depext-flags: --with-test opam-local-packages: | decoders.opam melange-decoders.opam