From f3c34c2b41cd8eea3341d3d73e66333d2f1a016d Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Sat, 30 Dec 2023 23:28:06 -0500 Subject: [PATCH] require dune 3.0, use proper mdx stanza --- dune | 12 ++++-------- dune-project | 3 ++- printbox-html.opam | 5 +++-- printbox-text.opam | 5 +++-- printbox.opam | 4 ++-- test/dune | 3 +++ test/test1.ml | 2 +- 7 files changed, 18 insertions(+), 16 deletions(-) diff --git a/dune b/dune index e7943b3..4b43da6 100644 --- a/dune +++ b/dune @@ -1,9 +1,5 @@ -(rule - (alias runtest) - (deps - (:readme README.md)) + +(mdx (package printbox-html) - (action - (progn - (run ocaml-mdx test %{readme}) - (diff? %{readme} %{readme}.corrected)))) + (libraries printbox printbox-text printbox-html) + (files README.md)) diff --git a/dune-project b/dune-project index 26d7db8..8a23b4f 100644 --- a/dune-project +++ b/dune-project @@ -1,5 +1,6 @@ -(lang dune 2.0) +(lang dune 3.0) (name printbox) +(using mdx 0.2) (generate_opam_files true) (version 0.7) (license "BSD-2-Clause") diff --git a/printbox-html.opam b/printbox-html.opam index 98e758b..26d50e7 100644 --- a/printbox-html.opam +++ b/printbox-html.opam @@ -12,15 +12,16 @@ license: "BSD-2-Clause" homepage: "https://github.com/c-cube/printbox" bug-reports: "https://github.com/c-cube/printbox/issues" depends: [ - "dune" {>= "2.0"} + "dune" {>= "3.0"} "printbox" {= version} "printbox-text" {= version & with-test} "odoc" {with-test} "tyxml" {>= "4.3"} "mdx" {>= "1.4" & with-test} + "odoc" {with-doc} ] build: [ - ["dune" "subst"] {pinned} + ["dune" "subst"] {dev} [ "dune" "build" diff --git a/printbox-text.opam b/printbox-text.opam index d431943..7217fad 100644 --- a/printbox-text.opam +++ b/printbox-text.opam @@ -8,15 +8,16 @@ license: "BSD-2-Clause" homepage: "https://github.com/c-cube/printbox" bug-reports: "https://github.com/c-cube/printbox/issues" depends: [ - "dune" {>= "2.0"} + "dune" {>= "3.0"} "printbox" {= version} "uutf" {>= "1.0"} "uucp" {>= "2.0"} "odoc" {with-test} "mdx" {>= "1.4" & with-test} + "odoc" {with-doc} ] build: [ - ["dune" "subst"] {pinned} + ["dune" "subst"] {dev} [ "dune" "build" diff --git a/printbox.opam b/printbox.opam index 3cde9b8..4600559 100644 --- a/printbox.opam +++ b/printbox.opam @@ -10,12 +10,12 @@ tags: ["print" "box" "table" "tree"] homepage: "https://github.com/c-cube/printbox" bug-reports: "https://github.com/c-cube/printbox/issues" depends: [ - "dune" {>= "2.0"} + "dune" {>= "3.0"} "ocaml" {>= "4.08"} "odoc" {with-doc} ] build: [ - ["dune" "subst"] {pinned} + ["dune" "subst"] {dev} [ "dune" "build" diff --git a/test/dune b/test/dune index 252d60f..96ce8d5 100644 --- a/test/dune +++ b/test/dune @@ -1,4 +1,7 @@ +(env + (_ (flags :standard -warn-error -a))) + (test (name test_ann_0_3) (modules test_ann_0_3) diff --git a/test/test1.ml b/test/test1.ml index 20c4104..ad63ce4 100644 --- a/test/test1.ml +++ b/test/test1.ml @@ -75,7 +75,7 @@ module Box_in = struct let () = print_endline @@ PrintBox_text.to_string b end -let b = +let _b = let open PrintBox in frame @@ record [ ("subject", text_with_style Style.bold "announce: printbox 0.3");