From b82eb0b66f6300b6b016b51322ee2717fa3c2787 Mon Sep 17 00:00:00 2001 From: Abdullah Elsayed Date: Sun, 28 Jun 2026 14:13:16 +0300 Subject: [PATCH] build(packaging): Tighten Dune package metadata Scope package test dependencies to packages that own test stanzas, add minimum versions for shared test libraries, and declare direct Awskit dependencies in runtime adapter packages. Regenerate opam metadata from dune-project so package installs match Dune's source of truth. --- awskit-eio.opam | 6 +- awskit-lwt-unix.opam | 3 - awskit-lwt.opam | 6 +- awskit-s3-eio.opam | 6 -- awskit-s3-lwt-unix.opam | 3 - awskit-s3-lwt.opam | 4 -- awskit-s3-sim.opam | 6 +- awskit-s3.opam | 6 +- awskit-unix.opam | 3 - awskit.opam | 6 +- dune-project | 119 +++++++++++++++++-------------- packages/awskit-s3/eio/dune | 2 +- packages/awskit-s3/lwt/dune | 2 +- packages/awskit-s3/lwt/unix/dune | 10 ++- packages/awskit/lwt/unix/dune | 1 + test/support/dune | 2 + 16 files changed, 95 insertions(+), 90 deletions(-) diff --git a/awskit-eio.opam b/awskit-eio.opam index ea64310..8df25a2 100644 --- a/awskit-eio.opam +++ b/awskit-eio.opam @@ -23,9 +23,9 @@ depends: [ "logs" "ppx_deriving" "eio_main" {with-test & >= "1.3"} - "alcotest" {with-test} - "qcheck-core" {with-test} - "qcheck-alcotest" {with-test} + "alcotest" {with-test & >= "1.9.1"} + "qcheck-core" {with-test & >= "0.91"} + "qcheck-alcotest" {with-test & >= "0.91"} "odoc" {with-doc} ] build: [ diff --git a/awskit-lwt-unix.opam b/awskit-lwt-unix.opam index dc8f3bf..5691580 100644 --- a/awskit-lwt-unix.opam +++ b/awskit-lwt-unix.opam @@ -22,9 +22,6 @@ depends: [ "uri" "ptime" "yojson" - "alcotest" {with-test} - "qcheck-core" {with-test} - "qcheck-alcotest" {with-test} "odoc" {with-doc} ] build: [ diff --git a/awskit-lwt.opam b/awskit-lwt.opam index 5d14640..c83e739 100644 --- a/awskit-lwt.opam +++ b/awskit-lwt.opam @@ -23,9 +23,9 @@ depends: [ "logs" "ppx_deriving" "cohttp-lwt-unix" {with-test & >= "6.2.1"} - "alcotest" {with-test} - "qcheck-core" {with-test} - "qcheck-alcotest" {with-test} + "alcotest" {with-test & >= "1.9.1"} + "qcheck-core" {with-test & >= "0.91"} + "qcheck-alcotest" {with-test & >= "0.91"} "odoc" {with-doc} ] build: [ diff --git a/awskit-s3-eio.opam b/awskit-s3-eio.opam index b9902b1..ff9d942 100644 --- a/awskit-s3-eio.opam +++ b/awskit-s3-eio.opam @@ -18,12 +18,6 @@ depends: [ "fmt" {>= "0.11.0"} "eio" {>= "1.3"} "ptime" - "awskit-unix" {with-test & = version} - "eio_main" {with-test & >= "1.3"} - "digestif" {with-test & >= "1.3.0"} - "alcotest" {with-test} - "qcheck-core" {with-test} - "qcheck-alcotest" {with-test} "odoc" {with-doc} ] build: [ diff --git a/awskit-s3-lwt-unix.opam b/awskit-s3-lwt-unix.opam index 0478012..496791d 100644 --- a/awskit-s3-lwt-unix.opam +++ b/awskit-s3-lwt-unix.opam @@ -20,9 +20,6 @@ depends: [ "lwt" "fmt" {>= "0.11.0"} "ptime" - "alcotest" {with-test} - "qcheck-core" {with-test} - "qcheck-alcotest" {with-test} "odoc" {with-doc} ] build: [ diff --git a/awskit-s3-lwt.opam b/awskit-s3-lwt.opam index dd75013..f00b686 100644 --- a/awskit-s3-lwt.opam +++ b/awskit-s3-lwt.opam @@ -17,10 +17,6 @@ depends: [ "cohttp-lwt" {>= "6.2.1"} "lwt" "ptime" - "cohttp-lwt-unix" {with-test & >= "6.2.1"} - "alcotest" {with-test} - "qcheck-core" {with-test} - "qcheck-alcotest" {with-test} "odoc" {with-doc} ] build: [ diff --git a/awskit-s3-sim.opam b/awskit-s3-sim.opam index 7ec6dae..076cd31 100644 --- a/awskit-s3-sim.opam +++ b/awskit-s3-sim.opam @@ -19,9 +19,9 @@ depends: [ "fmt" {>= "0.11.0"} "base64" {>= "3.5.2"} "uri" - "alcotest" {with-test} - "qcheck-core" {with-test} - "qcheck-alcotest" {with-test} + "alcotest" {with-test & >= "1.9.1"} + "qcheck-core" {with-test & >= "0.91"} + "qcheck-alcotest" {with-test & >= "0.91"} "odoc" {with-doc} ] build: [ diff --git a/awskit-s3.opam b/awskit-s3.opam index bf897c8..10eef8b 100644 --- a/awskit-s3.opam +++ b/awskit-s3.opam @@ -24,9 +24,9 @@ depends: [ "ppx_protocol_conv_xmlm" "ppx_deriving" "ppx_yojson_conv" - "alcotest" {with-test} - "qcheck-core" {with-test} - "qcheck-alcotest" {with-test} + "alcotest" {with-test & >= "1.9.1"} + "qcheck-core" {with-test & >= "0.91"} + "qcheck-alcotest" {with-test & >= "0.91"} "odoc" {with-doc} ] build: [ diff --git a/awskit-unix.opam b/awskit-unix.opam index 52d136f..6a5ced9 100644 --- a/awskit-unix.opam +++ b/awskit-unix.opam @@ -16,9 +16,6 @@ depends: [ "base" {>= "v0.16.3"} "ptime" "fmt" {>= "0.11.0"} - "alcotest" {with-test} - "qcheck-core" {with-test} - "qcheck-alcotest" {with-test} "odoc" {with-doc} ] build: [ diff --git a/awskit.opam b/awskit.opam index b2e865f..a79d3c3 100644 --- a/awskit.opam +++ b/awskit.opam @@ -22,9 +22,9 @@ depends: [ "dune-release" {with-dev-setup} "opam-publish" {with-dev-setup} "ocamlformat" {with-dev-setup & = "0.29.0"} - "alcotest" {with-test} - "qcheck-core" {with-test} - "qcheck-alcotest" {with-test} + "alcotest" {with-test & >= "1.9.1"} + "qcheck-core" {with-test & >= "0.91"} + "qcheck-alcotest" {with-test & >= "0.91"} "odoc" {with-doc} ] build: [ diff --git a/dune-project b/dune-project index 0c29986..8d9458d 100644 --- a/dune-project +++ b/dune-project @@ -39,9 +39,18 @@ (and :with-dev-setup (= 0.29.0))) - (alcotest :with-test) - (qcheck-core :with-test) - (qcheck-alcotest :with-test))) + (alcotest + (and + :with-test + (>= 1.9.1))) + (qcheck-core + (and + :with-test + (>= 0.91))) + (qcheck-alcotest + (and + :with-test + (>= 0.91))))) (package (name awskit-unix) @@ -57,10 +66,7 @@ (>= v0.16.3)) ptime (fmt - (>= 0.11.0)) - (alcotest :with-test) - (qcheck-core :with-test) - (qcheck-alcotest :with-test))) + (>= 0.11.0)))) (package (name awskit-lwt) @@ -89,9 +95,18 @@ (and :with-test (>= 6.2.1))) - (alcotest :with-test) - (qcheck-core :with-test) - (qcheck-alcotest :with-test))) + (alcotest + (and + :with-test + (>= 1.9.1))) + (qcheck-core + (and + :with-test + (>= 0.91))) + (qcheck-alcotest + (and + :with-test + (>= 0.91))))) (package (name awskit-lwt-unix) @@ -116,10 +131,7 @@ lwt uri ptime - yojson - (alcotest :with-test) - (qcheck-core :with-test) - (qcheck-alcotest :with-test))) + yojson)) (package (name awskit-eio) @@ -149,14 +161,22 @@ (and :with-test (>= 1.3))) - (alcotest :with-test) - (qcheck-core :with-test) - (qcheck-alcotest :with-test))) + (alcotest + (and + :with-test + (>= 1.9.1))) + (qcheck-core + (and + :with-test + (>= 0.91))) + (qcheck-alcotest + (and + :with-test + (>= 0.91))))) (package (name awskit-s3) - (synopsis - "S3 client core — objects, buckets, multipart, and policies") + (synopsis "S3 client core — objects, buckets, multipart, and policies") (description "S3 operations, bucket configuration, multipart uploads, presigned URLs, policies, and XML wire types. Runtime adapters are available as separate packages.") (depends @@ -178,9 +198,18 @@ ppx_protocol_conv_xmlm ppx_deriving ppx_yojson_conv - (alcotest :with-test) - (qcheck-core :with-test) - (qcheck-alcotest :with-test))) + (alcotest + (and + :with-test + (>= 1.9.1))) + (qcheck-core + (and + :with-test + (>= 0.91))) + (qcheck-alcotest + (and + :with-test + (>= 0.91))))) (package (name awskit-s3-sim) @@ -202,9 +231,18 @@ (base64 (>= 3.5.2)) uri - (alcotest :with-test) - (qcheck-core :with-test) - (qcheck-alcotest :with-test))) + (alcotest + (and + :with-test + (>= 1.9.1))) + (qcheck-core + (and + :with-test + (>= 0.91))) + (qcheck-alcotest + (and + :with-test + (>= 0.91))))) (package (name awskit-s3-lwt) @@ -222,14 +260,7 @@ (cohttp-lwt (>= 6.2.1)) lwt - ptime - (cohttp-lwt-unix - (and - :with-test - (>= 6.2.1))) - (alcotest :with-test) - (qcheck-core :with-test) - (qcheck-alcotest :with-test))) + ptime)) (package (name awskit-s3-lwt-unix) @@ -252,10 +283,7 @@ lwt (fmt (>= 0.11.0)) - ptime - (alcotest :with-test) - (qcheck-core :with-test) - (qcheck-alcotest :with-test))) + ptime)) (package (name awskit-s3-eio) @@ -275,19 +303,4 @@ (>= 0.11.0)) (eio (>= 1.3)) - ptime - (awskit-unix - (and - :with-test - (= :version))) - (eio_main - (and - :with-test - (>= 1.3))) - (digestif - (and - :with-test - (>= 1.3.0))) - (alcotest :with-test) - (qcheck-core :with-test) - (qcheck-alcotest :with-test))) + ptime)) diff --git a/packages/awskit-s3/eio/dune b/packages/awskit-s3/eio/dune index 2e1b0bd..41fd42b 100644 --- a/packages/awskit-s3/eio/dune +++ b/packages/awskit-s3/eio/dune @@ -2,4 +2,4 @@ (name awskit_s3_eio) (public_name awskit-s3-eio) (private_modules transfer) - (libraries awskit-s3 awskit-eio eio fmt ptime)) + (libraries awskit awskit-s3 awskit-eio eio fmt ptime)) diff --git a/packages/awskit-s3/lwt/dune b/packages/awskit-s3/lwt/dune index 6e80702..d7479ed 100644 --- a/packages/awskit-s3/lwt/dune +++ b/packages/awskit-s3/lwt/dune @@ -1,4 +1,4 @@ (library (name awskit_s3_lwt) (public_name awskit-s3-lwt) - (libraries awskit-s3 awskit-lwt cohttp-lwt lwt ptime)) + (libraries awskit awskit-s3 awskit-lwt cohttp-lwt lwt ptime)) diff --git a/packages/awskit-s3/lwt/unix/dune b/packages/awskit-s3/lwt/unix/dune index 0a8b0ac..73e6280 100644 --- a/packages/awskit-s3/lwt/unix/dune +++ b/packages/awskit-s3/lwt/unix/dune @@ -2,4 +2,12 @@ (name awskit_s3_lwt_unix) (public_name awskit-s3-lwt-unix) (private_modules transfer) - (libraries awskit-s3-lwt awskit-lwt-unix cohttp-lwt-unix lwt.unix ptime fmt)) + (libraries + awskit + awskit-s3 + awskit-s3-lwt + awskit-lwt-unix + cohttp-lwt-unix + lwt.unix + ptime + fmt)) diff --git a/packages/awskit/lwt/unix/dune b/packages/awskit/lwt/unix/dune index 177be74..22067db 100644 --- a/packages/awskit/lwt/unix/dune +++ b/packages/awskit/lwt/unix/dune @@ -2,6 +2,7 @@ (name awskit_lwt_unix) (public_name awskit-lwt-unix) (libraries + awskit awskit-lwt awskit-unix cohttp diff --git a/test/support/dune b/test/support/dune index d8e9000..7d49085 100644 --- a/test/support/dune +++ b/test/support/dune @@ -6,11 +6,13 @@ (test (name test_workload_coverage) + (package awskit) (modules test_workload_coverage) (libraries awskit_test_coverage alcotest)) (test (name test_runtime_http_loopback_policy) + (package awskit) (modules test_runtime_http_loopback_policy) (libraries awskit_runtime_http_workload alcotest))