From e4d74a63e4d886689dde42567219c61d888d8bf4 Mon Sep 17 00:00:00 2001 From: Jules Aguillon Date: Tue, 10 Dec 2024 15:47:16 +0100 Subject: [PATCH] Set Dune rules and Opam dependencies --- dune | 2 ++ dune-project | 4 +++ odoc-parser.opam | 14 ++++++++++- src/driver/dune | 3 ++- vendor/sherlodoc/cli/dune | 2 +- vendor/sherlodoc/dune-project | 46 ----------------------------------- 6 files changed, 22 insertions(+), 49 deletions(-) delete mode 100644 vendor/sherlodoc/dune-project diff --git a/dune b/dune index 3a7000ca50..e80a0fbd32 100644 --- a/dune +++ b/dune @@ -23,3 +23,5 @@ (progn (bash "diff doc/driver.mld doc/driver.mld.corrected >&2 || true") (cat doc/driver-benchmarks.json)))) + +(vendored_dirs vendor) diff --git a/dune-project b/dune-project index 12643f8d30..ea608d6a68 100644 --- a/dune-project +++ b/dune-project @@ -29,3 +29,7 @@ (cram enable) (using mdx 0.3) + +; Sherlodoc +(using menhir 2.1) +(using directory-targets 0.1) diff --git a/odoc-parser.opam b/odoc-parser.opam index b167c9a85d..6abb74886d 100644 --- a/odoc-parser.opam +++ b/odoc-parser.opam @@ -16,10 +16,22 @@ depends: [ "dune" {>= "3.7"} "ocaml" {>= "4.02.0" & < "5.4"} "astring" - "result" + "result" {>= "1.5"} "camlp-streams" "ppx_expect" {with-test} ("ocaml" {< "4.04.1" & with-test} | "sexplib0" {with-test}) + # Dependencies for sherlodoc: + "base64" {>= "3.5.1"} + "bigstringaf" {>= "0.9.1"} + "js_of_ocaml" {>= "5.6.0"} + "brr" {>= "0.0.6"} + "cmdliner" {>= "1.2.0"} + "decompress" {>= "1.5.3"} + "fpath" {>= "0.7.3"} + "lwt" {>= "5.7.0"} + "menhir" {>= "20230608"} + "ppx_blob" {>= "0.7.2"} + "tyxml" {>= "4.6.0"} ] build: [ ["dune" "subst"] {dev} diff --git a/src/driver/dune b/src/driver/dune index 774a169808..90a28022dd 100644 --- a/src/driver/dune +++ b/src/driver/dune @@ -3,7 +3,8 @@ (package odoc-driver) (link_deps (package odoc) - (package odoc-md)) + (package odoc-md) + %{bin:sherlodoc}) (preprocess (pps ppx_sexp_conv)) (libraries diff --git a/vendor/sherlodoc/cli/dune b/vendor/sherlodoc/cli/dune index 2b1d3ffa9a..2ed6a7b570 100644 --- a/vendor/sherlodoc/cli/dune +++ b/vendor/sherlodoc/cli/dune @@ -3,7 +3,7 @@ (executable (name main) (public_name sherlodoc) - (package sherlodoc) + (package odoc-driver) (libraries cmdliner index diff --git a/vendor/sherlodoc/dune-project b/vendor/sherlodoc/dune-project deleted file mode 100644 index d5df3c2bfb..0000000000 --- a/vendor/sherlodoc/dune-project +++ /dev/null @@ -1,46 +0,0 @@ -(lang dune 3.5) - -(cram enable) - -(using menhir 2.1) - -(generate_opam_files true) - -(name sherlodoc) - -(version 0.2) - -(source (github art-w/sherlodoc)) - -(authors "Arthur Wendling" "Emile Trotignon") - -(maintainers "art.wendling@gmail.com") - -(license MIT) - -(using directory-targets 0.1) - -(package - (name sherlodoc) - (synopsis "Search engine for OCaml documentation") - (depends - (ocaml (>= 4.0.8)) - (odoc (>= 3.0.0)) - (base64 (>= 3.5.1)) - (bigstringaf (>= 0.9.1)) - (js_of_ocaml (>= 5.6.0)) - (brr (>= 0.0.6)) - (cmdliner (>= 1.2.0)) - (decompress (>= 1.5.3)) - (fpath (>= 0.7.3)) - (lwt (>= 5.7.0)) - (menhir (>= 20230608)) - (ppx_blob (>= 0.7.2)) - (tyxml (>= 4.6.0)) - (result (>= 1.5)) - (odig :with-test) - (base (and :with-test (= v0.16.3))) - (alcotest :with-test)) - (depopts - (dream (>= 1.0.0~alpha5)) - (ancient (>= 0.9.1))))