From 1fa7c88d754bf361aedb0e4c6e21de0c0f6f4292 Mon Sep 17 00:00:00 2001 From: Romain Bardou Date: Thu, 14 Oct 2021 15:36:37 +0200 Subject: [PATCH] Build: manifest-generated lib_shell, lib_rpc_http, bin_validation, lib_client_base --- src/bin_validation/dune | 69 +++++++++-------- src/bin_validation/tezos-validator.opam | 9 +-- src/lib_client_base/dune | 28 +++---- src/lib_client_base/gen/dune | 1 - src/lib_client_base/test/dune | 33 ++------ src/lib_client_base/tezos-client-base.opam | 10 +-- src/lib_rpc_http/dune | 69 +++++++++-------- src/lib_rpc_http/test/dune | 33 ++++---- .../tezos-rpc-http-client-unix.opam | 5 +- src/lib_rpc_http/tezos-rpc-http-client.opam | 4 +- src/lib_rpc_http/tezos-rpc-http-server.opam | 13 ++-- src/lib_rpc_http/tezos-rpc-http.opam | 4 +- src/lib_shell/bench/dune | 41 ++++------ src/lib_shell/dune | 65 ++++++++-------- src/lib_shell/test/dune | 76 ++++++++++--------- src/lib_shell/tezos-shell.opam | 26 ++++--- 16 files changed, 236 insertions(+), 250 deletions(-) diff --git a/src/bin_validation/dune b/src/bin_validation/dune index 5dca2be68d3d..063fa8489689 100644 --- a/src/bin_validation/dune +++ b/src/bin_validation/dune @@ -1,40 +1,47 @@ +(env (static (flags (:standard -ccopt -static)))) + (library (name tezos_validator) - (instrumentation (backend bisect_ppx)) (public_name tezos-validator) - (libraries tezos-base - tezos-base.unix - tezos-context - tezos-stdlib-unix - tezos-protocol-environment - tezos-protocol-updater - tezos-shell - tezos-shell-context - tezos-validation) - (flags (:standard -open Tezos_base__TzPervasives - -open Tezos_context - -open Tezos_stdlib_unix - -open Tezos_shell - -open Tezos_shell_services - -open Tezos_validation - -open Tezos_protocol_updater - -open Tezos_shell_context)) - (modules Validator - Command_line)) + (instrumentation (backend bisect_ppx)) + (libraries + tezos-base + tezos-base.unix + tezos-context + tezos-stdlib-unix + tezos-protocol-environment + tezos-protocol-updater + tezos-shell + tezos-shell-context + tezos-validation) + (flags + (:standard + -open Tezos_base__TzPervasives + -open Tezos_context + -open Tezos_stdlib_unix + -open Tezos_shell + -open Tezos_shell_services + -open Tezos_validation + -open Tezos_protocol_updater + -open Tezos_shell_context)) + (modules Validator Command_line)) (executable (name main_validator) - (instrumentation (backend bisect_ppx)) (public_name tezos-validator) (package tezos-validator) - (libraries tezos_validator) - (flags (:standard -open Tezos_base__TzPervasives - -open Tezos_context - -open Tezos_stdlib_unix - -open Tezos_shell - -open Tezos_shell_services - -open Tezos_validation - -open Tezos_protocol_updater - -open Tezos_validator - -linkall)) + (instrumentation (backend bisect_ppx)) + (libraries + tezos-validator) + (flags + (:standard + -linkall + -open Tezos_base__TzPervasives + -open Tezos_context + -open Tezos_stdlib_unix + -open Tezos_shell + -open Tezos_shell_services + -open Tezos_validation + -open Tezos_protocol_updater + -open Tezos_validator)) (modules Main_validator)) diff --git a/src/bin_validation/tezos-validator.opam b/src/bin_validation/tezos-validator.opam index 4fcc8f315985..6c8b1e05fa12 100644 --- a/src/bin_validation/tezos-validator.opam +++ b/src/bin_validation/tezos-validator.opam @@ -1,6 +1,6 @@ opam-version: "2.0" maintainer: "contact@tezos.com" -authors: [ "Tezos devteam" ] +authors: ["Tezos devteam"] homepage: "https://www.tezos.com/" bug-reports: "https://gitlab.com/tezos/tezos/issues" dev-repo: "git+https://gitlab.com/tezos/tezos.git" @@ -15,12 +15,9 @@ depends: [ "tezos-shell" "tezos-shell-context" "tezos-validation" - "lwt-exit" ] build: [ - [ "dune" "build" "-p" name "-j" jobs ] -] -run-test: [ - [ "dune" "runtest" "-p" name "-j" jobs ] + ["dune" "build" "-p" name "-j" jobs] + ["dune" "runtest" "-p" name "-j" jobs] {with-test} ] synopsis: "Tezos: `tezos-validator` binary for external validation of blocks" diff --git a/src/lib_client_base/dune b/src/lib_client_base/dune index 209f04772ce9..b84ba9053470 100644 --- a/src/lib_client_base/dune +++ b/src/lib_client_base/dune @@ -1,19 +1,21 @@ (library (name tezos_client_base) - (instrumentation (backend bisect_ppx)) (public_name tezos-client-base) - (libraries tezos-base - tezos-shell-services - tezos-sapling - tezos-rpc) - (modules (:standard bip39_english)) - (library_flags (:standard -linkall)) - (flags (:standard -open Tezos_base__TzPervasives - -open Tezos_rpc - -open Tezos_shell_services))) + (instrumentation (backend bisect_ppx)) + (libraries + tezos-base + tezos-shell-services + tezos-sapling + tezos-rpc) + (flags + (:standard + -linkall + -open Tezos_base__TzPervasives + -open Tezos_rpc + -open Tezos_shell_services)) + (modules :standard bip39_english)) (rule (targets bip39_english.ml) - (deps (:exe gen/bip39_generator.exe) - gen/bip39_english.txt) - (action (run %{exe} %{targets}))) + (deps (:exe gen/bip39_generator.exe) gen/bip39_english.txt) + (action (run %{exe} %{targets}))) diff --git a/src/lib_client_base/gen/dune b/src/lib_client_base/gen/dune index 29f203b8ba4b..61c999e817db 100644 --- a/src/lib_client_base/gen/dune +++ b/src/lib_client_base/gen/dune @@ -1,3 +1,2 @@ (executable (name bip39_generator)) - diff --git a/src/lib_client_base/test/dune b/src/lib_client_base/test/dune index 474bce39860d..7e27291ad60a 100644 --- a/src/lib_client_base/test/dune +++ b/src/lib_client_base/test/dune @@ -1,30 +1,9 @@ -(executable - (name bip39_tests) - (modules bip39_tests) - (libraries - tezos-base - tezos-base.unix - tezos-client-base - alcotest) - (flags (:standard -open Tezos_client_base))) - -(rule - (alias runtest) +(tests + (names bip39_tests pbkdf_tests) (package tezos-client-base) - (deps (:exe bip39_tests.exe)) - (action (run %{exe}))) - -(executable - (name pbkdf_tests) - (modules pbkdf_tests) (libraries - tezos-base - tezos-base.unix - tezos-client-base - alcotest) + tezos-base + tezos-base.unix + tezos-client-base + alcotest) (flags (:standard -open Tezos_client_base))) - -(rule - (alias runtest) - (package tezos-client-base) - (action (run %{exe:pbkdf_tests.exe}))) diff --git a/src/lib_client_base/tezos-client-base.opam b/src/lib_client_base/tezos-client-base.opam index 0279f9995095..d06fce4cccb1 100644 --- a/src/lib_client_base/tezos-client-base.opam +++ b/src/lib_client_base/tezos-client-base.opam @@ -1,6 +1,6 @@ opam-version: "2.0" maintainer: "contact@tezos.com" -authors: [ "Tezos devteam" ] +authors: ["Tezos devteam"] homepage: "https://www.tezos.com/" bug-reports: "https://gitlab.com/tezos/tezos/issues" dev-repo: "git+https://gitlab.com/tezos/tezos.git" @@ -8,14 +8,10 @@ license: "MIT" depends: [ "dune" { >= "2.0" } "tezos-base" - "tezos-stdlib-unix" "tezos-shell-services" - "tezos-context" - "tezos-rpc-http" - "cmdliner" - "tezos-sapling" - "alcotest" { with-test } "tezos-sapling" + "tezos-rpc" + "alcotest" { with-test & >= "1.1.0" } ] build: [ ["dune" "build" "-p" name "-j" jobs] diff --git a/src/lib_rpc_http/dune b/src/lib_rpc_http/dune index 0f4c3e21f3cf..49a0aecbe5ed 100644 --- a/src/lib_rpc_http/dune +++ b/src/lib_rpc_http/dune @@ -1,48 +1,53 @@ (library (name tezos_rpc_http) - (instrumentation (backend bisect_ppx)) (public_name tezos-rpc-http) - (modules RPC_client_errors media_type) - (libraries tezos-base - resto-cohttp) - (flags (:standard -open Tezos_base__TzPervasives))) + (instrumentation (backend bisect_ppx)) + (libraries + tezos-base + resto-cohttp) + (flags (:standard -open Tezos_base__TzPervasives)) + (modules RPC_client_errors media_type)) (library (name tezos_rpc_http_client) - (instrumentation (backend bisect_ppx)) (public_name tezos-rpc-http-client) - (modules RPC_client) - (libraries tezos-base - resto-cohttp-client - tezos-rpc-http) - (flags (:standard -open Tezos_base__TzPervasives - -open Tezos_rpc_http))) + (instrumentation (backend bisect_ppx)) + (libraries + tezos-base + resto-cohttp-client + tezos-rpc-http) + (flags (:standard -open Tezos_base__TzPervasives -open Tezos_rpc_http)) + (modules RPC_client)) (library (name tezos_rpc_http_client_unix) - (instrumentation (backend bisect_ppx)) (public_name tezos-rpc-http-client-unix) - (modules RPC_client_unix) - (libraries tezos-stdlib-unix - tezos-base - cohttp-lwt-unix - resto-cohttp-client - tezos-rpc-http-client) - (flags (:standard -open Tezos_base__TzPervasives - -open Tezos_rpc_http_client))) + (instrumentation (backend bisect_ppx)) + (libraries + tezos-stdlib-unix + tezos-base + cohttp-lwt-unix + resto-cohttp-client + tezos-rpc-http-client) + (flags + (:standard -open Tezos_base__TzPervasives -open Tezos_rpc_http_client)) + (modules RPC_client_unix)) (library (name tezos_rpc_http_server) - (instrumentation (backend bisect_ppx)) (public_name tezos-rpc-http-server) - (libraries tezos-base - tezos-stdlib-unix - resto-cohttp-server - resto-acl - tezos-rpc-http) + (instrumentation (backend bisect_ppx)) + (libraries + tezos-base + tezos-stdlib-unix + resto-cohttp-server + resto-acl + tezos-rpc-http) + (flags + (:standard + -open Tezos_base__TzPervasives + -open Tezos_stdlib_unix + -open Tezos_rpc + -open Tezos_rpc_http)) (modules RPC_server RPC_logging) - (private_modules RPC_logging) - (flags (:standard -open Tezos_base__TzPervasives - -open Tezos_stdlib_unix - -open Tezos_rpc - -open Tezos_rpc_http))) + (private_modules RPC_logging)) diff --git a/src/lib_rpc_http/test/dune b/src/lib_rpc_http/test/dune index 33b05c385926..998e0ce796fd 100644 --- a/src/lib_rpc_http/test/dune +++ b/src/lib_rpc_http/test/dune @@ -1,16 +1,19 @@ -(tests - (names test_rpc_http) +(test + (name test_rpc_http) (package tezos-rpc-http-server) - (libraries tezos-base - tezos-base.unix - tezos-stdlib-unix - tezos-rpc-http-server - tezos-base-test-helpers - tezos-test-helpers - qcheck-alcotest - alcotest-lwt) - (flags (:standard -open Tezos_base__TzPervasives - -open Tezos_stdlib - -open Lib_test - -open Tezos_base_test_helpers - -open Tezos_rpc_http_server))) + (libraries + tezos-base + tezos-base.unix + tezos-stdlib-unix + tezos-rpc-http-server + tezos-base-test-helpers + tezos-test-helpers + qcheck-alcotest + alcotest-lwt) + (flags + (:standard + -open Tezos_base__TzPervasives + -open Tezos_stdlib + -open Lib_test + -open Tezos_base_test_helpers + -open Tezos_rpc_http_server))) diff --git a/src/lib_rpc_http/tezos-rpc-http-client-unix.opam b/src/lib_rpc_http/tezos-rpc-http-client-unix.opam index bef9c59bcd17..c7051297298f 100644 --- a/src/lib_rpc_http/tezos-rpc-http-client-unix.opam +++ b/src/lib_rpc_http/tezos-rpc-http-client-unix.opam @@ -1,15 +1,16 @@ opam-version: "2.0" maintainer: "contact@tezos.com" -authors: [ "Tezos devteam" ] +authors: ["Tezos devteam"] homepage: "https://www.tezos.com/" bug-reports: "https://gitlab.com/tezos/tezos/issues" dev-repo: "git+https://gitlab.com/tezos/tezos.git" license: "MIT" depends: [ "dune" { >= "2.0" } - "tezos-base" "tezos-stdlib-unix" + "tezos-base" "cohttp-lwt-unix" { >= "2.2.0" } + "resto-cohttp-client" { >= "0.6" & < "0.7" } "tezos-rpc-http-client" ] build: [ diff --git a/src/lib_rpc_http/tezos-rpc-http-client.opam b/src/lib_rpc_http/tezos-rpc-http-client.opam index c81a297616a4..9f29ff3b4fb5 100644 --- a/src/lib_rpc_http/tezos-rpc-http-client.opam +++ b/src/lib_rpc_http/tezos-rpc-http-client.opam @@ -1,6 +1,6 @@ opam-version: "2.0" maintainer: "contact@tezos.com" -authors: [ "Tezos devteam" ] +authors: ["Tezos devteam"] homepage: "https://www.tezos.com/" bug-reports: "https://gitlab.com/tezos/tezos/issues" dev-repo: "git+https://gitlab.com/tezos/tezos.git" @@ -8,8 +8,8 @@ license: "MIT" depends: [ "dune" { >= "2.0" } "tezos-base" - "tezos-rpc-http" "resto-cohttp-client" { >= "0.6" & < "0.7" } + "tezos-rpc-http" ] build: [ ["dune" "build" "-p" name "-j" jobs] diff --git a/src/lib_rpc_http/tezos-rpc-http-server.opam b/src/lib_rpc_http/tezos-rpc-http-server.opam index 3812a8a757c3..78de3b014e66 100644 --- a/src/lib_rpc_http/tezos-rpc-http-server.opam +++ b/src/lib_rpc_http/tezos-rpc-http-server.opam @@ -1,6 +1,6 @@ opam-version: "2.0" maintainer: "contact@tezos.com" -authors: [ "Tezos devteam" ] +authors: ["Tezos devteam"] homepage: "https://www.tezos.com/" bug-reports: "https://gitlab.com/tezos/tezos/issues" dev-repo: "git+https://gitlab.com/tezos/tezos.git" @@ -8,13 +8,14 @@ license: "MIT" depends: [ "dune" { >= "2.0" } "tezos-base" - "tezos-rpc-http" + "tezos-stdlib-unix" "resto-cohttp-server" { >= "0.6" & < "0.7" } "resto-acl" { >= "0.6" & < "0.7" } - "alcotest-lwt" { with-test } - "tezos-test-helpers" { with-test } - "tezos-base-test-helpers" { with-test } - "qcheck-alcotest" { with-test } + "tezos-rpc-http" + "tezos-base-test-helpers" {with-test} + "tezos-test-helpers" {with-test} + "qcheck-alcotest" {with-test} + "alcotest-lwt" { with-test & >= "1.1.0" } ] build: [ ["dune" "build" "-p" name "-j" jobs] diff --git a/src/lib_rpc_http/tezos-rpc-http.opam b/src/lib_rpc_http/tezos-rpc-http.opam index 9be08f5f918e..bab5c6321c36 100644 --- a/src/lib_rpc_http/tezos-rpc-http.opam +++ b/src/lib_rpc_http/tezos-rpc-http.opam @@ -1,6 +1,6 @@ opam-version: "2.0" maintainer: "contact@tezos.com" -authors: [ "Tezos devteam" ] +authors: ["Tezos devteam"] homepage: "https://www.tezos.com/" bug-reports: "https://gitlab.com/tezos/tezos/issues" dev-repo: "git+https://gitlab.com/tezos/tezos.git" @@ -8,8 +8,6 @@ license: "MIT" depends: [ "dune" { >= "2.0" } "tezos-base" - "tezos-stdlib-unix" - "resto-directory" { >= "0.6" & < "0.7" } "resto-cohttp" { >= "0.6" & < "0.7" } ] build: [ diff --git a/src/lib_shell/bench/dune b/src/lib_shell/bench/dune index cdf3cc2708a7..e7157dee1f9a 100644 --- a/src/lib_shell/bench/dune +++ b/src/lib_shell/bench/dune @@ -1,27 +1,16 @@ -(executables +(tests (names bench_simple bench_tool) - (libraries tezos-base - tezos-shell - tezos-alpha-test-helpers - tezos-protocol-plugin-alpha) - (flags (:standard -open Tezos_base__TzPervasives - -open Tezos_shell - -open Tezos_protocol_alpha - -open Tezos_protocol_plugin_alpha - -open Tezos_protocol_alpha_parameters - -open Tezos_alpha_test_helpers))) - -(rule - (alias buildtest) - (deps bench_tool.exe bench_simple.exe) - (action progn)) - -(rule - (alias runbench_alpha_simple) - (deps bench_simple.exe) - (action (chdir %{workspace_root} (run %{exe:bench_simple.exe})))) - -(rule - (alias runbench_alpha) - (deps bench_tool.exe) - (action (chdir %{workspace_root} (run %{exe:bench_tool.exe})))) + (package tezos-shell) + (libraries + tezos-base + tezos-shell + tezos-alpha-test-helpers + tezos-protocol-plugin-alpha) + (flags + (:standard + -open Tezos_base__TzPervasives + -open Tezos_shell + -open Tezos_protocol_alpha + -open Tezos_protocol_plugin_alpha + -open Tezos_protocol_alpha_parameters + -open Tezos_alpha_test_helpers))) diff --git a/src/lib_shell/dune b/src/lib_shell/dune index b2f7080dc8a2..9faad3883dfd 100644 --- a/src/lib_shell/dune +++ b/src/lib_shell/dune @@ -1,34 +1,37 @@ (library (name tezos_shell) - (instrumentation (backend bisect_ppx)) (public_name tezos-shell) - (libraries lwt-watcher - lwt-canceler - tezos-base - tezos-version - tezos-context - tezos-store - tezos-shell-context - tezos-p2p - tezos-stdlib-unix - tezos-shell-services - tezos-p2p-services - tezos-protocol-updater - tezos-requester - tezos-workers - tezos-validation - lwt-exit) - (flags (:standard -open Tezos_base__TzPervasives - -open Tezos_base - -open Tezos_context - -open Tezos_store - -open Tezos_shell_context - -open Tezos_p2p - -open Tezos_stdlib_unix - -open Tezos_shell_services - -open Tezos_p2p_services - -open Tezos_protocol_updater - -open Tezos_requester - -open Tezos_workers - -open Tezos_validation - -open Tezos_version))) + (instrumentation (backend bisect_ppx)) + (libraries + lwt-watcher + lwt-canceler + tezos-base + tezos-version + tezos-context + tezos-store + tezos-shell-context + tezos-p2p + tezos-stdlib-unix + tezos-shell-services + tezos-p2p-services + tezos-protocol-updater + tezos-requester + tezos-workers + tezos-validation + lwt-exit) + (flags + (:standard + -open Tezos_base__TzPervasives + -open Tezos_base + -open Tezos_context + -open Tezos_store + -open Tezos_shell_context + -open Tezos_p2p + -open Tezos_stdlib_unix + -open Tezos_shell_services + -open Tezos_p2p_services + -open Tezos_protocol_updater + -open Tezos_requester + -open Tezos_workers + -open Tezos_validation + -open Tezos_version))) diff --git a/src/lib_shell/test/dune b/src/lib_shell/test/dune index ece12379f71d..7cc3108827a3 100644 --- a/src/lib_shell/test/dune +++ b/src/lib_shell/test/dune @@ -1,40 +1,44 @@ (executables - (names test_shell - test_locator - test_synchronisation_heuristic_fuzzy - test_prevalidation - test_prevalidator_classification - test_prevalidator_classification_handle_operations) - (libraries tezos-base - tezos-base-test-helpers - tezos-store - tezos-context - tezos-shell-context - tezos-p2p - tezos-p2p-services - tezos-protocol-updater - tezos-requester - tezos-shell - tezos-shell-services - tezos-embedded-protocol-demo-noops - tezos-stdlib-unix - tezos-validation - tezos-event-logging-test-helpers - tezos-test-helpers - alcotest-lwt) - (flags (:standard -open Tezos_base__TzPervasives - -open Tezos_base_test_helpers - -open Tezos_store - -open Tezos_context - -open Tezos_shell_context - -open Tezos_protocol_updater - -open Tezos_p2p - -open Tezos_p2p_services - -open Tezos_shell - -open Tezos_shell_services - -open Tezos_stdlib_unix - -open Tezos_validation - -open Tezos_event_logging_test_helpers))) + (names + test_shell + test_locator + test_synchronisation_heuristic_fuzzy + test_prevalidation + test_prevalidator_classification + test_prevalidator_classification_handle_operations) + (libraries + tezos-base + tezos-base-test-helpers + tezos-store + tezos-context + tezos-shell-context + tezos-p2p + tezos-p2p-services + tezos-protocol-updater + tezos-requester + tezos-shell + tezos-shell-services + tezos-embedded-protocol-demo-noops + tezos-stdlib-unix + tezos-validation + tezos-event-logging-test-helpers + tezos-test-helpers + alcotest-lwt) + (flags + (:standard + -open Tezos_base__TzPervasives + -open Tezos_base_test_helpers + -open Tezos_store + -open Tezos_context + -open Tezos_shell_context + -open Tezos_protocol_updater + -open Tezos_p2p + -open Tezos_p2p_services + -open Tezos_shell + -open Tezos_shell_services + -open Tezos_stdlib_unix + -open Tezos_validation + -open Tezos_event_logging_test_helpers))) (rule (alias runtest) diff --git a/src/lib_shell/tezos-shell.opam b/src/lib_shell/tezos-shell.opam index c9976038b939..ad38efafae0d 100644 --- a/src/lib_shell/tezos-shell.opam +++ b/src/lib_shell/tezos-shell.opam @@ -1,33 +1,35 @@ opam-version: "2.0" maintainer: "contact@tezos.com" -authors: [ "Tezos devteam" ] +authors: ["Tezos devteam"] homepage: "https://www.tezos.com/" bug-reports: "https://gitlab.com/tezos/tezos/issues" dev-repo: "git+https://gitlab.com/tezos/tezos.git" license: "MIT" depends: [ "dune" { >= "2.0" } + "lwt-watcher" { = "0.1" } + "lwt-canceler" { >= "0.3" & < "0.4" } "tezos-base" "tezos-version" - "tezos-p2p" "tezos-context" "tezos-store" + "tezos-shell-context" + "tezos-p2p" + "tezos-stdlib-unix" "tezos-shell-services" "tezos-p2p-services" "tezos-protocol-updater" - "tezos-validation" - "tezos-stdlib-unix" "tezos-requester" - "lwt-watcher" { = "0.1" } - "lwt-canceler" { >= "0.3" & < "0.4" } + "tezos-workers" + "tezos-validation" "lwt-exit" + "tezos-base-test-helpers" {with-test} + "tezos-embedded-protocol-demo-noops" {with-test} + "tezos-event-logging-test-helpers" {with-test} + "tezos-test-helpers" {with-test} "alcotest-lwt" { with-test & >= "1.1.0" } - "qcheck-alcotest" { with-test } - "tezos-test-helpers" { with-test } - "tezos-workers" - "tezos-embedded-protocol-demo-noops" { with-test } - "tezos-protocol-plugin-alpha" { with-test } - "tezos-base-test-helpers" { with-test } + "tezos-alpha-test-helpers" {with-test} + "tezos-protocol-plugin-alpha" {with-test} ] build: [ ["dune" "build" "-p" name "-j" jobs] -- GitLab