From 23ae476efa50dc35d5e03909426077dd02eb9c55 Mon Sep 17 00:00:00 2001 From: Jonah Beckford <9566106-jonahbeckford@users.noreply.gitlab.com> Date: Wed, 9 Oct 2024 23:02:01 -0700 Subject: [PATCH 1/2] Split single opam into two Based on the licensing in https://github.com/Octachron/codept/issues/6. A dev can depend on the library parts of codept that have nothing to do with the executables (CLI/server/client). --- bundled/dune | 1 + codept-lib.opam | 39 +++++++++++++++++++++++++++++++++++++++ codept.opam | 2 +- dune-project | 20 +++++++++++++++++++- lib/dune | 2 +- 5 files changed, 61 insertions(+), 3 deletions(-) create mode 100644 codept-lib.opam diff --git a/bundled/dune b/bundled/dune index 0a5174fa..956a0283 100644 --- a/bundled/dune +++ b/bundled/dune @@ -1,6 +1,7 @@ (library (name bundled) (libraries codept_lib) + (public_name codept-lib.bundled) (flags (:standard -w -33)) (wrapped false) ) \ No newline at end of file diff --git a/codept-lib.opam b/codept-lib.opam new file mode 100644 index 00000000..e0155a5f --- /dev/null +++ b/codept-lib.opam @@ -0,0 +1,39 @@ +# This file is generated by dune, edit dune-project instead +opam-version: "2.0" +version: "0.12.0" +synopsis: "Alternative ocaml dependency analyzer" +description: """ +Codept intends to be a dependency solver for OCaml project and an alternative to ocamldep. Compared to ocamldep, codept major features are: + + * whole project analysis + * exhaustive warning and error messages + * structured format (s-expression or json) for dependencies + * uniform handling of delayed alias dependencies + * (experimental) full dependencies, + when dependencies up to transitive closure are not enough + +Both ocamldep and codept computes an over-approximation of the dependencies graph of OCaml project. However, codept uses whole project analysis to reduce the number of fictitious dependencies inferred at the project scale, whereas ocamldep is, by design, limited to local file analysis.""" +maintainer: ["Florian Angeletti "] +authors: ["Florian Angeletti "] +license: "OCaml-LGPL-linking-exception" +homepage: "https://github.com/Octachron/codept" +bug-reports: "https://github.com/Octachron/codept/issues" +depends: [ + "dune" + "menhir" {>= "20180523"} +] +build: [ + ["dune" "subst"] {pinned} + [ + "dune" + "build" + "-p" + name + "-j" + jobs + "@install" + "@runtest" {with-test} + "@doc" {with-doc} + ] +] +dev-repo: "git+https://github.com/Octachron/codept.git" diff --git a/codept.opam b/codept.opam index 015e7105..6a7fc4bb 100644 --- a/codept.opam +++ b/codept.opam @@ -20,7 +20,7 @@ homepage: "https://github.com/Octachron/codept" bug-reports: "https://github.com/Octachron/codept/issues" depends: [ "dune" - "menhir" {>= "20180523"} + "codept-lib" {= version} ] build: [ ["dune" "subst"] {pinned} diff --git a/dune-project b/dune-project index 0dfaab11..2e332591 100644 --- a/dune-project +++ b/dune-project @@ -2,6 +2,7 @@ (using menhir 2.0) (name codept) +(version 0.12.0) (authors "Florian Angeletti ") (maintainers "Florian Angeletti ") (homepage https://github.com/Octachron/codept) @@ -12,9 +13,26 @@ (package (name codept) - (version 0.12.0) (license GPL-3.0-or-later) (synopsis "Alternative ocaml dependency analyzer") + (depends dune (codept-lib (= :version))) + (description "Codept intends to be a dependency solver for OCaml project and an alternative to ocamldep. Compared to ocamldep, codept major features are: + + * whole project analysis + * exhaustive warning and error messages + * structured format (s-expression or json) for dependencies + * uniform handling of delayed alias dependencies + * (experimental) full dependencies, + when dependencies up to transitive closure are not enough + +Both ocamldep and codept computes an over-approximation of the dependencies graph of OCaml project. However, codept uses whole project analysis to reduce the number of fictitious dependencies inferred at the project scale, whereas ocamldep is, by design, limited to local file analysis." +) +) + +(package + (name codept-lib) + (license OCaml-LGPL-linking-exception) + (synopsis "Alternative ocaml dependency analyzer") (depends dune (menhir (>= 20180523))) (description "Codept intends to be a dependency solver for OCaml project and an alternative to ocamldep. Compared to ocamldep, codept major features are: diff --git a/lib/dune b/lib/dune index 8ad43d81..320da06f 100644 --- a/lib/dune +++ b/lib/dune @@ -11,7 +11,7 @@ (library (name codept_lib) - (public_name codept.lib) + (public_name codept-lib) (wrapped false) (libraries compiler-libs.common) (flags (:standard -w -30)) From ee82afb7ce3a292b782e2997e0ac8b066c879e44 Mon Sep 17 00:00:00 2001 From: jonahbeckford <71855677+jonahbeckford@users.noreply.github.com> Date: Mon, 14 Oct 2024 12:40:10 -0700 Subject: [PATCH 2/2] Update dune-project Co-authored-by: Florian Angeletti --- dune-project | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dune-project b/dune-project index 2e332591..46009f97 100644 --- a/dune-project +++ b/dune-project @@ -31,7 +31,7 @@ Both ocamldep and codept computes an over-approximation of the dependencies grap (package (name codept-lib) - (license OCaml-LGPL-linking-exception) + (license "LGPL-2.1-only WITH OCaml-LGPL-linking-exception") (synopsis "Alternative ocaml dependency analyzer") (depends dune (menhir (>= 20180523))) (description "Codept intends to be a dependency solver for OCaml project and an alternative to ocamldep. Compared to ocamldep, codept major features are: