From 5bc3d14e06857f6443df2bd651ec32c606e5e072 Mon Sep 17 00:00:00 2001 From: Romain Bardou Date: Thu, 25 Nov 2021 10:17:43 +0100 Subject: [PATCH 1/4] Manifest: add .opam and dune file generator --- .gitignore | 1 + manifest/Makefile | 24 + manifest/main.ml | 3374 ++++++++++++++++++++++++++++++++++ manifest/main.mli | 28 + manifest/manifest.ml | 1308 +++++++++++++ manifest/manifest.mli | 603 ++++++ scripts/link_protocol.sh | 156 +- src/tooling/shellcheck_skips | 1 - 8 files changed, 5363 insertions(+), 132 deletions(-) create mode 100644 manifest/Makefile create mode 100644 manifest/main.ml create mode 100644 manifest/main.mli create mode 100644 manifest/manifest.ml create mode 100644 manifest/manifest.mli diff --git a/.gitignore b/.gitignore index d0baafc9b897..31145c53b6b2 100644 --- a/.gitignore +++ b/.gitignore @@ -19,6 +19,7 @@ __pycache__ /test_results +/manifest/manifest /tezos-node /tezos-validator /tezos-protocol-compiler diff --git a/manifest/Makefile b/manifest/Makefile new file mode 100644 index 000000000000..e8b718a91576 --- /dev/null +++ b/manifest/Makefile @@ -0,0 +1,24 @@ +# To be able to bootstrap this, we don't use any tool to build (not dune in particular). +# This allows to run this before make build-deps as long as OCaml is installed. + +SOURCE=manifest.mli manifest.ml main.mli main.ml + +.PHONY: all +all: manifest + ./manifest + +# We compile files in the _build directory. +# But we prepend them with an OCaml compiler directive that ensures +# error messages are localized in the source directory. +_build/%: % + @mkdir -p _build + echo "# 1 \"$*\"" > $@ + cat $* >> $@ + +manifest: $(foreach file, $(SOURCE), _build/$(file)) + ocamlc -bin-annot -g -w @1..3@5..28@30..39@43@46..47@49..57@61..62 \ + -I _build $^ -o manifest + +.PHONY: clean +clean: + rm -rf _build manifest diff --git a/manifest/main.ml b/manifest/main.ml new file mode 100644 index 000000000000..0fb46dccb647 --- /dev/null +++ b/manifest/main.ml @@ -0,0 +1,3374 @@ +(*****************************************************************************) +(* *) +(* Open Source License *) +(* Copyright (c) 2021 Nomadic Labs *) +(* *) +(* Permission is hereby granted, free of charge, to any person obtaining a *) +(* copy of this software and associated documentation files (the "Software"),*) +(* to deal in the Software without restriction, including without limitation *) +(* the rights to use, copy, modify, merge, publish, distribute, sublicense, *) +(* and/or sell copies of the Software, and to permit persons to whom the *) +(* Software is furnished to do so, subject to the following conditions: *) +(* *) +(* The above copyright notice and this permission notice shall be included *) +(* in all copies or substantial portions of the Software. *) +(* *) +(* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR*) +(* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *) +(* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL *) +(* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER*) +(* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING *) +(* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER *) +(* DEALINGS IN THE SOFTWARE. *) +(* *) +(*****************************************************************************) + +open Manifest + +(* EXTERNAL LIBS *) + +let alcotest = external_lib "alcotest" [At_least "1.5.0"] + +let alcotest_lwt = external_lib "alcotest-lwt" [At_least "1.5.0"] + +let astring = external_lib "astring" [] + +let bigstring = external_lib "bigstring" [] + +let bigstringaf = external_lib "bigstringaf" [At_least "0.2.0"] + +let bisect_ppx = opam_only "bisect_ppx" [At_least "2.7.0"] + +let bls12_381 = external_lib "bls12-381" [At_least "1.1.0"; Less_than "1.2.0"] + +let bls12_381_legacy = external_lib "bls12-381-legacy" [] + +let bls12_381_unix = external_lib "bls12-381-unix" [] + +let camlzip = external_lib "camlzip" [Exactly "1.10"] + +let caqti = external_lib "caqti" [] + +let caqti_lwt = external_lib "caqti-lwt" [] + +let caqti_driver_postgresql = external_lib "caqti-driver-postgresql" [] + +let cmdliner = external_lib "cmdliner" [] + +let cohttp_lwt_unix = external_lib "cohttp-lwt-unix" [At_least "2.2.0"] + +let compiler_libs_common = external_lib "compiler-libs.common" [] ~opam:"" + +let compiler_libs_optcomp = external_lib "compiler-libs.optcomp" [] ~opam:"" + +let compiler_libs_toplevel = external_lib "compiler-libs.toplevel" [] ~opam:"" + +let conf_libev = opam_only "conf-libev" [] + +let conf_rust = opam_only "conf-rust" [] + +let coq_of_ocaml = opam_only "coq-of-ocaml" [Exactly "2.5.0"] + +let ctypes = external_lib "ctypes" [] + +let ctypes_stubs = external_sublib ctypes "ctypes.stubs" + +let data_encoding = + external_lib "data-encoding" [At_least "0.4"; Less_than "0.5"] + +let digestif = external_lib "digestif" [At_least "0.7.3"] + +let digestif_c = external_sublib digestif "digestif.c" + +let dynlink = external_lib "dynlink" [] ~opam:"" + +let ezjsonm = external_lib "ezjsonm" [At_least "0.5.0"] + +let fmt = external_lib "fmt" [] + +let fmt_cli = external_sublib fmt "fmt.cli" + +let fmt_tty = external_sublib fmt "fmt.tty" + +let hacl_star = external_lib "hacl-star" [At_least "0.4.2"; Less_than "0.5"] + +let hacl_star_raw = external_lib "hacl-star-raw" [] + +let hacl_x25519 = external_lib "hacl_x25519" [] + +let hex = external_lib "hex" [] + +let index = external_lib "index" [At_least "1.3.0"] + +let integers = external_lib "integers" [] + +let ipaddr = external_lib "ipaddr" [At_least "5.0.0"; Less_than "6.0.0"] + +let ipaddr_unix = external_sublib ipaddr "ipaddr.unix" + +let irmin = external_lib "irmin" [At_least "2.8.0"] + +let irmin_pack = external_lib "irmin-pack" [At_least "2.8.0"] + +let irmin_pack_mem = external_sublib irmin_pack "irmin-pack.mem" + +let js_of_ocaml = external_lib "js_of_ocaml" [] + +let json_data_encoding = external_lib "json-data-encoding" [] + +let logs = external_lib "logs" [] + +let logs_fmt = external_sublib logs "logs.fmt" + +let lwt = external_lib "lwt" [At_least "5.4.0"] + +let lwt_canceler = external_lib "lwt-canceler" [At_least "0.3"; Less_than "0.4"] + +let lwt_exit = external_lib "lwt-exit" [] + +let lwt_log = external_lib "lwt_log" [] + +let lwt_log_core = external_sublib lwt_log "lwt_log.core" + +let lwt_unix = external_sublib lwt "lwt.unix" + +let lwt_watcher = external_lib "lwt-watcher" [Exactly "0.1"] + +let mtime = external_lib "mtime" [At_least "1.0.0"] + +let mtime_clock_os = external_sublib mtime "mtime.clock.os" + +let ocaml_migrate_parsetree = external_lib "ocaml-migrate-parsetree" [] + +let ocamlformat = opam_only "ocamlformat" [Exactly "0.18.0"] + +let ocamlgraph = external_lib "ocamlgraph" [] + +let ocplib_endian = external_lib "ocplib-endian" [] + +let ocplib_endian_bigstring = + external_sublib ocplib_endian "ocplib-endian.bigstring" + +let ocplib_ocamlres = + external_lib ~opam:"ocp-ocamlres" "ocplib-ocamlres" [At_least "0.4"] + +let parsexp = external_lib "parsexp" [] + +let ppx_blob = external_lib "ppx_blob" [] + +let ppx_inline_test = external_lib "ppx_inline_test" [] + +let ptime = external_lib "ptime" [At_least "0.8.4"] + +let ptime_clock_os = external_sublib ptime "ptime.clock.os" + +let pure_splitmix = external_lib "pure-splitmix" [Exactly "0.2"] + +let prbnmcn_stats = external_lib "prbnmcn-stats" [Exactly "0.0.2"] + +let prometheus_app = external_lib "prometheus-app" [] + +let prometheus_app_unix = external_sublib prometheus_app "prometheus-app.unix" + +let pyml = external_lib "pyml" [] + +let qcheck_alcotest = external_lib "qcheck-alcotest" [] + +let qcheck_core = external_lib "qcheck-core" [] + +let re = external_lib "re" [At_least "1.7.2"] + +let re_str = external_sublib re "re.str" + +let resto_version = Opam.[At_least "0.6"; Less_than "0.7"] + +let resto = external_lib "resto" resto_version + +let resto_acl = external_lib "resto-acl" resto_version + +let resto_cohttp = external_lib "resto-cohttp" resto_version + +let resto_cohttp_client = external_lib "resto-cohttp-client" resto_version + +let resto_cohttp_self_serving_client = + external_lib "resto-cohttp-self-serving-client" resto_version + +let resto_cohttp_server = external_lib "resto-cohttp-server" resto_version + +let resto_directory = external_lib "resto-directory" resto_version + +let ringo = external_lib "ringo" [Exactly "0.5"] + +let ringo_lwt = external_lib "ringo-lwt" [Exactly "0.5"] + +let secp256k1_internal = external_lib "secp256k1-internal" [] + +let str = external_lib "str" ~opam:"" [] + +let tar = external_lib "tar" [] + +let tar_unix = external_lib "tar-unix" [Exactly "1.1.0"] + +let tezos_rust_lib = opam_only "tezos-rust-libs" [Exactly "1.1"] + +let tls = external_lib "tls" [At_least "0.10"] + +let unix = external_lib ~opam:"base-unix" "unix" [] + +let uri = external_lib "uri" [] + +let utop = external_lib "utop" [At_least "2.8"] + +let uutf = external_lib "uutf" [] + +let vector = external_lib "vector" [] + +(* The signature of the [Z] module has changed in 1.12. *) +let zarith = external_lib "zarith" [At_least "1.12"; Less_than "1.13"] + +let zarith_stubs_js = external_lib "zarith_stubs_js" [] + +(* VENDORED LIBS *) + +let benchmark_utils = vendored_lib "benchmark-utils" + +let flextesa = vendored_lib "flextesa" + +let ledgerwallet_tezos = vendored_lib "ledgerwallet-tezos" + +let pyml_plot = vendored_lib "pyml-plot" + +(* PACKAGES THAT ARE NOT IMPLEMENTED YET *) + +(* For now we declare them as external packages just so that we can depend on them, + but their dune and .opam files are not yet generated. *) +let todo ?opam name = external_lib ?opam name [] + +let todo_sub lib sub = external_sublib lib sub + +let tezos_alpha_test_helpers = todo "tezos-alpha-test-helpers" + +let tezos_protocol_alpha_parameters = todo "tezos-protocol-alpha-parameters" + +let tezos_benchmarks_proto_alpha = todo "tezos-benchmarks-proto-alpha" + +(* PROTOCOL PACKAGES *) + +module Protocol : sig + type t + + val number : t -> int option + + (** Name without the number, e.g. "alpha" or "PsDELPH1". *) + val name : t -> string + + val main : t -> target + + val embedded : t -> target + + (** [embedded] does not fail, it's just that the optional version + composes better with [all_optionally]. *) + val embedded_opt : t -> target option + + val client : t -> target option + + val client_exn : t -> target + + val client_commands_registration : t -> target option + + val baking_commands_registration : t -> target option + + val plugin : t -> target option + + val plugin_exn : t -> target + + val plugin_registerer : t -> target option + + val genesis : t + + val demo_noops : t + + val alpha : t + + (** List of active protocols. *) + val active : t list + + (** Get packages to link. + + This takes a function that selects packages from a protocol. + For instance, the node wants the embedded protocol and the plugin registerer, + while the client wants the client commands etc. + + The result is the list of all such packages that exist. + All of them are optional dependencies. *) + val all_optionally : (t -> target option) list -> target list +end = struct + type t = { + number : int option; + name : string; + main : target; + embedded : target; + client : target option; + client_commands : target option; + client_commands_registration : target option; + baking_commands_registration : target option; + plugin : target option; + plugin_registerer : target option; + } + + let make ?number ?client ?client_commands ?client_commands_registration + ?baking_commands_registration ?plugin ?plugin_registerer ~name ~main + ~embedded () = + { + number; + name; + main; + embedded; + client; + client_commands; + client_commands_registration; + baking_commands_registration; + plugin; + plugin_registerer; + } + + let all_rev : t list ref = ref [] + + (* Add to the [Protocol.add] list used to link in the node, client, etc. + Returns the protocol for easier composability. *) + let register protocol = + all_rev := protocol :: !all_rev ; + protocol + + let mandatory what {main; _} = function + | None -> + failwith + ("protocol " ^ name_for_errors main ^ " has no " ^ what ^ " package") + | Some x -> x + + let number p = p.number + + let name p = p.name + + let main p = p.main + + let embedded p = p.embedded + + let embedded_opt p = Some p.embedded + + let client p = p.client + + let client_exn p = mandatory "client" p p.client + + let client_commands_registration p = p.client_commands_registration + + let baking_commands_registration p = p.baking_commands_registration + + let plugin p = p.plugin + + let plugin_exn p = mandatory "plugin" p p.plugin + + let plugin_registerer p = p.plugin_registerer + + let genesis = + register + @@ make + ~name:"genesis" + ~main:(todo "tezos-protocol-genesis") + ~embedded:(todo "tezos-embedded-protocol-genesis") + ~client:(todo "tezos-client-genesis") + () + + let _genesis_carthagenet = + register + @@ make + ~name:"genesis-carthagenet" + ~main:(todo "tezos-protocol-genesis-carthagenet") + ~embedded:(todo "tezos-embedded-protocol-genesis-carthagenet") + ~client:(todo "tezos-client-genesis-carthagenet") + () + + let demo_noops = + register + @@ make + ~name:"demo-noops" + ~main:(todo "tezos-protocol-demo-noops") + ~embedded:(todo "tezos-embedded-protocol-demo-noops") + () + + let _demo_counter = + register + @@ make + ~name:"demo-counter" + ~main:(todo "tezos-protocol-demo-counter") + ~embedded:(todo "tezos-embedded-protocol-demo-counter") + ~client:(todo "tezos-client-demo-counter") + () + + let _000_Ps9mPmXa = + register + @@ make + ~number:000 + ~name:"Ps9mPmXa" + ~main:(todo "tezos-protocol-000-Ps9mPmXa") + ~embedded:(todo "tezos-embedded-protocol-000-Ps9mPmXa") + ~client:(todo "tezos-client-000-Ps9mPmXa") + () + + let _001_PtCJ7pwo = + let client_commands = todo "tezos-client-001-PtCJ7pwo-commands" in + register + @@ make + ~number:001 + ~name:"PtCJ7pwo" + ~main:(todo "tezos-protocol-001-PtCJ7pwo") + ~embedded:(todo "tezos-embedded-protocol-001-PtCJ7pwo") + ~client:(todo "tezos-client-001-PtCJ7pwo") + ~client_commands + ~client_commands_registration: + (todo_sub + client_commands + "tezos-client-001-PtCJ7pwo-commands.registration") + () + + let _002_PsYLVpVv = + let client_commands = todo "tezos-client-002-PsYLVpVv-commands" in + register + @@ make + ~number:002 + ~name:"PsYLVpVv" + ~main:(todo "tezos-protocol-002-PsYLVpVv") + ~embedded:(todo "tezos-embedded-protocol-002-PsYLVpVv") + ~client:(todo "tezos-client-002-PsYLVpVv") + ~client_commands + ~client_commands_registration: + (todo_sub + client_commands + "tezos-client-002-PsYLVpVv-commands.registration") + () + + let _003_PsddFKi3 = + let client_commands = todo "tezos-client-003-PsddFKi3-commands" in + register + @@ make + ~number:003 + ~name:"PsddFKi3" + ~main:(todo "tezos-protocol-003-PsddFKi3") + ~embedded:(todo "tezos-embedded-protocol-003-PsddFKi3") + ~client:(todo "tezos-client-003-PsddFKi3") + ~client_commands + ~client_commands_registration: + (todo_sub + client_commands + "tezos-client-003-PsddFKi3-commands.registration") + () + + let _004_Pt24m4xi = + let client_commands = todo "tezos-client-004-Pt24m4xi-commands" in + register + @@ make + ~number:004 + ~name:"Pt24m4xi" + ~main:(todo "tezos-protocol-004-Pt24m4xi") + ~embedded:(todo "tezos-embedded-protocol-004-Pt24m4xi") + ~client:(todo "tezos-client-004-Pt24m4xi") + ~client_commands + ~client_commands_registration: + (todo_sub + client_commands + "tezos-client-004-Pt24m4xi-commands.registration") + () + + let _005_PsBABY5H = + register + @@ make + ~number:005 + ~name:"PsBABY5H" + ~main:(todo "tezos-protocol-005-PsBABY5H") + ~embedded:(todo "tezos-embedded-protocol-005-PsBABY5H") + () + + let _005_PsBabyM1 = + let client_commands = todo "tezos-client-005-PsBabyM1-commands" in + register + @@ make + ~number:005 + ~name:"PsBabyM1" + ~main:(todo "tezos-protocol-005-PsBabyM1") + ~embedded:(todo "tezos-embedded-protocol-005-PsBabyM1") + ~client:(todo "tezos-client-005-PsBabyM1") + ~client_commands + ~client_commands_registration: + (todo_sub + client_commands + "tezos-client-005-PsBabyM1-commands.registration") + () + + let _006_PsCARTHA = + let client_commands = todo "tezos-client-006-PsCARTHA-commands" in + register + @@ make + ~number:006 + ~name:"PsCARTHA" + ~main:(todo "tezos-protocol-006-PsCARTHA") + ~embedded:(todo "tezos-embedded-protocol-006-PsCARTHA") + ~client:(todo "tezos-client-006-PsCARTHA") + ~client_commands + ~client_commands_registration: + (todo_sub + client_commands + "tezos-client-006-PsCARTHA-commands.registration") + () + + (* Starting from 007, all protocols follow the current conventions. *) + + (* Note the -registration instead of .registration, compared to previous protocols: + the client command registration library is in a separate opam package. *) + + let make_modern ?number name = + let full_name = + match number with + | None -> name + | Some number -> Printf.sprintf "%03d-%s" number name + in + let todo x = Printf.ksprintf todo x in + let todo_sub parent x = Printf.ksprintf (todo_sub parent) x in + let baking_commands = todo "tezos-baking-%s-commands" full_name in + make + ?number + ~name + ~main:(todo "tezos-protocol-%s" full_name) + ~embedded:(todo "tezos-embedded-protocol-%s" full_name) + ~client:(todo "tezos-client-%s" full_name) + ~client_commands:(todo "tezos-client-%s-commands" full_name) + ~client_commands_registration: + (todo "tezos-client-%s-commands-registration" full_name) + ~baking_commands_registration: + (todo_sub + baking_commands + "tezos-baking-%s-commands.registration" + full_name) + ~plugin:(todo "tezos-protocol-plugin-%s" full_name) + ~plugin_registerer:(todo "tezos-protocol-plugin-%s-registerer" full_name) + () + + let active ?number name = register @@ make_modern ?number name + + let frozen ?number name = + let p = make_modern ?number name in + register {p with baking_commands_registration = None} + + let overridden ?number name = + let p = make_modern ?number name in + register + { + p with + client = None; + client_commands = None; + client_commands_registration = None; + baking_commands_registration = None; + plugin = None; + plugin_registerer = None; + } + + let _007_PsDELPH1 = frozen ~number:007 "PsDELPH1" + + let _008_PtEdoTez = overridden ~number:008 "PtEdoTez" + + let _008_PtEdo2Zk = frozen ~number:008 "PtEdo2Zk" + + let _009_PsFLoren = frozen ~number:009 "PsFLoren" + + let _010_PtGRANAD = frozen ~number:010 "PtGRANAD" + + let _011_PtHangz2 = active ~number:011 "PtHangz2" + + let _012_PsiThaCa = active ~number:012 "PsiThaCa" + + let alpha = active "alpha" + + let all = List.rev !all_rev + + let active = List.filter (fun p -> p.baking_commands_registration <> None) all + + let all_optionally (get_packages : (t -> target option) list) = + let get_all_packages_for_protocol_package_type + (get_package : t -> target option) = + List.map (fun protocol -> Option.to_list (get_package protocol)) all + |> List.flatten + in + List.map get_all_packages_for_protocol_package_type get_packages + |> List.flatten |> List.map optional +end + +(* INTERNAL LIBS *) + +let tezos_test_helpers = + public_lib + "tezos-test-helpers" + ~path:"src/lib_test" + ~internal_name:"lib_test" + ~synopsis:"Tezos-agnostic test helpers" + ~deps:[uri; fmt; qcheck_alcotest; alcotest; lwt; pure_splitmix] + ~js_of_ocaml:[] + ~linkall:true + ~dune: + Dune. + [ + (* This rule is necessary for `make lint-tests-pkg`, without it dune + complains that the alias is empty. *) + alias_rule "runtest_js" ~action:(S "progn"); + ] + +let tezos_stdlib = + public_lib + "tezos-stdlib" + ~path:"src/lib_stdlib" + ~synopsis:"Tezos: yet-another local-extension of the OCaml standard library" + ~deps:[hex; zarith; zarith_stubs_js; lwt] + ~js_of_ocaml:[] + ~inline_tests:true + ~preprocess:[PPS ppx_inline_test] + +let _tezos_stdlib_tests = + tests + [ + "test_bits"; + "test_tzList"; + "test_bounded_heap"; + "test_tzString"; + "test_fallbackArray"; + "test_functionalArray"; + ] + ~path:"src/lib_stdlib/test" + ~opam:"src/lib_stdlib/tezos-stdlib" + ~modes:[Native; JS] + ~deps: + [tezos_stdlib; alcotest; bigstring; tezos_test_helpers; qcheck_alcotest] + ~opens:["Tezos_stdlib"] + ~dune: + Dune. + [ + runtest_js ~package:"tezos-stdlib" ~name:"test_bits"; + runtest_js ~package:"tezos-stdlib" ~name:"test_tzList"; + runtest_js ~package:"tezos-stdlib" ~name:"test_bounded_heap"; + runtest_js ~package:"tezos-stdlib" ~name:"test_tzString"; + runtest_js ~package:"tezos-stdlib" ~name:"test_fallbackArray"; + runtest_js ~package:"tezos-stdlib" ~name:"test_functionalArray"; + ] + +let _tezos_stdlib_unix_tests = + tests + ["test_lwt_pipe"; "test_circular_buffer"; "test_circular_buffer_fuzzy"] + ~path:"src/lib_stdlib/test-unix" + ~opam:"src/lib_stdlib/tezos-stdlib" + ~deps: + [ + tezos_stdlib; + alcotest; + alcotest_lwt; + lwt_log; + bigstring; + lwt_unix; + tezos_test_helpers; + qcheck_alcotest; + ] + ~opens:["Tezos_stdlib"] + +let tezos_lwt_result_stdlib_bare_functor_outputs = + public_lib + "tezos-lwt-result-stdlib.bare.functor-outputs" + ~path:"src/lib_lwt_result_stdlib/bare/functor_outputs" + ~opam:"src/lib_lwt_result_stdlib/tezos-lwt-result-stdlib" + ~internal_name:"bare_functor_outputs" + ~js_of_ocaml:[] + ~deps:[lwt] + +let tezos_lwt_result_stdlib_bare_sigs = + public_lib + "tezos-lwt-result-stdlib.bare.sigs" + ~path:"src/lib_lwt_result_stdlib/bare/sigs" + ~opam:"src/lib_lwt_result_stdlib/tezos-lwt-result-stdlib" + ~internal_name:"bare_sigs" + ~js_of_ocaml:[] + ~deps:[lwt; tezos_lwt_result_stdlib_bare_functor_outputs] + +let tezos_lwt_result_stdlib_bare_structs = + public_lib + "tezos-lwt-result-stdlib.bare.structs" + ~path:"src/lib_lwt_result_stdlib/bare/structs" + ~opam:"src/lib_lwt_result_stdlib/tezos-lwt-result-stdlib" + ~internal_name:"bare_structs" + ~js_of_ocaml:[] + ~deps:[lwt; tezos_lwt_result_stdlib_bare_sigs] + +let tezos_lwt_result_stdlib_traced_functor_outputs = + public_lib + "tezos-lwt-result-stdlib.traced.functor-outputs" + ~path:"src/lib_lwt_result_stdlib/traced/functor_outputs" + ~opam:"src/lib_lwt_result_stdlib/tezos-lwt-result-stdlib" + ~internal_name:"traced_functor_outputs" + ~js_of_ocaml:[] + ~deps:[lwt; tezos_lwt_result_stdlib_bare_sigs] + +let tezos_lwt_result_stdlib_traced_sigs = + public_lib + "tezos-lwt-result-stdlib.traced.sigs" + ~path:"src/lib_lwt_result_stdlib/traced/sigs" + ~opam:"src/lib_lwt_result_stdlib/tezos-lwt-result-stdlib" + ~internal_name:"traced_sigs" + ~js_of_ocaml:[] + ~deps: + [ + lwt; + tezos_lwt_result_stdlib_bare_sigs; + tezos_lwt_result_stdlib_bare_structs; + tezos_lwt_result_stdlib_traced_functor_outputs; + ] + +let tezos_lwt_result_stdlib_traced_structs = + public_lib + "tezos-lwt-result-stdlib.traced.structs" + ~path:"src/lib_lwt_result_stdlib/traced/structs" + ~opam:"src/lib_lwt_result_stdlib/tezos-lwt-result-stdlib" + ~internal_name:"traced_structs" + ~js_of_ocaml:[] + ~deps: + [ + lwt; + tezos_lwt_result_stdlib_traced_sigs; + tezos_lwt_result_stdlib_bare_structs; + ] + +let tezos_lwt_result_stdlib = + public_lib + "tezos-lwt-result-stdlib" + ~path:"src/lib_lwt_result_stdlib" + ~synopsis:"Tezos: error-aware stdlib replacement" + ~ocaml:[At_least "4.07"] + ~js_of_ocaml:[] + ~deps: + [ + lwt; + tezos_lwt_result_stdlib_bare_sigs; + tezos_lwt_result_stdlib_bare_structs; + tezos_lwt_result_stdlib_traced_sigs; + tezos_lwt_result_stdlib_traced_structs; + ] + +let tezos_lwt_result_stdlib_examples_traces = + public_lib + "tezos-lwt-result-stdlib.examples.traces" + ~path:"src/lib_lwt_result_stdlib/examples/traces" + ~opam:"src/lib_lwt_result_stdlib/tezos-lwt-result-stdlib" + ~internal_name:"traces" + ~deps: + [ + lwt; + tezos_lwt_result_stdlib_bare_structs; + tezos_lwt_result_stdlib_traced_sigs; + ] + +let _tezos_lwt_result_stdlib_tests = + tests + [ + "test_hashtbl"; + "test_list_basic"; + "test_seq_basic"; + "test_generic"; + "test_fuzzing_seq"; + "test_fuzzing_list"; + "test_fuzzing_set"; + "test_fuzzing_seq_tiered"; + "test_fuzzing_option"; + ] + ~path:"src/lib_lwt_result_stdlib/test" + ~opam:"src/lib_lwt_result_stdlib/tezos-lwt-result-stdlib" + ~deps: + [ + tezos_lwt_result_stdlib; + tezos_lwt_result_stdlib_examples_traces; + lwt_unix; + alcotest_lwt; + qcheck_alcotest; + tezos_test_helpers; + ] + ~opens:["Tezos_lwt_result_stdlib"] + +let tezos_error_monad = + public_lib + "tezos-error-monad" + ~path:"src/lib_error_monad" + ~synopsis:"Tezos: error monad" + ~ocaml:[At_least "4.07"] + ~deps: + [tezos_stdlib; data_encoding; lwt_canceler; lwt; tezos_lwt_result_stdlib] + ~js_of_ocaml:[] + ~opens:["Tezos_stdlib"; "Data_encoding"] + +(* NOTE: tezos_*_glue are virtual packages; + either the unix or js implementation must be installed. *) +let tezos_hacl_glue = + public_lib + "tezos-hacl-glue" + ~path:"src/lib_hacl_glue/virtual" + ~synopsis:"Tezos: thin layer of glue around hacl-star (virtual package)" + ~virtual_modules:["hacl"] + +let tezos_hacl_glue_unix = + public_lib + "tezos-hacl-glue-unix" + ~path:"src/lib_hacl_glue/unix" + ~synopsis:"Tezos: thin layer of glue around hacl-star (unix implementation)" + ~implements:tezos_hacl_glue + ~deps:[hacl_star; hacl_star_raw] + ~conflicts:[hacl_x25519] + +let _tezos_hacl_glue_unix_tests = + tests + ["test_hacl"; "test_prop_hacl_hash"; "test_prop_signature_pk"] + ~path:"src/lib_hacl_glue/unix/test" + ~opam:"src/lib_hacl_glue/unix/tezos-hacl-glue-unix" + ~deps: + [ + tezos_stdlib; + tezos_error_monad; + zarith; + zarith_stubs_js; + tezos_hacl_glue; + tezos_hacl_glue_unix; + data_encoding; + qcheck_alcotest; + tezos_test_helpers; + ] + ~modes:[Native] + ~js_of_ocaml:[] + ~opens: + [ + "Tezos_stdlib"; + "Tezos_error_monad.TzLwtreslib"; + "Data_encoding"; + "Tezos_hacl_glue"; + ] + +let hacl_star_raw_empty = + public_lib + "hacl-star-raw-empty" + ~path:"src/lib_hacl_glue/js/src" + ~opam:"src/lib_hacl_glue/js/hacl-star-raw-empty" + ~synopsis:"Tezos: thin layer of glue around hacl-star (javascript version)" + ~modules:[] + ~foreign_stubs:{language = C; flags = []; names = ["hacl_star"]} + +let tezos_hacl_glue_js = + public_lib + "tezos-hacl-glue-js" + ~path:"src/lib_hacl_glue/js/src" + ~opam:"src/lib_hacl_glue/js/tezos-hacl-glue-js" + ~synopsis:"Tezos: thin layer of glue around hacl-star (javascript version)" + ~implements:tezos_hacl_glue + ~deps:[hacl_star_raw_empty] + ~js_of_ocaml:[[S "javascript_files"; S "hacl_stubs.js"]] + ~opam_only_deps: + [(* Build dependency for users of the library. *) js_of_ocaml] + ~modules:["hacl"] + +(* We use virtual libraries, and want to compile the same test with + unix and js. In order to do this, we copy tests from the unix + directory and change the library providing the implementation of + the virtual lib (tezos-hacl-glue-js) *) +let _tezos_hacl_glue_js_tests_1 = + test_exes + ["test_hacl"; "test_prop_signature_pk"] + ~path:"src/lib_hacl_glue/js/test" + ~opam:"src/lib_hacl_glue/js/tezos-hacl-glue-js" + ~modes:[JS] + ~deps: + [ + tezos_stdlib; + tezos_error_monad; + zarith; + zarith_stubs_js; + tezos_hacl_glue; + tezos_hacl_glue_js; + data_encoding; + qcheck_alcotest; + tezos_test_helpers; + ] + ~all_modules_except:["test"] + ~opens: + [ + "Tezos_stdlib"; + "Tezos_error_monad.TzLwtreslib"; + "Data_encoding"; + "Tezos_hacl_glue"; + ] + +let _tezos_hacl_glue_js_tests_2 = + test_exe + "test" + ~path:"src/lib_hacl_glue/js/test" + ~opam:"src/lib_hacl_glue/js/tezos-hacl-glue-js" + ~modes:[JS] + ~deps:[tezos_hacl_glue_js] + ~modules:["test"] + ~dune: + (let open Dune in + let copy file = + [ + S "rule"; + [ + S "action"; + [S "copy"; S ("../../unix/test/" ^ file); S (file ^ ".from-unix")]; + ]; + ] + in + let diff file = + alias_rule + "runtest_js" + ~action:[S "diff"; S file; S (file ^ ".from-unix")] + in + let runtest hacl = + alias_rule + "runtest_js" + ~package:"tezos-hacl-glue-js" + ~deps:["../.npmrc"; "../package.json"; "../package-lock.json"] + ~action: + [ + S "progn"; + [S "run"; S "npm"; S "install"; S "hacl-wasm"]; + [ + S "run"; + S "%{dep:../../../tooling/node_wrapper.exe}"; + S "--hacl"; + S ("%{dep:./" ^ hacl ^ ".bc.js}"); + ]; + ] + in + [ + copy "test_hacl.ml"; + copy "vectors_p256.ml"; + copy "test_prop_signature_pk.ml"; + diff "test_hacl.ml"; + diff "vectors_p256.ml"; + diff "test_prop_signature_pk.ml"; + runtest "test"; + runtest "test_hacl"; + runtest "test_prop_signature_pk"; + ]) + +let _tezos_error_monad_tests = + test + "test_registration" + ~path:"src/lib_error_monad/test" + ~opam:"src/lib_error_monad/tezos-error-monad" + ~modes:[Native; JS] + ~deps:[tezos_error_monad; data_encoding; alcotest] + ~opens:["Tezos_error_monad"] + ~dune: + Dune. + [ + (* Idea: we could automatically generate this from the fact that + ~modes contains JS *) + runtest_js ~package:"tezos-error-monad" ~name:"test_registration"; + ] + +let tezos_rpc = + public_lib + "tezos-rpc" + ~path:"src/lib_rpc" + ~synopsis: + "Tezos: library of auto-documented RPCs (service and hierarchy \ + descriptions)" + ~deps:[data_encoding; tezos_error_monad; resto; resto_directory] + ~opens:["Data_encoding"; "Tezos_error_monad"] + +let tezos_crypto = + public_lib + "tezos-crypto" + ~path:"src/lib_crypto" + ~synopsis: + "Tezos: library with all the cryptographic primitives used by Tezos" + ~deps: + [ + data_encoding; + tezos_lwt_result_stdlib; + lwt; + tezos_hacl_glue; + secp256k1_internal; + tezos_error_monad; + tezos_rpc; + tezos_stdlib; + ringo; + zarith; + zarith_stubs_js; + ] + ~opens: + [ + "Tezos_stdlib"; + "Data_encoding"; + "Tezos_error_monad"; + "Tezos_error_monad.TzLwtreslib"; + "Tezos_rpc"; + ] + +let _tezos_crypto_tests = + tests + ["test_run"; "test_prop_signature"] + ~path:"src/lib_crypto/test" + ~opam:"src/lib_crypto/tezos-crypto" + ~deps: + [ + tezos_crypto; + tezos_stdlib; + zarith; + zarith_stubs_js; + tezos_hacl_glue_unix; + data_encoding; + alcotest; + alcotest_lwt; + lwt_unix; + qcheck_alcotest; + tezos_test_helpers; + ] + ~opens: + [ + "Tezos_stdlib"; + "Tezos_crypto"; + "Tezos_error_monad.TzLwtreslib"; + "Data_encoding"; + ] + +let tezos_event_logging = + public_lib + "tezos-event-logging" + ~path:"src/lib_event_logging" + ~synopsis:"Tezos event logging library" + ~deps: + [ + tezos_stdlib; + data_encoding; + tezos_error_monad; + tezos_lwt_result_stdlib; + lwt_log_core; + ] + ~js_of_ocaml:[] + ~opens: + [ + "Tezos_stdlib"; + "Data_encoding"; + "Tezos_error_monad"; + "Tezos_error_monad.TzLwtreslib"; + ] + +let tezos_event_logging_test_helpers = + public_lib + "tezos-event-logging-test-helpers" + ~path:"src/lib_event_logging/test_helpers" + ~synopsis:"Tezos: test helpers for the event logging library" + ~deps: + [ + tezos_stdlib; + tezos_lwt_result_stdlib; + data_encoding; + tezos_error_monad; + tezos_event_logging; + tezos_test_helpers; + alcotest; + ] + ~js_of_ocaml:[] + ~linkall:true + ~opens: + [ + "Tezos_error_monad"; + "Tezos_error_monad.TzLwtreslib"; + "Tezos_event_logging"; + ] + ~bisect_ppx:false + +let tezos_stdlib_unix = + public_lib + "tezos-stdlib-unix" + ~path:"src/lib_stdlib_unix" + ~synopsis: + "Tezos: yet-another local-extension of the OCaml standard library \ + (unix-specific fragment)" + ~deps: + [ + unix; + data_encoding; + tezos_error_monad; + tezos_lwt_result_stdlib; + tezos_event_logging; + tezos_stdlib; + lwt_unix; + ipaddr_unix; + re; + ptime; + ptime_clock_os; + mtime; + mtime_clock_os; + lwt_log; + conf_libev; + ] + ~opens: + [ + "Tezos_error_monad"; + "Tezos_error_monad.TzLwtreslib"; + "Tezos_event_logging"; + "Tezos_stdlib"; + "Data_encoding"; + ] + +let tezos_clic = + public_lib + "tezos-clic" + ~path:"src/lib_clic" + ~synopsis: + "Tezos: library of auto-documented command-line-parsing combinators" + ~deps:[tezos_stdlib; lwt; re; tezos_error_monad; tezos_lwt_result_stdlib] + ~opens: + ["Tezos_stdlib"; "Tezos_error_monad"; "Tezos_error_monad.TzLwtreslib"] + +let tezos_clic_unix = + public_lib + "tezos-clic.unix" + ~path:"src/lib_clic/unix" + ~opam:"src/lib_clic/tezos-clic" + ~deps: + [ + tezos_clic; tezos_stdlib_unix; tezos_error_monad; tezos_lwt_result_stdlib; + ] + ~opens: + [ + "Tezos_stdlib"; + "Tezos_clic"; + "Tezos_error_monad"; + "Tezos_error_monad.TzLwtreslib"; + ] + +let _tezos_clic_tests = + test + "test_clic" + ~path:"src/lib_clic/test" + ~opam:"src/lib_clic/tezos-clic" + ~deps:[tezos_clic; alcotest_lwt] + ~opens:["Tezos_stdlib"; "Tezos_clic"] + +let tezos_micheline = + public_lib + "tezos-micheline" + ~path:"src/lib_micheline" + ~synopsis:"Tezos: internal AST and parser for the Michelson language" + ~deps: + [ + uutf; + zarith; + zarith_stubs_js; + tezos_stdlib; + tezos_error_monad; + data_encoding; + ] + ~js_of_ocaml:[] + ~opens:["Tezos_stdlib"; "Tezos_error_monad"; "Data_encoding"] + ~inline_tests:true + ~preprocess:[PPS ppx_inline_test] + +let _tezos_micheline_tests = + tests + ["test_parser"; "test_diff"] + ~path:"src/lib_micheline/test" + ~opam:"src/lib_micheline/tezos-micheline" + ~modes:[Native; JS] + ~deps:[tezos_micheline; alcotest] + ~opens:["Tezos_micheline"] + ~dune: + Dune. + [ + runtest_js ~package:"tezos-micheline" ~name:"test_parser"; + runtest_js ~package:"tezos-micheline" ~name:"test_diff"; + ] + +let tezos_base = + public_lib + "tezos-base" + ~path:"src/lib_base" + ~synopsis:"Tezos: meta-package and pervasive type definitions for Tezos" + ~deps: + [ + tezos_stdlib; + tezos_crypto; + data_encoding; + tezos_error_monad; + tezos_event_logging; + tezos_rpc; + tezos_clic; + tezos_micheline; + ptime; + ezjsonm; + lwt; + ipaddr; + ] + ~opens: + [ + "Tezos_stdlib"; + "Tezos_crypto"; + "Data_encoding"; + "Tezos_error_monad"; + "Tezos_error_monad.TzLwtreslib"; + "Tezos_rpc"; + "Tezos_clic"; + "Tezos_micheline"; + "Tezos_event_logging"; + ] + ~dune:Dune.[ocamllex "point_parser"] + +(* tezos-crypto depends on the tezos glue packages that + are dune virtual packages and require an implementation. + tezos-base.unix is used in many executables as a proxy to + force linking of the unix implementation of the tezos crypto libraries. *) +let tezos_base_unix = + public_lib + "tezos-base.unix" + ~path:"src/lib_base/unix" + ~opam:"src/lib_base/tezos-base" + ~deps: + [ + data_encoding; + tezos_crypto; + bls12_381_unix; + tezos_hacl_glue_unix (* unix implementation of hacl *); + tezos_base; + tezos_stdlib; + tezos_stdlib_unix; + tezos_error_monad; + ] + ~opens: + [ + "Tezos_error_monad"; + "Tezos_crypto"; + "Tezos_base"; + "Tezos_stdlib"; + "Tezos_stdlib_unix"; + "Data_encoding"; + ] + +let lib_base_tests ?dep_files names = + tests + names + ~path:"src/lib_base/test" + ~opam:"src/lib_base/tezos-base" + ~deps: + [ + tezos_base; + tezos_base_unix; + data_encoding; + qcheck_alcotest; + tezos_test_helpers; + ] + ?dep_files + ~opens:["Tezos_base"; "Tezos_error_monad"] + ~modules:names + +let _tezos_base_tests_1 = lib_base_tests ["test_time"; "test_protocol"] + +let _tezos_base_tests_2 = + lib_base_tests ["test_p2p_addr"] ~dep_files:["points.ok"; "points.ko"] + +let _tezos_base_unix_tests = + test + "test_unix_error" + ~path:"src/lib_base/unix/test" + ~opam:"src/lib_base/tezos-base" + ~deps:[tezos_base_unix; data_encoding; tezos_test_helpers; qcheck_alcotest] + ~opens:["Tezos_base"; "Tezos_base_unix"; "Tezos_error_monad"] + +let tezos_base_test_helpers = + public_lib + "tezos-base-test-helpers" + ~path:"src/lib_base/test_helpers" + ~synopsis:"Tezos: Tezos base test helpers" + ~deps: + [ + tezos_base; + tezos_stdlib_unix; + tezos_event_logging_test_helpers; + tezos_test_helpers; + alcotest; + alcotest_lwt; + qcheck_alcotest; + ] + ~linkall:true + ~opens:["Tezos_base__TzPervasives"] + ~bisect_ppx:false + +let tezos_version = + public_lib + "tezos-version" + ~path:"src/lib_version" + ~synopsis:"Tezos: version information generated from Git" + ~deps:[tezos_base] + ~opens:["Tezos_base__TzPervasives"] + ~dune: + Dune. + [ + (* Ensures the hash updates whenever a source file is modified. *) + [ + S "rule"; + [S "targets"; S "generated_git_info.ml"]; + [S "deps"; [S "universe"]; [S ":script"; S "get-git-info.mlt"]]; + [ + S "action"; + [ + S "with-stdout-to"; + S "%{targets}"; + [S "run"; S "%{ocaml}"; S "unix.cma"; S "%{script}"]; + ]; + ]; + ]; + ] + +let tezos_p2p_services = + public_lib + "tezos-p2p-services" + ~path:"src/lib_p2p_services" + ~synopsis:"Tezos: descriptions of RPCs exported by `tezos-p2p`" + ~deps:[tezos_base] + ~opens:["Tezos_base__TzPervasives"] + ~linkall:true + +let tezos_workers = + public_lib + "tezos-workers" + ~path:"src/lib_workers" + ~synopsis:"Tezos: worker library" + ~deps:[tezos_base; tezos_stdlib_unix; ringo] + ~opens:["Tezos_base__TzPervasives"; "Tezos_base"; "Tezos_stdlib_unix"] + +let tezos_shell_services = + public_lib + "tezos-shell-services" + ~path:"src/lib_shell_services" + ~synopsis:"Tezos: descriptions of RPCs exported by `tezos-shell`" + ~deps: + [ + tezos_base; + tezos_workers; + tezos_stdlib_unix; + tezos_p2p_services; + tezos_version; + ] + ~opens: + [ + "Tezos_base__TzPervasives"; + "Tezos_base"; + "Tezos_p2p_services"; + "Tezos_version"; + ] + ~linkall:true + +let _tezos_shell_services_tests = + test + "test" + ~path:"src/lib_shell_services/test" + ~opam:"src/lib_shell_services/tezos-shell-services" + ~deps: + [ + tezos_base; + tezos_base_unix; + tezos_stdlib_unix; + tezos_shell_services; + alcotest_lwt; + ] + ~opens: + ["Tezos_base__TzPervasives"; "Tezos_stdlib_unix"; "Tezos_shell_services"] + +let tezos_shell_services_test_helpers = + public_lib + "tezos-shell-services-test-helpers" + ~path:"src/lib_shell_services/test_helpers" + ~synopsis:"Tezos: Tezos shell_services test helpers" + ~deps:[tezos_base; tezos_shell_services; tezos_test_helpers; qcheck_core] + ~bisect_ppx:false + ~opens:["Tezos_base__TzPervasives"] + ~linkall:true + +let _tezos_shell_service_test_helpers_tests = + test + "test_block_services" + ~path:"src/lib_shell_services/test_helpers/test" + ~opam: + "src/lib_shell_services/test_helpers/tezos-shell-services-test-helpers" + ~deps: + [ + tezos_base; + tezos_base_unix; + tezos_test_helpers; + tezos_shell_services; + tezos_shell_services_test_helpers; + qcheck_alcotest; + alcotest_lwt; + ] + ~opens:["Tezos_base__TzPervasives"] + +let tezos_tooling = + public_lib + "tezos-tooling" + ~path:"src/tooling" + ~synopsis:"Tezos: tooling for the project" + ~modules:[] + ~dune: + Dune. + [ + [ + S "install"; + [S "package"; S "tezos-tooling"]; + [S "section"; S "libexec"]; + [S "files"; [S "lint.sh"; S "as"; S "lint.sh"]]; + ]; + ] + +let _tezos_tooling_js_inline_tests = + test_exe + "run_js_inline_tests" + ~path:"src/tooling" + ~opam:"src/tooling/tezos-tooling" + ~modules:["run_js_inline_tests"] + ~deps:[parsexp; unix] + +let tezos_p2p = + public_lib + "tezos-p2p" + ~path:"src/lib_p2p" + ~synopsis:"Tezos: library for a pool of P2P connections" + ~deps: + [ + lwt_watcher; + lwt_canceler; + ringo; + tezos_base; + tezos_base_unix; + tezos_stdlib; + tezos_stdlib_unix; + tezos_p2p_services; + ] + ~opens: + [ + "Tezos_base__TzPervasives"; + "Tezos_base_unix"; + "Tezos_stdlib_unix"; + "Tezos_stdlib"; + "Tezos_p2p_services"; + ] + +let _tezos_p2p_tests = + test_exes + [ + "test_p2p_socket"; + "test_p2p_pool"; + "test_p2p_io_scheduler"; + "test_p2p_peerset"; + "test_p2p_buffer_reader"; + "test_p2p_banned_peers"; + "test_p2p_node"; + (* Deactivated because it fails on CI (but not locally) *) + (* See https://gitlab.com/tezos/tezos/-/issues/1184 *) + (* "test_p2p_logging"; *) + "test_p2p_connect_handler"; + ] + ~path:"src/lib_p2p/test" + ~opam:"src/lib_p2p/tezos-p2p" + ~deps: + [ + tezos_base; + tezos_base_unix; + tezos_stdlib_unix; + tezos_p2p; + tezos_p2p_services; + tezos_test_helpers; + tezos_base_test_helpers; + tezos_event_logging_test_helpers; + alcotest_lwt; + astring; + ] + ~opam_only_deps:[tezos_tooling] + ~linkall:true + ~preprocess:[PPS_args (bisect_ppx, ["--bisect-sigterm"])] + ~opens: + [ + "Tezos_base__TzPervasives"; + "Tezos_stdlib_unix"; + "Tezos_stdlib"; + "Tezos_p2p"; + "Tezos_base_test_helpers"; + "Tezos_event_logging_test_helpers"; + "Tezos_p2p_services"; + ] + ~dune: + Dune. + [ + alias_rule + "runtest_p2p_socket" + ~locks:"/ports/49152-65535" + ~action:(run_exe "test_p2p_socket" []); + alias_rule + "runtest_p2p_pool" + ~locks:"/ports/49152-65535" + ~action: + (run_exe "test_p2p_pool" ["--clients"; "10"; "--repeat"; "5"]); + alias_rule + "runtest_p2p_io_scheduler" + ~locks:"/ports/49152-65535" + ~action: + (run_exe + "test_p2p_io_scheduler" + [ + "--delay"; + "5"; + "--clients"; + "8"; + "--max-upload-speed"; + "262144"; + (* 1 << 18 = 256kB *) + "--max-download-speed"; + "1048576"; + (* 1 << 20 = 1MB *) + ]); + alias_rule + "runtest_p2p_socket_ipv4" + ~locks:"/ports/49152-65535" + ~action:(run_exe "test_p2p_socket" ["--addr"; "::ffff:127.0.0.1"]); + alias_rule + "runtest_p2p_pool_ipv4" + ~locks:"/ports/49152-65535" + ~action: + (run_exe + "test_p2p_pool" + [ + "--clients"; + "10"; + "--repeat"; + "5"; + "--addr"; + "::ffff:127.0.0.1"; + ]); + alias_rule + "runtest_p2p_io_scheduler_ipv4" + ~locks:"/ports/49152-65535" + ~action: + (run_exe + "test_p2p_io_scheduler" + [ + "--delay"; + "5"; + "--clients"; + "8"; + "--max-upload-speed"; + "262144"; + (* 1 << 18 = 256kB *) + "--max-download-speed"; + "1048576"; + (* 1 << 20 = 1MB *) + "--addr"; + "::ffff:127.0.0.1"; + ]); + alias_rule + "runtest_p2p_peerset" + ~action:(run_exe "test_p2p_peerset" []); + alias_rule + "runtest_p2p_buffer_reader" + ~action:(run_exe "test_p2p_buffer_reader" []); + alias_rule + "runtest_p2p_banned_peers" + ~action:(run_exe "test_p2p_banned_peers" []); + alias_rule + "runtest_p2p_node" + ~locks:"/ports/49152-65535" + ~action:(run_exe "test_p2p_node" []); + alias_rule + "runtest_p2p_connect_handler" + ~action:(run_exe "test_p2p_connect_handler" []); + alias_rule + "runtest" + ~package:"tezos-p2p" + ~alias_deps: + [ + "runtest_p2p_socket_ipv4"; + "runtest_p2p_pool_ipv4"; + "runtest_p2p_io_scheduler_ipv4"; + "runtest_p2p_peerset"; + "runtest_p2p_buffer_reader"; + "runtest_p2p_banned_peers"; + "runtest_p2p_node"; + "runtest_p2p_connect_handler"; + ]; + ] + +let tezos_context_sigs = + public_lib + "tezos-context.sigs" + ~path:"src/lib_context/sigs" + ~opam:"src/lib_context/tezos-context" + ~deps:[tezos_base] + ~opens:["Tezos_base__TzPervasives"; "Tezos_stdlib"] + +let tezos_context_encoding = + public_lib + "tezos-context.encoding" + ~path:"src/lib_context/encoding" + ~opam:"src/lib_context/tezos-context" + ~deps:[tezos_base; irmin; irmin_pack] + ~opens:["Tezos_base__TzPervasives"; "Tezos_stdlib"] + +let tezos_context_helpers = + public_lib + "tezos-context.helpers" + ~path:"src/lib_context/helpers" + ~opam:"src/lib_context/tezos-context" + ~deps: + [ + tezos_base; tezos_context_encoding; tezos_context_sigs; irmin; irmin_pack; + ] + ~opens:["Tezos_base__TzPervasives"; "Tezos_stdlib"] + +let tezos_context_memory = + public_lib + "tezos-context.memory" + ~path:"src/lib_context/memory" + ~opam:"src/lib_context/tezos-context" + ~deps: + [ + tezos_base; + irmin_pack_mem; + tezos_context_sigs; + tezos_context_encoding; + tezos_context_helpers; + ] + ~opens:["Tezos_base__TzPervasives"; "Tezos_stdlib"] + +let tezos_context = + public_lib + "tezos-context" + ~path:"src/lib_context" + ~synopsis:"Tezos: on-disk context abstraction for `tezos-node`" + ~deps: + [ + tezos_base; + bigstringaf; + tezos_shell_services; + fmt; + logs_fmt; + digestif_c; + irmin; + irmin_pack; + tezos_stdlib_unix; + tezos_context_sigs; + tezos_context_helpers; + tezos_context_encoding; + ] + ~opens: + [ + "Tezos_shell_services"; + "Tezos_base__TzPervasives"; + "Tezos_stdlib_unix"; + "Tezos_stdlib"; + ] + +let _tezos_context_tests = + test + "test" + ~path:"src/lib_context/test" + ~opam:"src/lib_context/tezos-context" + ~deps: + [ + tezos_base; + tezos_base_unix; + tezos_context; + tezos_stdlib_unix; + alcotest_lwt; + vector; + ] + ~opens:["Tezos_base__TzPervasives"; "Tezos_context"; "Tezos_stdlib_unix"] + +let _tezos_context_memory_tests = + test + "test" + ~path:"src/lib_context/memory/test" + ~opam:"src/lib_context/tezos-context" + ~deps: + [ + tezos_base; + tezos_base_unix; + tezos_context; + tezos_context_memory; + tezos_stdlib_unix; + alcotest_lwt; + ] + ~opens:["Tezos_base__TzPervasives"; "Tezos_stdlib_unix"] + +(* This binding assumes that librustzcash.a is installed in the system default + directories or in: $OPAM_SWITCH_PREFIX/lib *) +let tezos_sapling = + public_lib + "tezos-sapling" + ~path:"src/lib_sapling" + ~synopsis:"OCaml library for the Sapling protocol, using librustzcash" + ~deps: + [ + conf_rust; + integers; + ctypes; + ctypes_stubs; + data_encoding; + tezos_crypto; + tezos_stdlib; + tezos_error_monad; + tezos_rust_lib; + tezos_lwt_result_stdlib; + ] + ~opens: + [ + "Tezos_stdlib"; + "Tezos_crypto"; + "Tezos_error_monad"; + "Tezos_error_monad.TzLwtreslib"; + ] + ~foreign_stubs: + { + language = C; + flags = + [":standard"; "-I%{env:OPAM_SWITCH_PREFIX=}/lib/tezos-rust-libs"]; + names = ["rustzcash_ctypes_c_stubs"]; + } + ~c_library_flags: + [ + "-L%{env:OPAM_SWITCH_PREFIX=}/lib/tezos-rust-libs"; + "-lrustzcash"; + "-lpthread"; + ] + ~dune: + Dune. + [ + [ + S "copy_files"; + S + "bindings/{rustzcash_ctypes_c_stubs.c,rustzcash_ctypes_stubs.ml,rustzcash_ctypes_bindings.ml}"; + ]; + ] + +let _tezos_sapling_tests = + tests + ["test_rustzcash"; "test_keys"; "test_merkle"; "test_roots"; "test_sapling"] + ~path:"src/lib_sapling/test" + ~opam:"src/lib_sapling/tezos-sapling" + ~dep_files:["vectors.csv"; "vectors-zip32.csv"] + ~deps: + [ + tezos_sapling; + str; + tezos_base; + tezos_base_unix; + tezos_stdlib_unix; + tezos_base_test_helpers; + alcotest_lwt; + ] + ~opens: + [ + "Tezos_sapling"; + "Tezos_crypto"; + "Tezos_stdlib"; + "Data_encoding"; + "Tezos_base_test_helpers"; + ] + ~dune: + Dune. + [ + [ + S "env"; + [S "dev"; [S "flags"; [S ":standard"; S "-warn-error"; S "-A"]]]; + ]; + ] + +let _rustzcash_ctypes_gen = + private_exe + "rustzcash_ctypes_gen" + ~path:"src/lib_sapling/bindings" + ~opam:"src/lib_sapling/tezos-sapling" + ~bisect_ppx:false + ~deps:[ctypes_stubs; ctypes] + ~modules:["rustzcash_ctypes_gen"; "rustzcash_ctypes_bindings"] + ~dune: + Dune. + [ + [ + S "rule"; + [ + S "targets"; + S "rustzcash_ctypes_stubs.ml"; + S "rustzcash_ctypes_c_stubs.c"; + ]; + [S "deps"; [S ":gen"; S "./rustzcash_ctypes_gen.exe"]]; + [S "action"; run "%{gen}" ["%{targets}"]]; + ]; + ] + +let tezos_protocol_environment_packer = + public_lib + "tezos-protocol-environment-packer" + ~path:"src/lib_protocol_environment/s_packer" + ~opam:"src/lib_protocol_environment/tezos-protocol-environment-packer" + ~synopsis:"Tezos: sigs/structs packer for economic protocol environment" + ~modules:[] + +let tezos_protocol_environment_sigs = + public_lib + "tezos-protocol-environment-sigs" + ~path:"src/lib_protocol_environment/sigs" + ~opam:"src/lib_protocol_environment/tezos-protocol-environment-sigs" + ~synopsis:"Tezos: restricted typing environment for the economic protocols" + ~opam_only_deps: + [ + (* Build dependency but not for the (library) itself, + it's from one of the .inc files. *) + tezos_protocol_environment_packer; + ] + ~nopervasives:true + ~modules:["V0"; "V1"; "V2"; "V3"; "V4"] + ~dune: + Dune. + [ + include_ "v0.dune.inc"; + include_ "v1.dune.inc"; + include_ "v2.dune.inc"; + include_ "v3.dune.inc"; + include_ "v4.dune.inc"; + ] + +let tezos_protocol_environment_structs = + public_lib + "tezos-protocol-environment-structs" + ~path:"src/lib_protocol_environment/structs" + ~opam:"src/lib_protocol_environment/tezos-protocol-environment-structs" + ~synopsis:"Tezos: restricted typing environment for the economic protocols" + ~deps:[tezos_stdlib; tezos_crypto; data_encoding; bls12_381_legacy] + ~opam_only_deps: + [ + (* Build dependency but not for the (library) itself, + it's from one of the .inc files. *) + tezos_protocol_environment_packer; + ] + ~modules:["V0"; "V1"; "V2"; "V3"; "V4"] + ~dune: + Dune. + [ + include_ "v0.dune.inc"; + include_ "v1.dune.inc"; + include_ "v2.dune.inc"; + include_ "v3.dune.inc"; + include_ "v4.dune.inc"; + ] + +let tezos_protocol_environment = + public_lib + "tezos-protocol-environment" + ~path:"src/lib_protocol_environment" + ~synopsis: + "Tezos: custom economic-protocols environment implementation for \ + `tezos-client` and testing" + ~deps: + [ + zarith; + zarith_stubs_js; + bls12_381; + tezos_base; + tezos_sapling; + tezos_protocol_environment_sigs; + tezos_protocol_environment_structs; + tezos_micheline; + tezos_context_memory; + tezos_event_logging; + ] + ~opens:["Tezos_base__TzPervasives"; "Tezos_micheline"] + ~wrapped:false + ~modules: + [ + "Tezos_protocol_environment"; + "Environment_V0"; + "Environment_V1"; + "Environment_V2"; + "Environment_V3"; + "Environment_V4"; + "Environment_cache"; + "Environment_context"; + "Environment_context_intf"; + "Environment_protocol_T"; + "Environment_protocol_T_V0"; + "Environment_protocol_T_V3"; + "Environment_protocol_T_test"; + "Dummy_context"; + "Memory_context"; + "Proxy_context"; + ] + +let _tezos_protocol_environment_tests = + tests + ["test"; "test_mem_context_array_theory"; "test_cache"] + ~path:"src/lib_protocol_environment/test" + ~opam:"src/lib_protocol_environment/tezos-protocol-environment" + ~deps: + [ + bls12_381_unix; + tezos_base_unix; + tezos_protocol_environment; + alcotest_lwt; + tezos_test_helpers; + qcheck_alcotest; + lwt_unix; + ] + ~opens:["Tezos_base__TzPervasives"; "Tezos_protocol_environment"] + +let tezos_shell_context = + public_lib + "tezos-shell-context" + ~path:"src/lib_protocol_environment" + ~synopsis: + "Tezos: economic-protocols environment implementation for `tezos-node`" + ~deps:[tezos_base; tezos_protocol_environment; tezos_context] + ~modules:["Shell_context"] + +let tezos_protocol_compiler_registerer = + public_lib + "tezos-protocol-compiler.registerer" + ~path:"src/lib_protocol_compiler" + ~opam:"src/lib_protocol_compiler/tezos-protocol-compiler" + ~internal_name:"tezos_protocol_registerer" + ~deps:[tezos_base; tezos_protocol_environment_sigs] + ~opens:["Tezos_base__TzPervasives"] + ~modules:["Registerer"] + ~opaque:true + ~dune: + [ + [ + S "rule"; + [S "targets"; S "embedded_cmis.ml"]; + [ + S "action"; + [ + S "run"; + G + [ + S "%{bin:ocp-ocamlres}"; + S "-format"; + S "ocaml"; + S "-o"; + S "%{targets}"; + ]; + S "%{lib:stdlib:camlinternalFormatBasics.cmi}"; + S + "%{dep:.tezos_protocol_registerer.objs/byte/tezos_protocol_registerer__Registerer.cmi}"; + S + "%{lib:tezos-protocol-environment-sigs:tezos_protocol_environment_sigs.cmi}"; + S + "%{lib:tezos-protocol-environment-sigs:tezos_protocol_environment_sigs__V0.cmi}"; + S + "%{lib:tezos-protocol-environment-sigs:tezos_protocol_environment_sigs__V1.cmi}"; + S + "%{lib:tezos-protocol-environment-sigs:tezos_protocol_environment_sigs__V2.cmi}"; + S + "%{lib:tezos-protocol-environment-sigs:tezos_protocol_environment_sigs__V3.cmi}"; + S + "%{lib:tezos-protocol-environment-sigs:tezos_protocol_environment_sigs__V4.cmi}"; + ]; + ]; + ]; + ] + +let tezos_protocol_compiler_lib = + public_lib + "tezos-protocol-compiler" + ~path:"src/lib_protocol_compiler" + ~synopsis:"Tezos: economic-protocol compiler" + ~ocaml: + [ + (* Should be in sync with scripts/version.sh *) + At_least "4.12.0"; + Less_than "4.13"; + ] + ~deps: + [ + tezos_base; + tezos_base_unix; + tezos_version; + tezos_protocol_environment_sigs; + tezos_stdlib_unix; + compiler_libs_common; + lwt_unix; + ocplib_ocamlres; + unix; + ] + ~opam_only_deps:[tezos_protocol_environment] + ~opens:["Tezos_base__TzPervasives"; "Tezos_base_unix"; "Tezos_stdlib_unix"] + ~modules:["Embedded_cmis"; "Packer"; "Compiler"] + +let tezos_protocol_compiler_native = + public_lib + "tezos-protocol-compiler.native" + ~path:"src/lib_protocol_compiler" + ~opam:"src/lib_protocol_compiler/tezos-protocol-compiler" + ~deps:[tezos_base; tezos_protocol_compiler_lib; compiler_libs_optcomp] + ~opens:["Tezos_base__TzPervasives"; "Tezos_protocol_compiler"] + ~modules:["Native"] + ~dune: + [ + [ + S "install"; + [S "section"; S "libexec"]; + [ + S "files"; + S "dune_protocol.v0"; + S "dune_protocol.v1"; + S "dune_protocol.template.v0"; + S "dune_protocol.template.v1"; + S "final_protocol_versions"; + ]; + ]; + ] + +let tezos_protocol_updater = + public_lib + "tezos-protocol-updater" + ~path:"src/lib_protocol_updater" + ~synopsis:"Tezos: economic-protocol dynamic loading for `tezos-node`" + ~deps: + [ + tezos_base; + tezos_stdlib_unix; + tezos_micheline; + tezos_shell_services; + tezos_protocol_environment; + tezos_shell_context; + tezos_protocol_compiler_registerer; + tezos_protocol_compiler_native; + tezos_context; + lwt_exit; + dynlink; + ] + ~opens: + [ + "Tezos_base__TzPervasives"; + "Tezos_stdlib_unix"; + "Tezos_micheline"; + "Tezos_shell_services"; + "Tezos_context"; + ] + +let tezos_validation = + public_lib + "tezos-validation" + ~path:"src/lib_validation" + ~synopsis:"Tezos: library for blocks validation" + ~deps: + [ + tezos_base; + tezos_context; + tezos_shell_context; + tezos_shell_services; + tezos_protocol_updater; + tezos_stdlib_unix; + ] + ~opens: + [ + "Tezos_base__TzPervasives"; + "Tezos_stdlib_unix"; + "Tezos_context"; + "Tezos_shell_context"; + "Tezos_shell_services"; + "Tezos_protocol_updater"; + "Tezos_stdlib_unix"; + ] + +let tezos_store = + public_lib + "tezos-store" + ~path:"src/lib_store" + ~synopsis:"Tezos: store for `tezos-node`" + ~deps: + [ + tezos_base; + tezos_shell_services; + index; + irmin_pack; + tezos_stdlib_unix; + tezos_context; + tezos_validation; + tezos_protocol_updater; + lwt_watcher; + ringo_lwt; + camlzip; + tar; + tar_unix; + ] + ~opens: + [ + "Tezos_shell_services"; + "Tezos_base"; + "Tezos_base__TzPervasives"; + "Tezos_context"; + "Tezos_validation"; + "Tezos_protocol_updater"; + "Tezos_stdlib_unix"; + "Tezos_stdlib"; + ] + +let _tezos_store_tests = + test_exes + ["test"] + ~path:"src/lib_store/test" + ~opam:"src/lib_store/tezos-store" + ~deps: + [ + tezos_base; + tezos_store; + tezos_stdlib_unix; + Protocol.(embedded demo_noops); + Protocol.(embedded genesis); + Protocol.(embedded alpha); + tezos_protocol_alpha_parameters; + Protocol.(plugin_exn alpha); + tezos_validation; + alcotest_lwt; + ] + ~opens: + [ + "Tezos_base__TzPervasives"; + "Tezos_store"; + "Tezos_shell_services"; + "Tezos_stdlib_unix"; + "Tezos_validation"; + "Tezos_protocol_alpha_parameters"; + "Tezos_protocol_plugin_alpha"; + ] + ~dune: + Dune. + [ + alias_rule + "runtest_store" + ~action:(setenv "SLOW_TEST" "false" @@ run_exe "test" []); + ] + +let tezos_requester = + public_lib + "tezos-requester" + ~path:"src/lib_requester" + ~synopsis:"Tezos: generic resource fetching service" + ~deps:[tezos_base; tezos_stdlib_unix; lwt_watcher] + ~opens:["Tezos_base__TzPervasives"; "Tezos_stdlib_unix"] + +let _tezos_requester_tests = + tests + ["test_requester"; "test_fuzzing_requester"] + ~path:"src/lib_requester/test" + ~opam:"src/lib_requester/tezos-requester" + ~deps: + [ + tezos_base; + tezos_base_unix; + tezos_test_helpers; + tezos_base_test_helpers; + tezos_stdlib_unix; + tezos_requester; + alcotest_lwt; + qcheck_alcotest; + ] + ~opens: + [ + "Tezos_base__TzPervasives"; + "Tezos_base_test_helpers"; + "Tezos_stdlib"; + "Tezos_requester"; + ] + +let tezos_shell = + public_lib + "tezos-shell" + ~path:"src/lib_shell" + ~synopsis: + "Tezos: core of `tezos-node` (gossip, validation scheduling, mempool, \ + ...)" + ~deps: + [ + 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; + ] + ~opens: + [ + "Tezos_base__TzPervasives"; + "Tezos_base"; + "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"; + "Tezos_version"; + ] + +let _tezos_shell_tests = + tests + [ + "test_shell"; + "test_locator"; + "test_synchronisation_heuristic_fuzzy"; + "test_prevalidation"; + "test_prevalidation_t"; + "test_prevalidator_classification"; + "test_prevalidator_classification_operations"; + "test_prevalidator_pending_operations"; + ] + ~path:"src/lib_shell/test" + ~opam:"src/lib_shell/tezos-shell" + ~deps: + [ + 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; + Protocol.(embedded demo_noops); + tezos_stdlib_unix; + tezos_validation; + tezos_event_logging_test_helpers; + tezos_test_helpers; + alcotest_lwt; + ] + ~opens: + [ + "Tezos_base__TzPervasives"; + "Tezos_base_test_helpers"; + "Tezos_store"; + "Tezos_context"; + "Tezos_shell_context"; + "Tezos_protocol_updater"; + "Tezos_p2p"; + "Tezos_p2p_services"; + "Tezos_shell"; + "Tezos_shell_services"; + "Tezos_stdlib_unix"; + "Tezos_validation"; + "Tezos_event_logging_test_helpers"; + ] + ~dune: + Dune. + [ + alias_rule + "runtest_locator_bench" + ~package:"tezos-shell" + ~action:(run_exe "test_locator" ["--bench"]); + ] + +let _tezos_shell_benchs = + tests + ["bench_simple"; "bench_tool"] + ~path:"src/lib_shell/bench" + ~opam:"src/lib_shell/tezos-shell" + ~deps: + [ + tezos_base; + tezos_shell; + tezos_alpha_test_helpers; + Protocol.(plugin_exn alpha); + ] + ~opens: + [ + "Tezos_base__TzPervasives"; + "Tezos_shell"; + "Tezos_protocol_alpha"; + "Tezos_protocol_plugin_alpha"; + "Tezos_protocol_alpha_parameters"; + "Tezos_alpha_test_helpers"; + ] + +let tezos_rpc_http = + public_lib + "tezos-rpc-http" + ~path:"src/lib_rpc_http" + ~synopsis:"Tezos: library of auto-documented RPCs (http server and client)" + ~deps:[tezos_base; resto_cohttp] + ~opens:["Tezos_base__TzPervasives"] + ~modules:["RPC_client_errors"; "media_type"] + +let tezos_rpc_http_client = + public_lib + "tezos-rpc-http-client" + ~path:"src/lib_rpc_http" + ~synopsis:"Tezos: library of auto-documented RPCs (http client)" + ~deps:[tezos_base; resto_cohttp_client; tezos_rpc_http] + ~opens:["Tezos_base__TzPervasives"; "Tezos_rpc_http"] + ~modules:["RPC_client"] + +let tezos_rpc_http_client_unix = + public_lib + "tezos-rpc-http-client-unix" + ~path:"src/lib_rpc_http" + ~synopsis:"Tezos: unix implementation of the RPC client" + ~deps: + [ + tezos_stdlib_unix; + tezos_base; + cohttp_lwt_unix; + resto_cohttp_client; + tezos_rpc_http_client; + ] + ~opens:["Tezos_base__TzPervasives"; "Tezos_rpc_http_client"] + ~modules:["RPC_client_unix"] + +let tezos_rpc_http_server = + public_lib + "tezos-rpc-http-server" + ~path:"src/lib_rpc_http" + ~synopsis:"Tezos: library of auto-documented RPCs (http server)" + ~deps: + [ + tezos_base; + tezos_stdlib_unix; + resto_cohttp_server; + resto_acl; + tezos_rpc_http; + ] + ~opens: + [ + "Tezos_base__TzPervasives"; + "Tezos_stdlib_unix"; + "Tezos_rpc"; + "Tezos_rpc_http"; + ] + ~modules:["RPC_server"; "RPC_logging"] + ~private_modules:["RPC_logging"] + +let _tezos_rpc_http_server_tests = + test + "test_rpc_http" + ~path:"src/lib_rpc_http/test" + ~opam:"src/lib_rpc_http/tezos-rpc-http-server" + ~deps: + [ + tezos_base; + tezos_base_unix; + tezos_stdlib_unix; + tezos_rpc_http_server; + tezos_base_test_helpers; + tezos_test_helpers; + qcheck_alcotest; + alcotest_lwt; + ] + ~opens: + [ + "Tezos_base__TzPervasives"; + "Tezos_stdlib"; + "Lib_test"; + "Tezos_base_test_helpers"; + "Tezos_rpc_http_server"; + ] + +let tezos_validator_lib = + public_lib + "tezos-validator" + ~path:"src/bin_validation" + ~synopsis: + "Tezos: `tezos-validator` binary for external validation of blocks" + ~deps: + [ + tezos_base; + tezos_base_unix; + tezos_context; + tezos_stdlib_unix; + tezos_protocol_environment; + tezos_protocol_updater; + tezos_shell; + tezos_shell_context; + tezos_validation; + ] + ~opens: + [ + "Tezos_base__TzPervasives"; + "Tezos_context"; + "Tezos_stdlib_unix"; + "Tezos_shell"; + "Tezos_shell_services"; + "Tezos_validation"; + "Tezos_protocol_updater"; + "Tezos_shell_context"; + ] + +let tezos_client_base = + public_lib + "tezos-client-base" + ~path:"src/lib_client_base" + ~synopsis:"Tezos: common helpers for `tezos-client`" + ~deps:[tezos_base; tezos_shell_services; tezos_sapling; tezos_rpc] + ~modules:[":standard"; "bip39_english"] + ~linkall:true + ~opens:["Tezos_base__TzPervasives"; "Tezos_rpc"; "Tezos_shell_services"] + ~dune: + Dune. + [ + [ + S "rule"; + [S "targets"; S "bip39_english.ml"]; + [ + S "deps"; + [S ":exe"; S "gen/bip39_generator.exe"]; + S "gen/bip39_english.txt"; + ]; + [S "action"; [S "run"; S "%{exe}"; S "%{targets}"]]; + ]; + ] + +let _tezos_client_base_tests = + tests + ["bip39_tests"; "pbkdf_tests"] + ~path:"src/lib_client_base/test" + ~opam:"src/lib_client_base/tezos-client-base" + ~deps:[tezos_base; tezos_base_unix; tezos_client_base; alcotest] + ~opens:["Tezos_client_base"] + +let _bip39_generator = + private_exe + "bip39_generator" + ~path:"src/lib_client_base/gen" + ~opam:"src/lib_client_base/tezos-client-base" + ~bisect_ppx:false + +let tezos_signer_services = + public_lib + "tezos-signer-services" + ~path:"src/lib_signer_services" + ~synopsis:"Tezos: descriptions of RPCs exported by `tezos-signer`" + ~deps:[tezos_base; tezos_client_base; tezos_rpc] + ~linkall:true + ~opens:["Tezos_base__TzPervasives"; "Tezos_rpc"; "Tezos_client_base"] + +let tezos_signer_backends = + public_lib + "tezos-signer-backends" + ~path:"src/lib_signer_backends" + ~synopsis:"Tezos: remote-signature backends for `tezos-client`" + ~deps: + [ + tezos_base; + tezos_stdlib; + tezos_client_base; + tezos_rpc_http_client; + tezos_signer_services; + tezos_shell_services; + ] + ~opens: + [ + "Tezos_base__TzPervasives"; + "Tezos_stdlib"; + "Tezos_client_base"; + "Tezos_rpc_http"; + "Tezos_rpc_http_client"; + "Tezos_signer_services"; + "Tezos_shell_services"; + ] + +let _tezos_signer_backends_tests = + test + "test_encrypted" + ~path:"src/lib_signer_backends/test" + ~opam:"src/lib_signer_backends/tezos-signer-backends" + ~deps:[tezos_base; tezos_base_unix; tezos_signer_backends; alcotest_lwt] + ~opens: + [ + "Tezos_error_monad"; + "Tezos_stdlib"; + "Tezos_error_monad.TzLwtreslib"; + "Tezos_crypto"; + "Tezos_client_base"; + "Tezos_signer_backends"; + ] + +let tezos_signer_backends_unix = + public_lib + "tezos-signer-backends.unix" + ~path:"src/lib_signer_backends/unix" + ~opam:"src/lib_signer_backends/tezos-signer-backends" + ~deps: + [ + ocplib_endian_bigstring; + fmt; + tezos_signer_backends; + tezos_base; + tezos_base_unix; + tezos_stdlib_unix; + tezos_rpc_http_client_unix; + select + ~package:ledgerwallet_tezos + ~source_if_present:"ledger.available.ml" + ~source_if_absent:"ledger.none.ml" + ~target:"ledger.ml"; + ] + ~opens: + [ + "Tezos_base__TzPervasives"; + "Tezos_stdlib_unix"; + "Tezos_stdlib"; + "Tezos_client_base"; + "Tezos_rpc_http"; + "Tezos_rpc_http_client"; + "Tezos_rpc_http_client_unix"; + "Tezos_signer_services"; + "Tezos_signer_backends"; + "Tezos_shell_services"; + ] + +let _tezos_signer_backends_unix_tests = + test + "test_crouching" + ~path:"src/lib_signer_backends/unix/test" + ~opam:"src/lib_signer_backends/tezos-signer-backends" + ~deps:[tezos_signer_backends_unix; alcotest_lwt] + ~opens: + [ + "Tezos_error_monad"; + "Tezos_stdlib"; + "Tezos_crypto"; + "Tezos_client_base"; + "Tezos_signer_backends_unix"; + ] + +let tezos_client_commands = + public_lib + "tezos-client-commands" + ~path:"src/lib_client_commands" + ~synopsis:"Tezos: protocol agnostic commands for `tezos-client`" + ~deps: + [ + tezos_base; + tezos_client_base; + tezos_clic_unix; + tezos_rpc; + tezos_shell_services; + tezos_p2p_services; + tezos_stdlib_unix; + tezos_signer_backends; + data_encoding; + ] + ~linkall:true + ~opens: + [ + "Tezos_base__TzPervasives"; + "Tezos_rpc"; + "Tezos_clic_unix"; + "Tezos_client_base"; + "Tezos_shell_services"; + "Tezos_p2p_services"; + "Data_encoding"; + ] + +let tezos_mockup_registration = + public_lib + "tezos-mockup-registration" + ~path:"src/lib_mockup" + ~synopsis:"Tezos: protocol registration for the mockup mode" + ~deps: + [ + tezos_base; + tezos_client_base; + tezos_shell_services; + tezos_protocol_environment; + ] + ~opens:["Tezos_base__TzPervasives"] + ~modules:["registration"; "registration_intf"; "mockup_args"] + +let tezos_mockup_proxy = + public_lib + "tezos-mockup-proxy" + ~path:"src/lib_mockup_proxy" + ~synopsis:"Tezos: local RPCs" + ~deps: + [ + tezos_base; + tezos_client_base; + tezos_protocol_environment; + tezos_rpc_http; + resto_cohttp_self_serving_client; + tezos_rpc_http_client; + tezos_shell_services; + ] + ~opens:["Tezos_base__TzPervasives"] + +(* Depends on tezos_p2p to register the relevant RPCs. *) +let tezos_mockup = + public_lib + "tezos-mockup" + ~path:"src/lib_mockup" + ~synopsis:"Tezos: library of auto-documented RPCs (mockup mode)" + ~deps: + [ + tezos_base; + tezos_base_unix; + tezos_client_base; + tezos_mockup_proxy; + resto_cohttp_self_serving_client; + tezos_rpc; + tezos_p2p_services; + tezos_p2p; + tezos_protocol_environment; + tezos_stdlib_unix; + tezos_rpc_http; + tezos_rpc_http_client; + tezos_mockup_registration; + ] + ~opens:["Tezos_base__TzPervasives"; "Tezos_mockup_registration"] + ~modules: + [ + "files"; + "local_services"; + "persistence"; + "persistence_intf"; + "RPC_client"; + "migration"; + ] + +let tezos_mockup_commands = + public_lib + "tezos-mockup-commands" + ~path:"src/lib_mockup" + ~synopsis:"Tezos: library of auto-documented RPCs (commands)" + ~deps: + [ + tezos_base; + tezos_client_commands; + tezos_client_base; + tezos_mockup; + tezos_mockup_registration; + ] + ~opens: + ["Tezos_base__TzPervasives"; "Tezos_mockup"; "Tezos_mockup_registration"] + ~modules:["mockup_wallet"; "mockup_commands"] + +let _tezos_mockup_tests = + tests + ["test_mockup_args"; "test_fuzzing_mockup_args"; "test_persistence"] + ~path:"src/lib_mockup/test" + ~opam:"src/lib_mockup/tezos-mockup" + ~deps: + [ + tezos_base_test_helpers; + tezos_mockup; + tezos_mockup_registration; + tezos_client_base; + qcheck_alcotest; + alcotest_lwt; + ] + ~opens:["Tezos_base__TzPervasives"; "Tezos_base_test_helpers"] + +let tezos_proxy = + public_lib + "tezos-proxy" + ~path:"src/lib_proxy" + ~synopsis:"Tezos: proxy" + ~deps: + [ + ringo_lwt; + tezos_base; + tezos_clic; + tezos_client_base; + tezos_mockup_proxy; + tezos_protocol_environment; + tezos_rpc; + tezos_shell_services; + tezos_context; + ] + ~opens:["Tezos_base__TzPervasives"] + +let _tezos_proxy_tests = + tests + [ + "test_proxy"; + "test_fuzzing_proxy_getter"; + "test_light"; + "test_fuzzing_light"; + ] + ~path:"src/lib_proxy/test" + ~opam:"src/lib_proxy/tezos-proxy" + ~deps: + [ + tezos_base; + tezos_base_unix; + tezos_stdlib_unix; + tezos_proxy; + tezos_base_test_helpers; + tezos_test_helpers; + tezos_shell_services_test_helpers; + qcheck_alcotest; + alcotest_lwt; + ] + ~opens:["Tezos_base__TzPervasives"; "Tezos_base_test_helpers"] + +let tezos_proxy_server_config = + public_lib + "tezos-proxy-server-config" + ~path:"src/lib_proxy_server_config" + ~synopsis:"Tezos: proxy server configuration" + ~deps:[tezos_base; tezos_stdlib_unix] + ~opens:["Tezos_base__TzPervasives"] + +let _tezos_proxy_server_config_tests = + test + "test_proxy_server_config" + ~path:"src/lib_proxy_server_config/test" + ~opam:"src/lib_proxy_server_config/tezos-proxy-server-config" + ~deps: + [ + tezos_base; + tezos_base_unix; + tezos_proxy_server_config; + tezos_test_helpers; + qcheck_alcotest; + alcotest_lwt; + ] + ~opens:["Tezos_base__TzPervasives"] + +let tezos_client_base_unix = + public_lib + "tezos-client-base-unix" + ~path:"src/lib_client_base_unix" + ~synopsis: + "Tezos: common helpers for `tezos-client` (unix-specific fragment)" + ~deps: + [ + tezos_base; + tezos_client_base; + tezos_client_commands; + tezos_stdlib_unix; + tezos_rpc_http_client_unix; + tezos_mockup; + tezos_mockup_registration; + tezos_mockup_commands; + tezos_proxy; + tezos_signer_backends_unix; + tezos_shell_services; + lwt_exit; + ] + ~linkall:true + ~opens: + [ + "Tezos_base__TzPervasives"; + "Tezos_rpc_http"; + "Tezos_rpc_http_client_unix"; + "Tezos_shell_services"; + "Tezos_stdlib_unix"; + "Tezos_client_base"; + "Tezos_client_commands"; + "Tezos_mockup_commands"; + ] + +let _tezos_client_base_unix_tests = + test + "test_mockup_wallet" + ~path:"src/lib_client_base_unix/test" + ~opam:"src/lib_client_base_unix/tezos-client-base-unix" + ~deps: + [ + tezos_mockup_commands; + tezos_client_base_unix; + tezos_base_test_helpers; + alcotest; + alcotest_lwt; + ] + ~opens:["Tezos_base__TzPervasives"; "Tezos_base_test_helpers"] + +(* Depends on pyml-plop because of Matrix module... pyml-plot should be split further. *) +let tezos_benchmark = + public_lib + "tezos-benchmark" + ~path:"src/lib_benchmark" + ~synopsis: + "Tezos: library for writing benchmarks and performing simple parameter \ + inference" + ~deps: + [ + tezos_base; + tezos_stdlib_unix; + tezos_micheline; + tezos_clic; + data_encoding; + prbnmcn_stats; + benchmark_utils; + pyml_plot; + ocaml_migrate_parsetree; + opam_only "hashcons" []; + ] + ~opens:["Tezos_base__TzPervasives"; "Tezos_stdlib_unix"] + +let tezos_benchmark_examples = + public_lib + "tezos-benchmark-examples" + ~path:"src/lib_benchmark/example" + ~opam:"src/lib_benchmark/tezos-benchmark-examples" + ~synopsis:"Tezos: examples for lib-benchmarks" + ~deps:[tezos_base; tezos_stdlib_unix; tezos_crypto; tezos_benchmark] + ~opens:["Tezos_base__TzPervasives"] + +let _tezos_benchmark_tests = + test + "main_ci" + ~path:"src/lib_benchmark/test" + ~opam:"src/lib_benchmark/tezos-benchmark-tests" + ~synopsis:"Tezos: tests for lib-benchmarks" + ~deps: + [ + alcotest_lwt; + tezos_base; + tezos_base_unix; + tezos_stdlib_unix; + tezos_micheline; + tezos_crypto; + tezos_benchmark; + tezos_benchmark_examples; + ] + ~opens:["Tezos_base__TzPervasives"] + +(* unused lib? *) +let tezos_micheline_rewriting = + public_lib + "tezos-micheline-rewriting" + ~path:"src/lib_benchmark/lib_micheline_rewriting" + ~synopsis:"Tezos: library for rewriting Micheline expressions" + ~deps: + [ + zarith; zarith_stubs_js; tezos_stdlib; tezos_error_monad; tezos_micheline; + ] + ~opens:["Tezos_stdlib"; "Tezos_error_monad"; "Tezos_micheline"] + +let _tezos_micheline_rewriting_tests = + test + "test_rewriting" + ~path:"src/lib_benchmark/lib_micheline_rewriting/test" + ~opam:"src/lib_benchmark/lib_micheline_rewriting/tezos-micheline-rewriting" + ~deps: + [ + tezos_micheline; + tezos_micheline_rewriting; + Protocol.(main alpha); + tezos_error_monad; + Protocol.(client_exn alpha); + alcotest_lwt; + ] + ~opens:["Tezos_micheline"] + +let tezos_shell_benchmarks = + public_lib + "tezos-shell-benchmarks" + ~path:"src/lib_shell_benchmarks" + ~synopsis:"Tezos: shell benchmarks" + ~deps: + [ + tezos_base; + tezos_benchmark; + tezos_context; + tezos_shell_context; + tezos_micheline; + ] + ~linkall:true + ~opens: + [ + "Tezos_stdlib"; + "Tezos_base"; + "Tezos_base__TzPervasives"; + "Tezos_error_monad"; + "Tezos_benchmark"; + "Tezos_crypto"; + ] + +let tezt = + public_lib + "tezt" + ~path:"tezt/lib" + ~synopsis:"Framework for integration tests with external processes" + ~ocaml:[At_least "4.08"] + ~bisect_ppx:false + ~deps:[re; lwt_unix; ezjsonm] + +let tezt_tezos = + public_lib + "tezt-tezos" + ~path:"tezt/lib_tezos" + ~synopsis:"Tezos test framework based on Tezt" + ~bisect_ppx:false + ~deps:[tezt; hex; tezos_base; tezos_base_unix] + ~opens:["Tezt"; "Tezt.Base"] + +let tezos_openapi = + public_lib + "tezos-openapi" + ~path:"src/lib_openapi" + ~synopsis: + "Tezos: a library for querying RPCs and converting into the OpenAPI \ + format" + ~deps:[ezjsonm; json_data_encoding; tezt] + +(* INTERNAL EXES *) + +(* Not released, so no ~opam. *) +let _node_wrapper = + private_exe + "node_wrapper" + ~path:"src/tooling" + ~opam:"" + ~deps:[unix] + ~modules:["node_wrapper"] + ~bisect_ppx:false + +let _tezos_protocol_compiler_bin = + public_exe + "tezos-protocol-compiler" + ~path:"src/lib_protocol_compiler/bin" + ~opam:"src/lib_protocol_compiler/tezos-protocol-compiler" + ~internal_name:"main_native" + ~modes:[Native] + ~deps:[tezos_protocol_compiler_native] + ~linkall:true + ~modules:["Main_native"] + +let _tezos_protocol_compiler_tezos_protocol_packer = + public_exe + "tezos-protocol-compiler.tezos-protocol-packer" + ~path:"src/lib_protocol_compiler/bin" + ~opam:"src/lib_protocol_compiler/tezos-protocol-compiler" + ~internal_name:"main_packer" + ~deps:[tezos_base; tezos_protocol_compiler_lib; tezos_stdlib_unix] + ~opens: + [ + "Tezos_base__TzPervasives"; + "Tezos_stdlib_unix"; + "Tezos_protocol_compiler"; + ] + ~modules:["Main_packer"] + +let _tezos_embedded_protocol_packer = + public_exe + "tezos-embedded-protocol-packer" + ~path:"src/lib_protocol_compiler/bin" + ~opam:"src/lib_protocol_compiler/tezos-protocol-compiler" + ~internal_name:"main_embedded_packer" + ~modes:[Native] + ~deps:[tezos_base; tezos_base_unix; tezos_stdlib_unix] + ~opens:["Tezos_base__TzPervasives"; "Tezos_base_unix"; "Tezos_stdlib_unix"] + ~linkall:true + ~modules:["Main_embedded_packer"] + +let _s_packer = + private_exe + "s_packer" + ~path:"src/lib_protocol_environment/s_packer" + ~opam:"src/lib_protocol_environment/tezos-protocol-environment-packer" + ~bisect_ppx:false + ~dune: + Dune. + [ + [ + S "install"; + [S "section"; S "libexec"]; + [S "package"; S "tezos-protocol-environment-packer"]; + [S "files"; [S "s_packer.exe"; S "as"; S "s_packer"]]; + ]; + ] + +let _replace = + private_exe + "replace" + ~path:"src/lib_protocol_compiler/bin" + ~opam:"src/lib_protocol_compiler/tezos-protocol-compiler" + ~deps:[tezos_base; tezos_base_unix; tezos_stdlib_unix; re_str] + ~opens:["Tezos_base__TzPervasives"; "Tezos_stdlib_unix"] + ~modules:["Replace"] + ~static:true + ~dune: + [ + [ + S "install"; + [S "section"; S "libexec"]; + [S "files"; [S "replace.exe"; S "as"; S "replace"]]; + ]; + ] + +let _tezos_validator_bin = + public_exe + "tezos-validator" + ~path:"src/bin_validation/bin" + ~opam:"src/bin_validation/tezos-validator" + ~internal_name:"main_validator" + ~deps:[tezos_validator_lib] + ~opens: + [ + "Tezos_base__TzPervasives"; + "Tezos_context"; + "Tezos_stdlib_unix"; + "Tezos_shell"; + "Tezos_shell_services"; + "Tezos_validation"; + "Tezos_protocol_updater"; + "Tezos_validator"; + ] + ~linkall:true + +let _tezos_node = + public_exe + "tezos-node" + ~path:"src/bin_node" + ~internal_name:"main" + ~synopsis:"Tezos: `tezos-node` binary" + ~deps: + ([ + tezos_base; + tezos_base_unix; + tezos_version; + tezos_stdlib_unix; + tezos_shell_services; + tezos_workers; + tezos_rpc_http_server; + tezos_p2p; + tezos_shell; + tezos_store; + tezos_context; + tezos_validator_lib; + tezos_shell_context; + tezos_protocol_updater; + cmdliner; + fmt_cli; + fmt_tty; + tls; + prometheus_app_unix; + lwt_exit; + ] + @ Protocol.all_optionally + [Protocol.embedded_opt; Protocol.plugin_registerer]) + ~linkall:true + ~opens: + [ + "Tezos_base__TzPervasives"; + "Tezos_base"; + "Tezos_stdlib_unix"; + "Tezos_shell_services"; + "Tezos_rpc_http"; + "Tezos_rpc_http_server"; + "Tezos_p2p"; + "Tezos_shell"; + "Tezos_store"; + "Tezos_context"; + "Tezos_validator"; + "Tezos_shell_context"; + "Tezos_workers"; + "Tezos_protocol_updater"; + ] + ~dune: + Dune. + [ + [ + S "install"; + [S "package"; S "tezos-node"]; + [S "section"; S "bin"]; + [ + S "files"; + [S "tezos-sandboxed-node.sh"; S "as"; S "tezos-sandboxed-node.sh"]; + ]; + ]; + ] + +let _tezos_client = + public_exes + ["tezos-client"; "tezos-admin-client"] + ~path:"src/bin_client" + ~internal_names:["main_client"; "main_admin"] + ~opam:"src/bin_client/tezos-client" + ~synopsis:"Tezos: `tezos-client` binary" + ~deps: + ([ + tezos_base; + tezos_base_unix; + tezos_rpc_http_client; + tezos_shell_services; + tezos_client_base; + tezos_client_commands; + tezos_mockup_commands; + tezos_proxy; + tezos_stdlib_unix; + tezos_client_base_unix; + tezos_signer_backends_unix; + ] + @ Protocol.all_optionally + [ + (fun protocol -> + match Protocol.client_commands_registration protocol with + | None -> Protocol.client protocol + | x -> x); + Protocol.baking_commands_registration; + Protocol.plugin; + ]) + ~linkall:true + ~opens: + [ + "Tezos_base__TzPervasives"; + "Tezos_rpc_http_client"; + "Tezos_stdlib_unix"; + "Tezos_shell_services"; + "Tezos_client_base"; + "Tezos_client_commands"; + "Tezos_mockup_commands"; + "Tezos_client_base_unix"; + ] + ~dune: + Dune. + [ + [ + S "install"; + [S "package"; S "tezos-client"]; + [S "section"; S "bin"]; + [ + S "files"; + [ + S "tezos-init-sandboxed-client.sh"; + S "as"; + S "tezos-init-sandboxed-client.sh"; + ]; + ]; + ]; + ] + +let _tezos_codec = + public_exe + "tezos-codec" + ~path:"src/bin_codec" + ~internal_name:"codec" + ~synopsis:"Tezos: `tezos-codec` binary to encode and decode values" + ~deps: + ([ + data_encoding; + tezos_base; + tezos_stdlib_unix; + tezos_event_logging; + tezos_client_base; + tezos_client_base_unix; + tezos_clic; + tezos_signer_services; + ] + @ Protocol.all_optionally + @@ [ + (fun protocol -> + let link = + protocol == Protocol.alpha + || + match Protocol.number protocol with + | Some number when number >= 005 -> true + | _ -> false + in + if link then Protocol.client protocol else None); + ]) + ~linkall:true + ~opens: + [ + "Data_encoding"; + "Tezos_base__TzPervasives"; + "Tezos_client_base_unix"; + "Tezos_client_base"; + "Tezos_clic"; + "Tezos_stdlib_unix"; + "Tezos_event_logging"; + ] + +let _tezos_sandbox = + private_exe + "main" + ~path:"src/bin_sandbox" + ~opam:"" + ~bisect_ppx:false + ~deps:[tezos_base; tezos_base_unix; fmt; flextesa] + +let _tezos_proxy_server = + public_exe + "tezos-proxy-server" + ~path:"src/bin_proxy_server" + ~internal_name:"main_proxy_server" + ~synopsis:"Tezos: `tezos-proxy-server` binary" + ~deps: + ([ + tezos_base; + tezos_base_unix; + cmdliner; + lwt_exit; + tezos_proxy; + tezos_proxy_server_config; + tezos_rpc_http_client_unix; + tezos_rpc_http_server; + tezos_shell_services; + tezos_version; + ] + @ Protocol.all_optionally [Protocol.client; Protocol.plugin]) + ~linkall:true + ~opens:["Tezos_base__TzPervasives"; "Tezos_base"; "Tezos_stdlib_unix"] + +let _tezos_snoop = + public_exe + "tezos-snoop" + ~path:"src/bin_snoop" + ~internal_name:"main_snoop" + ~synopsis:"Tezos: `tezos-snoop` binary" + ~deps: + [ + tezos_base; + tezos_base_unix; + tezos_stdlib_unix; + tezos_clic; + tezos_benchmark; + tezos_benchmark_examples; + tezos_shell_benchmarks; + tezos_benchmarks_proto_alpha; + str; + ocamlgraph; + pyml; + pyml_plot; + prbnmcn_stats; + ] + ~linkall:true + ~opens:["Tezos_base__TzPervasives"; "Tezos_stdlib_unix"; "Tezos_benchmark"] + +(* We use Dune's select statement and keep uTop optional *) +(* Keeping uTop optional lets `make build` succeed, *) +(* which uses tezos/opam-repository to resolve dependencies, *) +(* on the CI. This prevents having to add dev-dependency to *) +(* tezos/opam-repository unnecessarily *) +(* We set [~static] to false because we don't release this as a static binary. *) +let _tztop = + public_exe + "tztop" + ~path:"src/tooling/tztop" + ~internal_name:"tztop_main" + ~opam:"src/tooling/tezos-tooling" + ~modes:[Byte] + ~bisect_ppx:false + ~release:false + ~static:false + ~deps: + [ + coq_of_ocaml; + ocamlformat; + bisect_ppx; + (* The following deps come from the original dune file. *) + tezos_protocol_compiler_lib; + tezos_base; + compiler_libs_toplevel; + select + ~package:utop + ~source_if_present:"tztop.utop.ml" + ~source_if_absent:"tztop.vanilla.ml" + ~target:"tztop.ml"; + ] + +let _tezos_signer = + public_exe + "tezos-signer" + ~path:"src/bin_signer" + ~internal_name:"main_signer" + ~synopsis:"Tezos: `tezos-signer` binary" + ~deps: + [ + tezos_base; + tezos_base_unix; + tezos_client_base; + tezos_client_base_unix; + tezos_client_commands; + tezos_signer_services; + tezos_rpc_http_server; + tezos_rpc_http_client_unix; + tezos_stdlib_unix; + tezos_signer_backends_unix; + ] + ~opens: + [ + "Tezos_base__TzPervasives"; + "Tezos_client_base"; + "Tezos_client_base_unix"; + "Tezos_client_commands"; + "Tezos_signer_services"; + "Tezos_rpc_http"; + "Tezos_rpc_http_server"; + "Tezos_rpc_http_client_unix"; + "Tezos_stdlib_unix"; + "Tezos_stdlib"; + ] + +let _rpc_openapi = + private_exe + "rpc_openapi" + ~path:"src/bin_openapi" + ~opam:"" + ~deps:[tezos_openapi] + +let _tezos_tps_evaluation = + public_exe + "tezos-tps-evaluation" + ~internal_name:"main_tps_evaluation" + ~path:"src/bin_tps_evaluation" + ~synopsis:"Tezos TPS evaluation tool" + ~deps: + [ + caqti; + caqti_driver_postgresql; + caqti_lwt; + cmdliner; + data_encoding; + lwt; + ppx_blob; + tezos_client_base_unix; + Protocol.(main alpha); + tezt; + tezt_tezos; + ] + ~preprocess:[PPS ppx_blob] + ~preprocessor_deps:[File "./sql/get_all_operations.sql"] + ~static:false + ~release:false + ~opens:["Tezos_base__TzPervasives"; "Tezt"; "Tezt_tezos"; "Tezt.Base"] + +(* Generate dune and opam files. *) +let () = generate () + +(* Generate active_protocol_versions. *) +let () = + let ch = open_out "../active_protocol_versions" in + Fun.protect ~finally:(fun () -> close_out ch) @@ fun () -> + let write_protocol protocol = + Option.iter (Printf.fprintf ch "%03d-") (Protocol.number protocol) ; + output_string ch (Protocol.name protocol) ; + output_char ch '\n' + in + List.iter write_protocol Protocol.active diff --git a/manifest/main.mli b/manifest/main.mli new file mode 100644 index 000000000000..e3ed90f84d2f --- /dev/null +++ b/manifest/main.mli @@ -0,0 +1,28 @@ +(*****************************************************************************) +(* *) +(* Open Source License *) +(* Copyright (c) 2021 Nomadic Labs *) +(* *) +(* Permission is hereby granted, free of charge, to any person obtaining a *) +(* copy of this software and associated documentation files (the "Software"),*) +(* to deal in the Software without restriction, including without limitation *) +(* the rights to use, copy, modify, merge, publish, distribute, sublicense, *) +(* and/or sell copies of the Software, and to permit persons to whom the *) +(* Software is furnished to do so, subject to the following conditions: *) +(* *) +(* The above copyright notice and this permission notice shall be included *) +(* in all copies or substantial portions of the Software. *) +(* *) +(* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR*) +(* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *) +(* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL *) +(* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER*) +(* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING *) +(* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER *) +(* DEALINGS IN THE SOFTWARE. *) +(* *) +(*****************************************************************************) + +(* Empty interface for the executable so that we check for unused values. + If we port the Makefile to dune we can use the following stanza instead: + (executables_implicit_empty_intf true) *) diff --git a/manifest/manifest.ml b/manifest/manifest.ml new file mode 100644 index 000000000000..8cf239cbeac2 --- /dev/null +++ b/manifest/manifest.ml @@ -0,0 +1,1308 @@ +(*****************************************************************************) +(* *) +(* Open Source License *) +(* Copyright (c) 2021 Nomadic Labs *) +(* *) +(* Permission is hereby granted, free of charge, to any person obtaining a *) +(* copy of this software and associated documentation files (the "Software"),*) +(* to deal in the Software without restriction, including without limitation *) +(* the rights to use, copy, modify, merge, publish, distribute, sublicense, *) +(* and/or sell copies of the Software, and to permit persons to whom the *) +(* Software is furnished to do so, subject to the following conditions: *) +(* *) +(* The above copyright notice and this permission notice shall be included *) +(* in all copies or substantial portions of the Software. *) +(* *) +(* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR*) +(* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *) +(* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL *) +(* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER*) +(* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING *) +(* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER *) +(* DEALINGS IN THE SOFTWARE. *) +(* *) +(*****************************************************************************) + +let ( // ) = Filename.concat + +(*****************************************************************************) +(* DUNE *) +(*****************************************************************************) + +module Dune = struct + type kind = Library | Executable | Test + + type mode = Byte | Native | JS + + let string_of_mode = function + | Byte -> "byte" + | Native -> "native" + | JS -> "js" + + type s_expr = + | E + | S of string + | G of s_expr + | H of s_expr + | V of s_expr + | [] + | ( :: ) of s_expr * s_expr + + type language = C + + type foreign_stubs = { + language : language; + flags : string list; + names : string list; + } + + (* Test whether an s-expression is empty. *) + let rec is_empty = function + | E -> true + | S _ -> false + | G s | H s | V s -> is_empty s + | [] -> true + | head :: tail -> is_empty head && is_empty tail + + (* Pretty-print an atom of an s-expression. *) + let pp_atom fmt atom = + let rec need_quotes i = + if i >= String.length atom then false + else + (* https://dune.readthedocs.io/en/stable/lexical-conventions.html#atoms + (\012 is formfeed) *) + match atom.[i] with + | ' ' | '\t' | '\n' | '\012' | '(' | ')' | '"' | ';' -> true + | _ -> need_quotes (i + 1) + in + if atom = "" || need_quotes 0 then + (* https://dune.readthedocs.io/en/stable/lexical-conventions.html#strings + It appears that %S should work in most cases, except that: + - the dune documentation does not explicitely say that it supports escaping + double quotes; + - the dune documentation says to escape %{ otherwise it is understood as a variable. + I tested and escaping double quotes actually works (with dune 2.9.0 at least). + For variables, we actually want to be able to use variables in our atoms, + so not escaping them is actually useful. In conclusion, %S looks fine. *) + Format.fprintf fmt "%S" atom + else Format.pp_print_string fmt atom + + (* Pretty-print an s-expression. *) + let rec pp_s_expr fmt s_expr = + (* If [need_space] is [true], a separator is printed before the first atom, if any. + This is only used inside lists (i.e. the :: constructor) . *) + let rec pp_s_expr_items need_space fmt = function + | E -> () + | S atom -> pp_atom fmt atom + | G _ | H _ | V _ -> + (* See below: [invalid_arg] prevents this from happening. *) + assert false + | [] -> () + | E :: tail -> pp_s_expr_items need_space fmt tail + | G s_expr :: tail -> + if is_empty s_expr then pp_s_expr_items need_space fmt tail + else ( + if need_space then Format.pp_print_space fmt () ; + Format.fprintf fmt "@[%a@]" (pp_s_expr_items false) s_expr ; + pp_s_expr_items true fmt tail) + | H s_expr :: tail -> + if is_empty s_expr then pp_s_expr_items need_space fmt tail + else ( + if need_space then Format.pp_print_space fmt () ; + Format.fprintf fmt "@[%a@]" (pp_s_expr_items false) s_expr ; + pp_s_expr_items true fmt tail) + | V s_expr :: tail -> + if is_empty s_expr then pp_s_expr_items need_space fmt tail + else ( + if need_space then Format.pp_print_space fmt () ; + Format.fprintf fmt "@[%a@]" (pp_s_expr_items false) s_expr ; + pp_s_expr_items true fmt tail) + | head :: tail -> + if need_space then Format.pp_print_space fmt () ; + pp_s_expr fmt head ; + pp_s_expr_items true fmt tail + in + match s_expr with + | E -> () + | S atom -> pp_atom fmt atom + | G _ | H _ | V _ -> + invalid_arg + "Dune.pp_sexpr: grouped s-expressions must be inside s-expressions" + | [] | _ :: _ -> + Format.fprintf fmt "(@[%a@])" (pp_s_expr_items false) s_expr + + let pp fmt dune = + let rec pp is_first_item fmt = function + | E -> () + | S _ -> invalid_arg "Dune.pp: argument must be a list, not an atom" + | G _ | H _ | V _ -> + invalid_arg + "Dune.pp: grouped s-expressions must be inside s-expressions" + | [] -> () + | E :: tail -> pp is_first_item fmt tail + | head :: tail -> + if not is_first_item then Format.fprintf fmt "@.@." ; + Format.fprintf fmt "%a%a" pp_s_expr head (pp false) tail + in + pp true fmt dune + + let of_list list = + List.fold_left (fun acc item -> item :: acc) [] (List.rev list) + + (* Convert a list of atoms (i.e. strings) to an [s_expr]. *) + let of_atom_list atoms = + List.fold_left (fun acc item -> S item :: acc) [] (List.rev atoms) + + (* Helper to define s-expressions where parts are optional. + + Basically the same as [Option.bind] except that [None] becomes [E]. *) + let opt o f = match o with None -> E | Some x -> f x + + let executable_or_library kind ?(public_names = Stdlib.List.[]) ?package + ?instrumentation ?(libraries = []) ?flags ?(inline_tests = false) + ?(preprocess = Stdlib.List.[]) ?(preprocessor_deps = Stdlib.List.[]) + ?(virtual_modules = Stdlib.List.[]) ?implements ?(wrapped = true) ?modules + ?modes ?foreign_stubs ?c_library_flags ?(private_modules = Stdlib.List.[]) + ?(deps = Stdlib.List.[]) ?js_of_ocaml (names : string list) = + [ + V + [ + S + (match (kind, names) with + | (Library, [_]) -> "library" + | (Library, _) -> "libraries" + | (Executable, [_]) -> "executable" + | (Executable, _) -> "executables" + | (Test, [_]) -> "test" + | (Test, _) -> "tests"); + (match names with + | [name] -> [S "name"; S name] + | _ -> S "names" :: of_atom_list names); + (match public_names with + | [] -> E + | [name] -> [S "public_name"; S name] + | _ :: _ -> S "public_names" :: of_atom_list public_names); + opt package (fun x -> [S "package"; S x]); + opt implements (fun x -> [S "implements"; S x]); + opt instrumentation (fun x -> [S "instrumentation"; x]); + ( opt modes @@ fun x -> + S "modes" + :: of_list (List.map (function mode -> S (string_of_mode mode)) x) + ); + (match libraries with + | [] -> E + | _ -> [V (S "libraries" :: libraries)]); + (if inline_tests then [S "inline_tests"] else E); + (match preprocess with + | [] -> E + | _ :: _ -> S "preprocess" :: of_list preprocess); + (match preprocessor_deps with + | [] -> E + | _ :: _ -> S "preprocessor_deps" :: of_list preprocessor_deps); + (match js_of_ocaml with + | None -> E + | Some flags -> S "js_of_ocaml" :: flags); + opt flags (fun x -> [S "flags"; x]); + (if not wrapped then [S "wrapped"; S "false"] else E); + (match virtual_modules with + | [] -> E + | _ -> S "virtual_modules" :: of_atom_list virtual_modules); + opt modules (fun x -> S "modules" :: x); + (match private_modules with + | [] -> E + | _ -> S "private_modules" :: of_atom_list private_modules); + ( opt foreign_stubs @@ fun x -> + [ + S "foreign_stubs"; + [S "language"; (match x.language with C -> S "c")]; + (match x.flags with + | [] -> E + | _ -> [S "flags"; of_atom_list x.flags]); + S "names" :: of_atom_list x.names; + ] ); + (opt c_library_flags @@ fun x -> [S "c_library_flags"; of_atom_list x]); + (match deps with [] -> E | _ -> S "deps" :: of_list deps); + ]; + ] + + let alias ?(deps = Stdlib.List.[]) name = + [ + S "alias"; + [S "name"; S name]; + (match deps with [] -> E | _ -> S "deps" :: of_atom_list deps); + ] + + let alias_rule ?(deps = Stdlib.List.[]) ?(alias_deps = Stdlib.List.[]) + ?deps_dune ?action ?locks ?package name = + let deps = + match (deps, alias_deps, deps_dune) with + | (_ :: _, _, Some _) | (_, _ :: _, Some _) -> + invalid_arg + "Dune.alias_rule: cannot specify both ~deps_dune and ~deps or \ + ~alias_deps" + | ([], [], Some deps) -> deps + | (_, _, None) -> + List.map (fun x -> S x) deps + @ List.map (fun x -> [S "alias"; S x]) alias_deps + |> of_list + in + [ + S "rule"; + [S "alias"; S name]; + (opt package @@ fun x -> [S "package"; S x]); + (match deps with [] -> E | _ -> S "deps" :: deps); + (opt locks @@ fun locks -> [S "locks"; S locks]); + [ + S "action"; + (match action with None -> [S "progn"] | Some action -> action); + ]; + ] + + let run command args = [S "run"; S command; G (of_atom_list args)] + + let run_exe exe_name args = run ("%{exe:" ^ exe_name ^ ".exe}") args + + let runtest_js ~package ~name = + alias_rule + "runtest_js" + ~package + ~action:(run "node" ["%{dep:./" ^ name ^ ".bc.js}"]) + + let setenv name value followup = [G [S "setenv"; S name; S value]; followup] + + let chdir_workspace_root followup = + [G [S "chdir"; S "%{workspace_root}"]; followup] + + let backend name = [S "backend"; S name] + + let ocamllex name = [S "ocamllex"; S name] + + let pps ?(args = Stdlib.List.[]) name = S "pps" :: S name :: of_atom_list args + + let include_ name = [S "include"; S name] + + let file name = [S "file"; S name] +end + +(*****************************************************************************) +(* OPAM *) +(*****************************************************************************) + +module Opam = struct + type version = string + + type version_constraint = + | Exactly of version + | At_least of version + | Less_than of version + | At_most of version + | Not of version + + type version_constraints = version_constraint list + + type dependency = { + package : string; + version : version_constraints; + with_test : bool; + optional : bool; + } + + type command_item = A of string | S of string + + type build_instruction = {command : command_item list; with_test : bool} + + type t = { + maintainer : string; + authors : string list; + homepage : string; + bug_reports : string; + dev_repo : string; + license : string; + depends : dependency list; + conflicts : dependency list; + build : build_instruction list; + synopsis : string; + } + + let pp fmt + { + maintainer; + authors; + homepage; + bug_reports; + dev_repo; + license; + depends; + conflicts; + build; + synopsis; + } = + let (depopts, depends) = List.partition (fun dep -> dep.optional) depends in + let pp_line x = + Format.kfprintf (fun fmt -> Format.pp_print_newline fmt ()) fmt x + in + let pp_string fmt string = + (* https://opam.ocaml.org/doc/Manual.html#General-syntax + ::= ( (") { }* (") ) | ( (""") { }* (""") ) + (and there is no definition for so let's assume it is "any byte"). + In other words: if there is no double quote, we can just put the whole + string in double quotes. Otherwise, we need to use three double quotes. + If the string itself contains three consecutive double quotes, it seems + that we are doomed. *) + let len = String.length string in + let rec check_quotes default i = + if i >= len then default + else if string.[i] <> '"' then + (* Continue looking for quotes. *) + check_quotes default (i + 1) + else if i + 2 >= len then + (* Found a quote, and there is no space for two more quotes. *) + `use_triple_quotes + else if string.[i + 1] = '"' then + (* Found two consecutive quotes. *) + if string.[i + 2] = '"' then `doomed + else + (* Not three consecutive quotes: continue looking for quotes. + If we don't find anything, the default is now to use three double quotes. *) + check_quotes `use_triple_quotes (i + 3) + else + (* Not three consecutive quotes: continue looking for quotes. *) + check_quotes `use_triple_quotes (i + 2) + in + match check_quotes `use_regular_quotes 0 with + | `use_regular_quotes -> Format.fprintf fmt "\"%s\"" string + | `use_triple_quotes -> Format.fprintf fmt "\"\"\"%s\"\"\"" string + | `doomed -> + invalid_arg + "Cannot use strings with three consecutive double-quotes in opam \ + strings." + in + let pp_version = pp_string in + let pp_list ?(v = false) ?(prefix = "") pp_item fmt = function + | [] -> Format.fprintf fmt "%s[]" prefix + | list -> + let pp_sep_out = + if v then Format.pp_force_newline else Format.pp_print_cut + in + let pp_sep_in = + if v then Format.pp_force_newline else Format.pp_print_space + in + Format.fprintf + fmt + "@[@[%s[%a%a@]%a]@]" + prefix + pp_sep_out + () + (Format.pp_print_list ~pp_sep:pp_sep_in pp_item) + list + pp_sep_out + () + in + let pp_version_constraint fmt = function + | Exactly version -> Format.fprintf fmt "= %a" pp_version version + | At_least version -> Format.fprintf fmt ">= %a" pp_version version + | Less_than version -> Format.fprintf fmt "< %a" pp_version version + | At_most version -> Format.fprintf fmt "<= %a" pp_version version + | Not version -> Format.fprintf fmt "!= %a" pp_version version + in + let pp_version_constraints fmt list = + Format.pp_print_list pp_version_constraint fmt list ~pp_sep:(fun fmt () -> + Format.pp_print_string fmt " & ") + in + let pp_dependency fmt {package; version; with_test; _} = + match (version, with_test) with + | ([], false) -> pp_string fmt package + | ([], true) -> Format.fprintf fmt "@[%a {with-test}@]" pp_string package + | (_ :: _, false) -> + Format.fprintf + fmt + "@[%a { %a }@]" + pp_string + package + pp_version_constraints + version + | (_ :: _, true) -> + Format.fprintf + fmt + "@[%a { with-test & %a }@]" + pp_string + package + pp_version_constraints + version + in + let pp_command_item fmt = function + | A atom -> Format.pp_print_string fmt atom + | S string -> pp_string fmt string + in + let pp_build_instruction fmt {command; with_test} = + Format.fprintf + fmt + "%a%s" + (pp_list pp_command_item) + command + (if with_test then " {with-test}" else "") + in + pp_line "opam-version: \"2.0\"" ; + pp_line "maintainer: %a" pp_string maintainer ; + pp_line "%a" (pp_list ~prefix:"authors: " pp_string) authors ; + pp_line "homepage: %a" pp_string homepage ; + pp_line "bug-reports: %a" pp_string bug_reports ; + pp_line "dev-repo: %a" pp_string dev_repo ; + pp_line "license: %a" pp_string license ; + pp_line "%a" (pp_list ~v:true ~prefix:"depends: " pp_dependency) depends ; + if depopts <> [] then + pp_line "%a" (pp_list ~v:true ~prefix:"depopts: " pp_dependency) depopts ; + if conflicts <> [] then + pp_line + "%a" + (pp_list ~v:true ~prefix:"conflicts: " pp_dependency) + conflicts ; + pp_line "%a" (pp_list ~prefix:"build: " pp_build_instruction) build ; + pp_line "synopsis: %a" pp_string synopsis ; + () +end + +(*****************************************************************************) +(* TARGETS *) +(*****************************************************************************) + +module Target = struct + let invalid_argf x = Printf.ksprintf invalid_arg x + + type external_ = { + name : string; + opam : string option; + version : Opam.version_constraints; + } + + type opam_only = {name : string; version : Opam.version_constraints} + + type modules = + | All + | Modules of string list + | All_modules_except of string list + + (* [internal_name] is the name for [name] stanzas in [dune] while [public_name] is the + name for [public_name] stanzas in [dune] and the name in [.opam] files. *) + type full_name = {internal_name : string; public_name : string} + + (* Non-empty lists. *) + type 'a ne_list = 'a * 'a list + + type kind = + | Public_library of full_name + | Private_library of string + | Public_executable of full_name ne_list + | Private_executable of string ne_list + | Test of string ne_list + | Test_executable of string ne_list + + type preprocessor_dep = File of string + + type internal = { + bisect_ppx : bool; + c_library_flags : string list option; + conflicts : target list; + dep_files : string list; + deps : target list; + dune : Dune.s_expr; + foreign_stubs : Dune.foreign_stubs option; + implements : target option; + inline_tests : bool; + js_of_ocaml : Dune.s_expr option; + kind : kind; + linkall : bool; + modes : Dune.mode list option; + modules : modules; + nopervasives : bool; + ocaml : Opam.version_constraints option; + opam : string option; + opaque : bool; + opens : string list; + path : string; + preprocess : preprocessor list; + preprocessor_deps : preprocessor_dep list; + private_modules : string list; + opam_only_deps : target list; + release : bool; + static : bool; + static_cclibs : string list; + synopsis : string option; + virtual_modules : string list; + wrapped : bool; + } + + and preprocessor = PPS of target | PPS_args of target * string list + + and select = { + package : target; + source_if_present : string; + source_if_absent : string; + target : string; + } + + and target = + | Internal of internal + | Vendored of string + | External of external_ + | Opam_only of opam_only + | Optional of target + | Select of select + + let convert_to_identifier = String.map @@ function '-' | '.' -> '_' | c -> c + + (* List of all targets, in reverse order of registration. *) + let registered = ref [] + + module String_map = Map.Make (String) + + (* List of targets sorted by path, + so that we can create dune files with multiple targets. *) + let by_path = ref String_map.empty + + (* List of targets sorted by opam package name, + so that we can create opam files with multiple targets. *) + let by_opam = ref String_map.empty + + let register_internal ({path; opam; _} as internal) = + let old = String_map.find_opt path !by_path |> Option.value ~default:[] in + by_path := String_map.add path (internal :: old) !by_path ; + Option.iter + (fun opam -> + let old = + String_map.find_opt opam !by_opam |> Option.value ~default:[] + in + by_opam := String_map.add opam (internal :: old) !by_opam) + opam ; + registered := internal :: !registered ; + Internal internal + + let rec name_for_errors = function + | Vendored name | External {name; _} | Opam_only {name; _} -> name + | Optional target | Select {package = target; _} -> name_for_errors target + | Internal {kind; _} -> ( + match kind with + | Public_library {public_name = name; _} + | Private_library name + | Public_executable ({public_name = name; _}, _) + | Private_executable (name, _) + | Test (name, _) + | Test_executable (name, _) -> + name) + + let rec names_for_dune = function + | Vendored name | External {name; _} | Opam_only {name; _} -> (name, []) + | Optional target | Select {package = target; _} -> names_for_dune target + | Internal {kind; _} -> ( + match kind with + | Public_library {public_name; _} -> (public_name, []) + | Private_library internal_name -> (internal_name, []) + | Public_executable (head, tail) -> + (head.public_name, List.map (fun x -> x.public_name) tail) + | Private_executable names | Test names | Test_executable names -> names + ) + + let rec library_name_for_dune = function + | Vendored name | External {name; _} | Opam_only {name; _} -> Ok name + | Optional target | Select {package = target; _} -> + library_name_for_dune target + | Internal {kind; _} -> ( + match kind with + | Public_library {public_name; _} -> Ok public_name + | Private_library internal_name -> Ok internal_name + | Public_executable ({public_name = name; _}, _) + | Private_executable (name, _) + | Test (name, _) + | Test_executable (name, _) -> + Error name) + + let iter_internal_by_path f = + String_map.iter (fun path internals -> f path (List.rev internals)) !by_path + + let iter_internal_by_opam f = + String_map.iter (fun opam internals -> f opam (List.rev internals)) !by_opam + + type 'a maker = + ?all_modules_except:string list -> + ?bisect_ppx:bool -> + ?c_library_flags:string list -> + ?conflicts:target list -> + ?dep_files:string list -> + ?deps:target list -> + ?dune:Dune.s_expr -> + ?foreign_stubs:Dune.foreign_stubs -> + ?implements:target -> + ?inline_tests:bool -> + ?js_of_ocaml:Dune.s_expr -> + ?linkall:bool -> + ?modes:Dune.mode list -> + ?modules:string list -> + ?nopervasives:bool -> + ?ocaml:Opam.version_constraints -> + ?opam:string -> + ?opaque:bool -> + ?opens:string list -> + ?preprocess:preprocessor list -> + ?preprocessor_deps:preprocessor_dep list -> + ?private_modules:string list -> + ?opam_only_deps:target list -> + ?release:bool -> + ?static:bool -> + ?static_cclibs:string list -> + ?synopsis:string -> + ?virtual_modules:string list -> + ?wrapped:bool -> + path:string -> + 'a -> + target + + let internal make_kind ?all_modules_except ?bisect_ppx ?c_library_flags + ?(conflicts = []) ?(dep_files = []) ?(deps = []) ?(dune = Dune.[]) + ?foreign_stubs ?implements ?(inline_tests = false) ?js_of_ocaml + ?(linkall = false) ?modes ?modules ?(nopervasives = false) ?ocaml ?opam + ?(opaque = false) ?(opens = []) ?(preprocess = []) + ?(preprocessor_deps = []) ?(private_modules = []) ?(opam_only_deps = []) + ?release ?static ?static_cclibs ?synopsis ?(virtual_modules = []) + ?(wrapped = true) ~path names = + let kind = make_kind names in + let opam = + match opam with + | Some "" -> None + | Some _ as x -> x + | None -> ( + match kind with + | Public_library {public_name; _} + | Public_executable ({public_name; _}, []) -> + Some (path // public_name) + | Public_executable ({public_name; _}, _ :: _) -> + invalid_argf + "for targets which provide more than one public executables \ + such as %S, you must specify ~opam (set it to \"\" for no \ + opam file)" + public_name + | Private_library name -> + invalid_argf + "for targets which provide private libraries such as %S, you \ + must specify ~opam (set it to \"\" for no opam file)" + name + | Private_executable (name, _) -> + invalid_argf + "for targets which provide private executables such as %S, you \ + must specify ~opam (set it to \"\" for no opam file)" + name + | Test (name, _) -> + invalid_argf + "for targets which provide tests such as %S, you must specify \ + ~opam (set it to \"\" for no opam file)" + name + | Test_executable (name, _) -> + invalid_argf + "for targets which provide test executables such as %S, you \ + must specify ~opam (set it to \"\" for no opam file)" + name) + in + let release = + match release with + | Some release -> release + | None -> ( match kind with Public_executable _ -> true | _ -> false) + in + let static = + match static with + | Some static -> static + | None -> ( + match static_cclibs with + | Some _ -> true + | None -> ( + match kind with Public_executable _ -> true | _ -> false)) + in + let static_cclibs = Option.value static_cclibs ~default:[] in + let modules = + match (modules, all_modules_except) with + | (None, None) -> All + | (Some modules, None) -> Modules modules + | (None, Some all_modules_except) -> All_modules_except all_modules_except + | (Some _, Some _) -> + invalid_arg + "Target.internal: cannot specify both ?modules and \ + ?all_modules_except" + in + let not_a_test = + match kind with + | Public_library _ | Private_library _ | Public_executable _ + | Private_executable _ -> + true + | Test _ | Test_executable _ -> false + in + let bisect_ppx = Option.value bisect_ppx ~default:not_a_test in + register_internal + { + bisect_ppx; + c_library_flags; + conflicts; + dep_files; + deps; + dune; + foreign_stubs; + implements; + inline_tests; + js_of_ocaml; + kind; + linkall; + modes; + modules; + nopervasives; + ocaml; + opam; + opaque; + opens; + path; + preprocess; + preprocessor_deps; + private_modules; + opam_only_deps; + release; + static; + static_cclibs; + synopsis; + virtual_modules; + wrapped; + } + + let public_lib ?internal_name = + internal @@ fun public_name -> + let internal_name = + Option.value internal_name ~default:(convert_to_identifier public_name) + in + Public_library {internal_name; public_name} + + let private_lib = internal @@ fun name -> Private_library name + + let public_exe ?internal_name = + internal @@ fun public_name -> + let internal_name = + Option.value internal_name ~default:(convert_to_identifier public_name) + in + Public_executable ({internal_name; public_name}, []) + + let public_exes ?internal_names = + internal @@ fun public_names -> + let names = + match internal_names with + | None -> + List.map + (fun public_name -> + {internal_name = convert_to_identifier public_name; public_name}) + public_names + | Some internal_names -> ( + try + List.map2 + (fun internal_name public_name -> {internal_name; public_name}) + internal_names + public_names + with Invalid_argument _ -> + invalid_argf + "Target.public_exes: you must specify exactly one internal name \ + per public name") + in + match names with + | [] -> invalid_argf "Target.public_exes: at least one name must be given" + | head :: tail -> Public_executable (head, tail) + + let private_exe = + internal @@ fun internal_name -> Private_executable (internal_name, []) + + let test = internal @@ fun test_name -> Test (test_name, []) + + let tests = + internal @@ fun test_names -> + match test_names with + | [] -> invalid_arg "Target.tests: at least one name must be given" + | head :: tail -> Test (head, tail) + + let test_exe = internal @@ fun test_name -> Test_executable (test_name, []) + + let test_exes = + internal @@ fun test_names -> + match test_names with + | [] -> invalid_arg "Target.test_exes: at least one name must be given" + | head :: tail -> Test_executable (head, tail) + + let vendored_lib name = Vendored name + + let external_lib ?opam name version = + let opam = + match opam with None -> Some name | Some "" -> None | Some _ as x -> x + in + External {name; opam; version} + + let external_sublib parent name = + match parent with + | External {opam; version; _} -> External {name; opam; version} + | Opam_only _ -> + invalid_arg + "Target.external_sublib: parent must be a non-opam-only external lib" + | Internal _ | Vendored _ -> + invalid_arg "Target.external_sublib: parent must be an external lib" + | Optional _ -> + invalid_arg + "Target.external_sublib: Optional should be used in dependency \ + lists, not when registering" + | Select _ -> + invalid_arg + "Target.external_sublib: Select should be used in dependency lists, \ + not when registering" + + let opam_only name version = Opam_only {name; version} + + let optional target = Optional target + + let select ~package ~source_if_present ~source_if_absent ~target = + Select {package; source_if_present; source_if_absent; target} +end + +(*****************************************************************************) +(* GENERATOR *) +(*****************************************************************************) + +module String_set = Set.Make (String) + +let has_prefix ~prefix string = + let prefix_len = String.length prefix in + String.length string >= prefix_len && String.sub string 0 prefix_len = prefix + +(* Gather the list of generated files so that we can find out whether + there are other files that we should have generated. *) +let generated_files = ref String_set.empty + +(* Write a file relatively to the root directory of the repository. *) +let write filename f = + let filename = Filename.parent_dir_name // filename in + if String_set.mem filename !generated_files then + failwith + (filename ^ " is generated twice; did you declare the same library twice?") ; + generated_files := String_set.add filename !generated_files ; + let outch = open_out filename in + match f (Format.formatter_of_out_channel outch) with + | exception exn -> + close_out outch ; + raise exn + | x -> + close_out outch ; + x + +let generate_dune ~dune_file_has_static_profile (internal : Target.internal) = + let (libraries, empty_files_to_create) = + let empty_files_to_create = ref [] in + let get_library (dep : Target.target) = + let name = + match Target.library_name_for_dune dep with + | Ok name -> name + | Error name -> + invalid_arg + ("unsupported: in " + ^ Target.name_for_errors (Internal internal) + ^ ": dependency on a target that is not a library (" ^ name ^ ")" + ) + in + match dep with + | Opam_only _ -> Dune.E + | Internal _ | External _ | Vendored _ -> Dune.S name + | Optional _ -> + (* [Optional] dependencies abuse the alternative dependency mechanism of dune. + The semantic of [(select a from (b -> c) (-> d))] is: if libraries + [b] are present, [cp c a] and link [b] else [cp d a]. Here, we don't + care about the cp part as we are not using the file obtained at + all. So, we give them names only meant to not clash with anything + and copy always the same (generated itself) empty file "void_for_linking". *) + let fix_name = String.map @@ function '.' -> '-' | c -> c in + let void_name = "void_for_linking-" ^ fix_name name in + let empty_name = void_name ^ ".empty" in + empty_files_to_create := empty_name :: !empty_files_to_create ; + Dune. + [ + H [S "select"; S void_name; S "from"]; + [H [S name; S "->"; S empty_name]]; + [H [S "->"; S empty_name]]; + ] + | Select {package = _; source_if_present; source_if_absent; target} -> + Dune. + [ + G [S "select"; S target; S "from"]; + [G [S name; S "->"; S source_if_present]]; + [G [S "->"; S source_if_absent]]; + ] + in + let libraries = List.map get_library internal.deps |> Dune.of_list in + (libraries, List.rev !empty_files_to_create) + in + let flags = List.map (fun m -> Dune.(G [S "-open"; S m])) internal.opens in + let flags = if internal.linkall then Dune.S "-linkall" :: flags else flags in + let flags = + if internal.nopervasives then Dune.S "-nopervasives" :: flags else flags + in + let flags = if internal.opaque then Dune.S "-opaque" :: flags else flags in + let flags = + if dune_file_has_static_profile && not internal.static then + (* Disable static compilation for this particular target + (the static profile is global for the dune file). + This must be at the end of the flag list. *) + flags @ [Dune.(G [S "\\"; S "-ccopt"; S "-static"])] + else flags + in + let flags = + match flags with + | [] -> None + | _ :: _ -> Some (Dune.of_list (Dune.S ":standard" :: flags)) + in + let preprocess = + let make_pp (preprocessor : Target.preprocessor) = + let pps target args = + match Target.names_for_dune target with + | (name, []) -> Dune.pps ~args name + | (hd, (_ :: _ as tl)) -> + invalid_arg + ("preprocessor target has multiple names, don't know which one \ + to choose: " + ^ String.concat ", " (hd :: tl)) + in + match preprocessor with + | PPS target -> pps target [] + | PPS_args (target, args) -> pps target args + in + List.map make_pp internal.preprocess + in + let preprocessor_deps = + let make_pp_dep (Target.File filename) = Dune.file filename in + List.map make_pp_dep internal.preprocessor_deps + in + let modules = + match internal.modules with + | All -> None + | Modules modules -> Some (Dune.of_atom_list modules) + | All_modules_except modules -> + Some Dune.[S ":standard" :: S "\\" :: Dune.of_atom_list modules] + in + let create_empty_files = + match empty_files_to_create with + | [] -> Dune.E + | _ :: _ -> + let make_write empty_file = + (* We use H instead of G because we *really* need those to be on + a single line until we update link_protocol.sh. *) + Dune.[H [S "write-file"; S empty_file; S ""]] + in + let writes = + List.map make_write empty_files_to_create |> Dune.of_list + in + Dune.[S "rule"; [S "action"; S "progn" :: writes]] + in + let package = + match (internal.kind, internal.opam) with + | ((Public_executable _ | Test _), Some opam) -> + Some (Filename.basename opam) + | _ -> None + in + let instrumentation = + if internal.bisect_ppx then Some (Dune.backend "bisect_ppx") else None + in + let ((kind : Dune.kind), internal_names, public_names) = + let get_internal_name {Target.internal_name; _} = internal_name in + let get_public_name {Target.public_name; _} = public_name in + match internal.kind with + | Public_library name -> + (Library, [get_internal_name name], [get_public_name name]) + | Private_library name -> (Library, [name], []) + | Public_executable (head, tail) -> + ( Executable, + List.map get_internal_name (head :: tail), + List.map get_public_name (head :: tail) ) + | Private_executable (head, tail) -> (Executable, head :: tail, []) + | Test (head, tail) -> (Test, head :: tail, []) + | Test_executable (head, tail) -> (Executable, head :: tail, []) + in + let get_virtual_target_name target = + match Target.library_name_for_dune target with + | Ok name -> name + | Error name -> + invalid_arg + ("unsupported: ~implements on a target that is not a library (" ^ name + ^ ")") + in + Dune.( + executable_or_library + kind + internal_names + ~public_names + ?package + ?instrumentation + ~libraries + ?flags + ~inline_tests:internal.inline_tests + ~preprocess + ~preprocessor_deps + ~virtual_modules:internal.virtual_modules + ?implements:(Option.map get_virtual_target_name internal.implements) + ~wrapped:internal.wrapped + ?modules + ?modes:internal.modes + ?foreign_stubs:internal.foreign_stubs + ?c_library_flags:internal.c_library_flags + ~private_modules:internal.private_modules + ~deps:(List.map Dune.file internal.dep_files) + ?js_of_ocaml:internal.js_of_ocaml + :: create_empty_files :: internal.dune) + +let static_profile (cclibs : string list) = + Dune. + [ + S "static"; + [ + S "flags"; + [ + S ":standard"; + G [S "-ccopt"; S "-static"]; + (match cclibs with + | [] -> E + | _ :: _ -> + let arg = + List.map (fun lib -> "-l" ^ lib) cclibs |> String.concat " " + in + G [S "-cclib"; S arg]); + ]; + ]; + ] + +(* Remove duplicates from a list. + Items that are not removed are kept in their original order. + In case of duplicates, the first occurrence is kept. + [get_key] returns the comparison key (a string). + [merge] is used in case a key is present several times. *) +let deduplicate_list ?merge get_key list = + let add ((list, set) as acc) item = + let key = get_key item in + if String_set.mem key set then + match merge with + | None -> acc + | Some merge -> + (* Go back and merge the previous occurrence. *) + let merge_if_equal previous_item = + if String.compare (get_key previous_item) key = 0 then + merge previous_item item + else previous_item + in + let list = List.map merge_if_equal list in + (list, set) + else (item :: list, String_set.add key set) + in + List.fold_left add ([], String_set.empty) list |> fst |> List.rev + +let generate_dune_files () = + Target.iter_internal_by_path @@ fun path internals -> + let has_static = + List.exists (fun (internal : Target.internal) -> internal.static) internals + in + let dunes = + List.map (generate_dune ~dune_file_has_static_profile:has_static) internals + in + write (path // "dune") @@ fun fmt -> + Format.fprintf + fmt + "; This file was automatically generated, do not edit.@.; Edit file \ + manifest/main.ml instead.@.@." ; + let env = + if has_static then + let cclibs = + List.map + (fun (internal : Target.internal) -> internal.static_cclibs) + internals + |> List.flatten |> deduplicate_list Fun.id + in + [static_profile cclibs] + else [] + in + (match env with + | [] -> () + | _ :: _ -> + let env_stanza = Dune.[S "env" :: of_list env] in + Format.fprintf fmt "%a@." Dune.pp env_stanza) ; + List.iteri + (fun i dune -> + if i <> 0 || has_static then Format.fprintf fmt "@." ; + Format.fprintf fmt "%a@." Dune.pp dune) + dunes + +(* Convert [target] into an opam dependency so that it can be added as a dependency + in packages that depend on it. + + [for_package] is the name of the opam package that we are generating + and in which the dependency will be added. + If it is the same package as the one in which [target] belongs, + [None] is returned, since a package cannot depend on itself + and there is no need to. *) +let rec as_opam_dependency ~(for_package : string) ~with_test + (target : Target.target) : Opam.dependency option = + match target with + | Internal {opam = None; _} | External {opam = None; _} -> None + | Internal {opam = Some package; _} -> + let package = Filename.basename package in + if package = for_package then None + else Some {Opam.package; version = []; with_test; optional = false} + | Vendored package -> + Some {Opam.package; version = []; with_test; optional = false} + | External {opam = Some opam; version; _} | Opam_only {name = opam; version} + -> + Some {Opam.package = opam; version; with_test; optional = false} + | Optional target | Select {package = target; _} -> + Option.map + (fun (dep : Opam.dependency) -> {dep with optional = true}) + (as_opam_dependency ~for_package ~with_test target) + +let generate_opam this_package (internals : Target.internal list) : Opam.t = + let map l f = List.map f l in + let depends = + List.flatten @@ map internals + @@ fun internal -> + let with_test = + match internal.kind with Test _ | Test_executable _ -> true | _ -> false + in + let deps = + Option.to_list internal.implements + @ internal.deps @ internal.opam_only_deps + in + let deps = + List.filter_map + (as_opam_dependency ~for_package:this_package ~with_test) + deps + in + let get_preprocess_dep (Target.PPS target | PPS_args (target, _)) = + as_opam_dependency ~for_package:this_package ~with_test target + in + List.filter_map get_preprocess_dep internal.preprocess @ deps + in + let depends = + match + List.filter_map + (fun (internal : Target.internal) -> internal.ocaml) + internals + with + | [] -> depends + | versions -> + { + Opam.package = "ocaml"; + version = List.flatten versions; + with_test = false; + optional = false; + } + :: depends + in + let depends = + { + Opam.package = "dune"; + version = [At_least "2.9"]; + with_test = false; + optional = false; + } + :: depends + in + let depends = + (* Remove duplicate dependencies but when one occurs twice, + only keep {with-test} if both dependencies had it. *) + let merge (a : Opam.dependency) (b : Opam.dependency) = + {a with with_test = a.with_test && b.with_test} + in + deduplicate_list ~merge (fun {Opam.package; _} -> package) depends + in + let conflicts = + List.flatten @@ map internals + @@ fun internal -> + List.filter_map + (as_opam_dependency ~for_package:this_package ~with_test:false) + internal.conflicts + in + let synopsis = + String.concat " " @@ List.flatten @@ map internals + @@ fun internal -> Option.to_list internal.synopsis + in + { + maintainer = "contact@tezos.com"; + 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; + conflicts; + build = + [ + { + command = [S "dune"; S "build"; S "-p"; A "name"; S "-j"; A "jobs"]; + with_test = false; + }; + { + command = [S "dune"; S "runtest"; S "-p"; A "name"; S "-j"; A "jobs"]; + with_test = true; + }; + ]; + synopsis; + } + +let generate_opam_files () = + (* Note: + - dune files are not always in the same directory of their corresponding .opam + (usually the .opam is not in a subdir though); + - there can be multiple .opam in the same directory, for a single dune file + (or even multiple dune files when some of those dune are in subdirectories). + So each [Target.t] comes with an [opam] path, which defaults to being in the + same directory as the dune file, with the package as filename (suffixed with .opam), + but one can specify a custom .opam path too. *) + Target.iter_internal_by_opam @@ fun opam_filename internals -> + let opam = generate_opam (Filename.basename opam_filename) internals in + write (opam_filename ^ ".opam") @@ fun fmt -> + Format.fprintf + fmt + "# This file was automatically generated, do not edit.@.# Edit file \ + manifest/main.ml instead.@.%a" + Opam.pp + opam + +let check_for_non_generated_files () = + let rec find_opam_and_dune_files acc dir = + let dir_contents = Sys.readdir dir in + let add_item acc filename = + let full_filename = dir // filename in + if Sys.is_directory full_filename then + find_opam_and_dune_files acc full_filename + else if filename = "dune" || Filename.extension filename = ".opam" then + String_set.add full_filename acc + else acc + in + Array.fold_left add_item acc dir_contents + in + let all_files = find_opam_and_dune_files String_set.empty "../src" in + let diff = String_set.diff all_files !generated_files in + let warn filename = + (* For now we don't generate: + - protocol files (that's a TODO); + - lib_time_measurement (its dune structure is *very* specific); + - src/lib_protocol_compiler/test/dune (it does not define any library, + executable or test stanza, it only defines aliases). *) + if + (not (has_prefix ~prefix:"../src/proto_" filename)) + && (not (has_prefix ~prefix:"../src/lib_time_measurement/" filename)) + && filename <> "../src/lib_protocol_compiler/test/dune" + then Printf.eprintf "Warning: %s: exists but was not generated\n%!" filename + in + String_set.iter warn diff + +let generate () = + Printexc.record_backtrace true ; + try + generate_dune_files () ; + generate_opam_files () ; + check_for_non_generated_files () + with exn -> + Printexc.print_backtrace stderr ; + prerr_endline ("Error: " ^ Printexc.to_string exn) ; + exit 1 + +include Target diff --git a/manifest/manifest.mli b/manifest/manifest.mli new file mode 100644 index 000000000000..5c151042ca9d --- /dev/null +++ b/manifest/manifest.mli @@ -0,0 +1,603 @@ +(*****************************************************************************) +(* *) +(* Open Source License *) +(* Copyright (c) 2021 Nomadic Labs *) +(* *) +(* Permission is hereby granted, free of charge, to any person obtaining a *) +(* copy of this software and associated documentation files (the "Software"),*) +(* to deal in the Software without restriction, including without limitation *) +(* the rights to use, copy, modify, merge, publish, distribute, sublicense, *) +(* and/or sell copies of the Software, and to permit persons to whom the *) +(* Software is furnished to do so, subject to the following conditions: *) +(* *) +(* The above copyright notice and this permission notice shall be included *) +(* in all copies or substantial portions of the Software. *) +(* *) +(* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR*) +(* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *) +(* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL *) +(* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER*) +(* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING *) +(* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER *) +(* DEALINGS IN THE SOFTWARE. *) +(* *) +(*****************************************************************************) + +(** Generate dune and opam files from common definitions. *) + +module Dune : sig + (** Dune AST. *) + + (** Compilation modes for executables. + + - [Byte]: compile to bytecode. + - [Native]: compile to native code. + - [JS]: compile to JavaScript. *) + type mode = Byte | Native | JS + + (** S-expressions. + + S-expressions are lists of atoms and/or s-expressions. + So basically we define the type of lists (with [] and ::), except that + items can be lists themselves. By using [] and :: we get to use the list syntax. + + Constructor [S] is for atoms ([S] stands for [String]). + + Constructor [E] stands for "epsilon" or "empty". + For instance, [[S "x"; E; S "y"]] is equivalent to [[S "x"; S "y"]]. + A typical use case is to insert expressions conditionally, for instance: + [[S "x"; (if y then S "y" else E); S "z"]]. + + Constructor [G] stands for "group". + It is used to inline an s-expression (i.e. put all of its atoms inside the + parent list without parentheses around those atoms). + Additionally, those atoms are grouped together into a box when pretty-printing, + so they can be put on a single line instead of each atom being put on its own line. + + Constructor [H] stands for "horizontal group". + It is exactly the same as [G] except that the box enforces that atoms + are not separated by newlines. + + Constructor [V] stands for "vertical group". + It is exactly the same as [G] except that the box enforces that atoms + are separated by newlines. *) + type s_expr = + | E + | S of string + | G of s_expr + | H of s_expr + | V of s_expr + | [] + | ( :: ) of s_expr * s_expr + + (** Convert a list of [s_expr] to an [s_expr]. + + [of_list [a; b; c]] is [(a b c)]. + + Tip: you can remove the outer parentheses using [G], [H] or [V]. *) + val of_list : s_expr list -> s_expr + + (** Programming languages for foreign stubs. + + Only the C programming language is currently supported. *) + type language = C + + (** Foreign stubs description. + + - [language] is the foreign language of the stubs. + - [flags] is a list of flags to pass on compilation, such as [-I] flags. + - [names] is the names of the stubs. + + This becomes a [(foreign_stubs (language ...) (flags ...) (names ...))] stanza + in the generated dune file. *) + type foreign_stubs = { + language : language; + flags : string list; + names : string list; + } + + (** Make an [alias] stanza. + + Example: [alias "abc"] results in [(alias (name abc))], + and [alias "abc" ~deps:["x"; "y"]] results in [(alias (name abc) (deps x y))]. + + Such stanzas are usually used to give a name (such as [abc]) to a set of targets, + so that one can build all of those targets using [dune build @abc]. *) + val alias : ?deps:string list -> string -> s_expr + + (** Make a [rule] stanza for an alias, of the form [(rule (alias ...) ...)]. + + To specify dependencies, either use [deps] and [alias_deps], or [deps_dune]. + The former two are simpler to use since they expect strings, but sometimes + you may need to specify complex stanzas, in which case you can use [deps_dune]. + + - [deps] is a list of target files to build before this rule. + It becomes a [deps] stanza. + + - [alias_deps] is a list of target aliases to build before this rule. + They are added to the [deps] stanza in [alias] stanzas + (resulting in [(deps (alias ...) ...)]. + + - [deps_dune] can be used to specify the arguments of the [deps] stanza + directly as an s-expression instead. + + - [action] specifies the command to run when building this rule. + It defaults to [(progn)], i.e. do nothing. + Typically, actions can be built using {!run} or {!run_exe}. + + - [locks] specifies a path to lock when running this rule. + Other rules that require the same locks will not be run in parallel. + Different paths may denote the same lock (e.g. [./x] and [x]), + but paths do not denote actual files: files are not actually created. + + - [package] specifies the opam package in which this rule belong. + This is important in particular for [runtest] rules, so that dune knows + which tests to run when opam runs the tests for a package. + + The last [string] argument is the name of the alias. + For instance, if this name is [abc], you can build the rule with [dune build @abc]. *) + val alias_rule : + ?deps:string list -> + ?alias_deps:string list -> + ?deps_dune:s_expr -> + ?action:s_expr -> + ?locks:string -> + ?package:string -> + string -> + s_expr + + (** Make a stanza of the form [(run ...)]. + + Example: [run "%{gen}" ["%{targets}"]] results in [(run %{gen} %{targets})]. + + Such stanzas are typically used in [action] parameters of {!alias_rule}. *) + val run : string -> string list -> s_expr + + (** Make a stanza of the form [(run %{exe:....exe} ...)]. + + Example: [run_exe "main" ["-v"; "x.txt"]] + results in [(run %{exe:main.exe} -v x.txt)]. *) + val run_exe : string -> string list -> s_expr + + (** Make a [setenv] stanza. + + Example: [setenv "HOME" "/tmp" (run_exe "test" [])] results in + [(setenv HOME /tmp (run %{exe:test.exe}))]. + + This causes the executed command to be run with [HOME=/tmp] in its environment. *) + val setenv : string -> string -> s_expr -> s_expr + + (** Make a [(chdir %{workspace_root} ...)] stanza. + + Such stanzas are typically used to wrap [run] stanzas (e.g. built with {!run_exe}) + to make them run in the root directory of workspace. + + Example: [chdir_workspace_root (run_exe "test" [])] results in + [(chdir %{workspace_root} (run %{exe:test.exe}))]. *) + val chdir_workspace_root : s_expr -> s_expr + + (** Make a [runtest_js] rule. + + This makes stanza of the form: + {[ + (rule + (alias runtest_js) + (package ) + (action (run node %{dep:./.bc.js}))) + ]} *) + val runtest_js : package:string -> name:string -> s_expr + + (** Make an [ocamllex] stanza. + + Example: [ocamllex "lexer"] results in [(ocamllex parser)], which tells dune + that [lexer.ml] can be obtained from [lexer.mll] using ocamllex. *) + val ocamllex : string -> s_expr + + (** Make an [include] stanza. + + Example: [include_ "rules.inc"] results in [(include rules.inc)]. + + Such stanzas are used at toplevel to include other dune files. *) + val include_ : string -> s_expr +end + +module Opam : sig + (** Opam version constraints. *) + + (** Package versions. + + Example: ["1.1.0"] *) + type version = string + + (** Package version constraints. + + - [Exactly v] means that the version number must be [v]. + It becomes [=] in the generated opam file. + + - [At_least v] means that the version number must be [v] or more. + It becomes [>=] in the generated opam file. + + - [Less_than v] means that the version number must be lower than [v]. + In particular it cannot be [v]. + It becomes [<] in the generated opam file. + + - [At_most v] means that the version number must be [v] or less. + It becomes [<=] in the generated opam file. + + - [Not v] means that the version number cannot be [v]. + It becomes [!=] in the generated opam file. *) + type version_constraint = + | Exactly of version + | At_least of version + | Less_than of version + | At_most of version + | Not of version + + (** Conjunctions of package version constraints. + + Example: [[ At_least "1.1.0"; Less_than "2.0"; Not "1.3.0" ]] + means [>= 1.1.0 & < 2.0 & != 1.3.0], i.e. the major version number + must be 1 and the minor version number must be at least 1 but not 3. *) + type version_constraints = version_constraint list +end + +(** Module lists for the [(modules)] stanza in [dune] files. + + - [All] means "all modules of the current directory". + This is the default. + + - [Modules] means "exactly this list of modules". + Use this for directories which contain several libraries, executables or tests, + to specify which modules are used by which targets. + + - [All_modules_except] can be used to express the set difference of + [All] and [Modules]. Use this if you just want to exclude some files. + + For most cases [All] is strongly recommended. + If you are tempted to explicitly list modules, consider splitting + your files in subdirectories instead. One exception is if you need to + be extra sure on which modules are available. Even then, it is recommended + to not put extra source files in the same directory. *) +type modules = + | All + | Modules of string list + | All_modules_except of string list + +(** Preprocessor dependencies. + + - [File]: becomes a [(preprocessor_deps (file ...))] stanza in the [dune] file. *) +type preprocessor_dep = File of string + +(** Target descriptions. + + Targets can be external or internal. + External targets are dependencies that are not part of the project + and for which no [dune] and [.opam] file need to be generated. + They can be defined anyway, using e.g. [external_lib], so that internal + targets can declare that they need them. + + Internal targets are libraries (public or private), executables (public or private) + and tests that are defined in your [dune] files and packaged in your [.opam] files. + These are the main values you want to define; everything else is only a tool to + define internal targets. From those internal target descriptions, [dune] and [.opam] + files can be generated. + + Each internal target corresponds to part of a [dune] file, and optionally to + one [.opam] file. The [dune] file is located in the directory specified by + the [path] argument that is given to the function used to declare the target. + The full path of the [.opam] file is specified by the [opam] argument, + to which extension [.opam] is appended. + + Note that several internal targets may use the same [path], + in which case all of them will be put in the same [dune] file. + Similarly, several internal targets may use the same [opam] path, + in which case all of them will be considered part of this same opam package. + Alternatively, targets for the same [path] file can have different [opam] paths. + This means that you can have one [dune] file corresponding to several [.opam] files, + or one [.opam] file with several [dune] files, or any other combinations. *) +type target + +(** Preprocessors. + + - [PPS]: becomes a [(preprocess (pps ...))] stanza in the [dune] file. + The target's package is also added as a dependency in the [.opam] file. + + - [PPS_args (target, args)]: becomes a [(preprocess (pps ))] + stanza in the [dune] file. It is thus a more general version of [PPS] + that allows to pass arguments to the preprocessor. *) +and preprocessor = PPS of target | PPS_args of target * string list + +(** Functions that build internal targets. + + The ['a] argument is instantiated by the relevant type for the name(s) + of the target. + + - [all_modules_except]: short-hand for [~modules: (All_module_except ...)]. + + - [bisect_ppx]: if [true], the target's [dune] file is generated + with [(instrumentation (backend bisect_ppx))] for this target. + This makes it possible to compute coverage. It is recommended to set this + for all libraries and executables except those that are only used for tests + (and thus are never run by users). + + - [c_library_flags]: specifies a [(c_library_flags ...)] stanza. + Those flags are passed to the C compiler when constructing the library archive + for the foreign stubs. + + - [conflicts]: a list of target; all of their packages will be put in the + [conflicts] section of the [.opam] file. + + - [dep_files]: a list of files to add as dependencies using [(deps (file ...))] + in the [dune] file. A typical use is if you generate code: this tells [dune] + to make those files available to your generator. + + - [deps]: a list of targets to add as dependencies using [(libraries)] + in the [dune] file. + + - [dune]: added to the [dune] file after this target. + A typical use is to add [rule] or [install] stanzas. + + - [foreign_stubs]: specifies a [(foreign_stubs)] stanza for the [dune] target. + + - [implements]: specifies an [(implements)] stanza for the [dune] target. + + - [inline_tests]: if [true], add [(inline_tests)] to the [dune] target. + This does NOT add [ppx_inline_test] to [preprocess]. + + - [js_of_ocaml]: specifies a [(js_of_ocaml ...)] stanza for the [dune] target, + where [...] is the value of the parameter. The toplevel parentheses are removed. + For instance, [~js_of_ocaml:Dune.[[S "javascript_files"; S "file.js"]]] + becomes [(js_of_ocaml (javascript_files file.js))]. + + - [linkall]: if [true], add [-linkall] to the list of flags to be passed + to the OCaml compiler (in the [(flags ...)] stanza). + + - [modes]: list of modes this target can be compiled to. + + - [modules]: list of modules to include in this target. + + - [nopervasives]: if [true], add [-nopervasives] to the list of flags to + be passed to the OCaml compiler (in the [(flags ...)] stanza). + + - [ocaml]: constraints for the version of the [ocaml] opam package, + i.e. on the version of the OCaml compiler. + + - [opam]: path and name of the [.opam] file, without the [.opam] extension. + If [""], no [.opam] file is generated for this target. + If unspecified, for public libraries and executables a default value of + [path/name] is used, where [path] is the path of the [dune] file + and [name] is the public name of the target. + For private libraries, private executables and tests, you must specify + this argument (you can explicitely set it to [""] to generate no [.opam] file). + + - [opaque]: if [true], add [-opaque] to the list of flags to be passed + to the OCaml compiler (in the [(flags ...)] stanza). + + - [opens]: list of module names to open when compiling. + They are passed as [-open] flags to the OCaml compiler (in the [(flags ...)] stanza). + + - [path]: path of the directory in which to generate the [dune] file for this target. + + - [preprocess]: preprocessor directives to add using the [(preprocess ...)] stanza. + Those preprocessors are also added as dependencies in the [.opam] file. + + - [preprocessor_deps]: preprocessor dependencies, such as files for [ppx_blob]. + + - [private_modules]: similar to [modules], but those modules are not part of the + library interface. They are not part of the toplevel module of the library. + + - [opam_only_deps]: dependencies to add to the [.opam] file but not to the [dune] file. + Typical use cases are runtime dependencies and build dependencies for users + of the target (but not the target itself). + + - [release]: unused for now. The intent is to define whether this should be released. + Default is [true] for public executables and [false] for other targets. + + - [static]: whether to generate a [(env (static (flags (:standard -ccopt -static ...))))] + stanza to provide a static compilation profile. + Default is [true] for public executables and [false] for other targets, + unless you specify [static_cclibs], in which case default is [true]. + + - [static_cclibs]: list of static libraries to link with for targets + in this [dune] file when building static executables. + Added using [-cclib] to the stanza that is generated when [static] is [true]. + + - [synopsis]: short description for the [.opam] file. + + - [virtual_modules]: similar to [modules], but for modules that should have an + implementation (an [.ml] file) but that have not. Those modules only come + with an [.mli]. This turns the target into a virtual target. + Other targets can declare that they implement those modules with [implements]. + + - [wrapped]: if [false], add the [(wrapped false)] stanza in the [dune] file. + This causes the library to not come with a toplevel module with aliases to + all other modules. Not recommended (according to the dune documentation). + + - [path]: the path to the directory of the [dune] file that will define this target. *) +type 'a maker = + ?all_modules_except:string list -> + ?bisect_ppx:bool -> + ?c_library_flags:string list -> + ?conflicts:target list -> + ?dep_files:string list -> + ?deps:target list -> + ?dune:Dune.s_expr -> + ?foreign_stubs:Dune.foreign_stubs -> + ?implements:target -> + ?inline_tests:bool -> + ?js_of_ocaml:Dune.s_expr -> + ?linkall:bool -> + ?modes:Dune.mode list -> + ?modules:string list -> + ?nopervasives:bool -> + ?ocaml:Opam.version_constraints -> + ?opam:string -> + ?opaque:bool -> + ?opens:string list -> + ?preprocess:preprocessor list -> + ?preprocessor_deps:preprocessor_dep list -> + ?private_modules:string list -> + ?opam_only_deps:target list -> + ?release:bool -> + ?static:bool -> + ?static_cclibs:string list -> + ?synopsis:string -> + ?virtual_modules:string list -> + ?wrapped:bool -> + path:string -> + 'a -> + target + +(** Register and return an internal public library. + + The ['a] argument of [maker] is [string]: it is the public name. + If [internal_name] is not specified, a default is chosen by converting + the public name, by replacing characters ['-'] and ['.'] to ['_']. + + Internal names correspond to the [(name ...)] stanza in [dune] files, + while public names correspond to the [(public_name ...)] stanza + (and usually to the name of the [.opam] file). *) +val public_lib : ?internal_name:string -> string maker + +(** Same as {!public_lib} but for a public executable. *) +val public_exe : ?internal_name:string -> string maker + +(** Same as {!public_exe} but with several names, to define multiple executables at once. + + If given, the list of internal names must be in the same order as the list of + public names. If not given, the list of internal names is derived from the + list of names as for [public_lib]. + + @raise [Invalid_arg] if the list of names is empty or if the length of + [internal_names] differs from the length of the list of public names. *) +val public_exes : ?internal_names:string list -> string list maker + +(** Register and return an internal private (non-public) library. + + Since it is private, it has no public name: the ['a] argument of [maker] + is its internal name. *) +val private_lib : string maker + +(** Register and return an internal private (non-public) executable. + + Since it is private, it has no public name: the ['a] argument of [maker] + is its internal name. *) +val private_exe : string maker + +(** Register and return an internal test. + + Since tests are private, they have no public name: the ['a] argument of [maker] + is the internal name. *) +val test : string maker + +(** Same as {!test} but with several names, to define multiple tests at once. *) +val tests : string list maker + +(** Register and return an internal executable that is only used for tests. + + Same as {!private_exe} but the dependencies are only required to run tests: + in the [.opam] file, they are marked [with-test] (unless they are also needed + by non-test code). *) +val test_exe : string maker + +(** Same as {!test_exe} but with several names, to define multiple tests at once. *) +val test_exes : string list maker + +(** Make an external vendored library, for use in internal target dependencies. *) +val vendored_lib : string -> target + +(** Make an external library, for use in internal target dependencies. + + Usage: [external_lib name version_constraints] + + [name] is used in [dune] files, while [opam] is used in [.opam] files. + Default value for [opam] is [name]. *) +val external_lib : ?opam:string -> string -> Opam.version_constraints -> target + +(** Make an external library that is a sublibrary of an other one. + + Usage: [external_sublib main_lib name] + + If [main_lib]'s [opam] is [main_opam] and its version constaints are + [version_constraints], this is equivalent to: + [external_lib ~opam: main_opam name version_constraints]. + + @raise [Invalid_arg] if [main_lib] was not built with [external_lib]. *) +val external_sublib : target -> string -> target + +(** Make an external library that is to only appear in [.opam] dependencies. + + This avoids using [~opam_only_deps] each time you declare this dependency. *) +val opam_only : string -> Opam.version_constraints -> target + +(** Make an optional dependency with a source file to be selected depending on presence. + + In the [dune] file, this corresponds to a stanza of the form: + [(select target from (package -> source_if_present) (-> source_if_absent))] + where [package] is the opam package of the [package] target. + + This tells Dune that if [package] is present, it should be used to compile + and link, and that [source_if_present] should be used in place of [target], + while [source_if_absent] should be ignored. On the opposite, if [package] is + absent, the target can still be compiled, but [package] should not be used + to compile and link (obviously), and [source_if_absent] should be used in + place of [target], while [source_if_absent] should be ignored. + + For instance, + {[ + select + ~package:"p" + ~source_if_present:"x.available.ml" + ~source_if_absent:"x.none.ml" + "x.ml" + }] + corresponds to: + {[ + (select x.ml from + (p -> x.available.ml) + (-> x.none.ml)) + ]} + and means: if package [p] is installed, compile with [x.ml] equal to [x.available.ml], + else compile with [x.ml] equal to [x.none.ml]. File [x.none.ml] con for instance + contain a dummy implementation. + + The target is put in the [depopts] section instead of the [depends] section + of the [.opam] file. *) +val select : + package:target -> + source_if_present:string -> + source_if_absent:string -> + target:string -> + target + +(** Make an optional dependency, to be linked only if available. + + [optional] is a simplified version of [select]: [optional p] corresponds to + [[ + (select void_for_linking-p from + (p -> void_for_linking-p.empty) + (-> void_for_linking-p.empty)) + ]] + i.e. if [p] is available, it is linked, and if not, it is not linked. + + Depending on an [optional] target also adds a Dune rule of the form + [(rule (action progn (write-file void_for_linking-p.empty "")))]. + [void_for_linking-p] is a dummy file created in both cases of the [(select)] + from the empty file [void_for_linking-p.empty] which is generated automatically + thanks to this rule. + + Like [select], the target is put in the [depopts] section of the [.opam] file + instead of the [depends] section. *) +val optional : target -> target + +(** Get a name for a given target, to display in errors. + + If a target has multiple names, one is chosen arbitrarily. + So this should not be used except to display errors. *) +val name_for_errors : target -> string + +(** Generate dune and opam files. + + Call this after you declared all your targets with functions such as + [public_lib], [test], etc. *) +val generate : unit -> unit diff --git a/scripts/link_protocol.sh b/scripts/link_protocol.sh index 77332be33f0a..c40862a40357 100755 --- a/scripts/link_protocol.sh +++ b/scripts/link_protocol.sh @@ -1,153 +1,47 @@ -#! /usr/bin/env bash +#! /bin/sh set -e usage="Usage: -$ ./scripts/link_protocol.sh src/proto__ +$ ./scripts/link_protocol.sh src/proto__ -Inserts the protocol with the given version number and short hash in the right -files of the build system to compile it, and replaces the occurrences of - - proto__ - -in the code by - - proto__ - proto__ +This updates manifest/manifest.ml to add the new protocol. +Then, it runs make -C manifest to regenerate the relevant files. " script_dir="$(cd "$(dirname "$0")" && echo "$(pwd -P)/")" cd "$script_dir"/.. -if [ ! -d "$1" ]; then +new_version="$(basename "$1" | awk -F'_' '{print $2}')" +new_hash="$(basename "$1" | awk -F'_' '{print $3}')" + +if [ -z "${new_version}" ] ; then echo "$usage" exit 1 fi -new_version=$(basename $1 | awk -F'_' '{print $2}') -new_hash=$(basename $1 | awk -F'_' '{print $3}') -full_hash=$(jq .hash < $1/lib_protocol/TEZOS_PROTOCOL) -replacement=${new_version}-${new_hash} -if [[ -z "${new_version}" || -z "${new_hash}" || -z "${full_hash}" ]] ; then +if [ -z "${new_hash}" ] ; then echo "$usage" exit 1 fi -# The pattern to look for is "00X-". -# Once found it's either replaced or the line is duplicated and then replaced -old_version=$( printf '%03d' $((10#$new_version -1)) ) -old_dir=$(ls -d src/proto_${old_version}_*) -old_hash=$(basename $old_dir | awk -F'_' '{print $3}') -pattern=${old_version}-${old_hash} - -echo "Pattern to duplicate / substitute: $pattern" - -# if a line matches PATTERN, a new line is printed where the pattern is replaced -duplicate_and_replace() { - PATTERN=$1 - REPLACEMENT=$2 - shift 2 - - for file in $* - do - echo "Adding $replacement in: $file" - awk '{ - print - if ($0 ~ PATTERN) { - sub(PATTERN,REPLACEMENT) - print - }}' PATTERN=$PATTERN REPLACEMENT=$REPLACEMENT "$file" > tmp_file - mv tmp_file "$file" - done -} - -duplicate_and_replace_only_1_occ() { - PATTERN=$1 - REPLACEMENT=$2 - shift 2 - - for file in $* - do - echo "Adding $replacement in: $file (only one occurrence)" - awk '{ - if ( prevlast !~ PATTERN\ - && last ~ PATTERN\ - && $0 !~ PATTERN) { - gsub(PATTERN,REPLACEMENT,last) - print last - } - print - {prevlast = last} - {last = $0} - - }' PATTERN=$PATTERN REPLACEMENT=$REPLACEMENT "$file" > tmp_file - mv tmp_file "$file" - done -} - -duplicate_and_replace_when_3_occ() { - PATTERN=$1 - REPLACEMENT=$2 - shift 2 - - for file in $* - do - echo "Adding $replacement in: $file (when 3 occurrences)" - awk '{ - if ( prevprevlast ~ PATTERN\ - && prevlast ~ PATTERN\ - && last ~ PATTERN\ - && $0 !~ PATTERN) { - gsub(PATTERN, REPLACEMENT, prevprevlast) - gsub(PATTERN, REPLACEMENT, prevlast) - gsub(PATTERN, REPLACEMENT, last) - {print prevprevlast} - {print prevlast} - {print last} - } - print - {prevprevlast = prevlast} - {prevlast = last} - {last = $0} - - }' PATTERN=$PATTERN REPLACEMENT=$REPLACEMENT "$file" > tmp_file - mv tmp_file "$file" - done -} - -# the minimum needed, although you can't bake -duplicate_and_replace ${pattern} ${replacement} active_protocol_versions +# Copy the part of manifest/main.ml that is before the declaration of alpha. +echo "Updating manifest: copy header..." +grep -B 1000000 'let alpha = active "alpha"' manifest/main.ml | head --lines=-1 > manifest/main.ml.new -# activate in client to bake and use RPCs -duplicate_and_replace_when_3_occ -${pattern} -${replacement} \ - src/bin_client/dune -duplicate_and_replace_only_1_occ -${pattern} -${replacement} \ - src/bin_client/dune -duplicate_and_replace -${pattern} -${replacement} \ - src/bin_client/tezos-client.opam +# Insert the new lines we want to insert. +echo "Updating manifest: add new line..." +echo " let _${new_version}_${new_hash} = active ~number:${new_version} \"${new_hash}\"" >> manifest/main.ml.new +echo "" >> manifest/main.ml.new -# activate in node -duplicate_and_replace_when_3_occ -${pattern} -${replacement} \ - src/bin_node/dune -duplicate_and_replace_only_1_occ -${pattern} -${replacement} \ - src/bin_node/dune -duplicate_and_replace -${pattern} -${replacement} \ - src/bin_node/tezos-node.opam -duplicate_and_replace -${pattern} -${replacement} \ - src/bin_validation/{dune,tezos-validator.opam} +# Copy the rest of the original file. +echo "Updating manifest: copy footer..." +grep -A 1000000 'let alpha = active "alpha"' manifest/main.ml >> manifest/main.ml.new -# activate in codec -duplicate_and_replace_when_3_occ -${pattern} -${replacement} \ - src/bin_codec/dune -duplicate_and_replace_only_1_occ -${pattern} -${replacement} \ - src/bin_codec/dune -duplicate_and_replace -${pattern} -${replacement} \ - src/bin_codec/tezos-codec.opam +# Replace the original file. +echo "Updating manifest: replace file..." +mv manifest/main.ml.new manifest/main.ml -# activate in proxy -duplicate_and_replace_when_3_occ -${pattern} -${replacement} \ - src/bin_proxy_server/dune -duplicate_and_replace_only_1_occ -${pattern} -${replacement} \ - src/bin_proxy_server/dune -duplicate_and_replace -${pattern} -${replacement} \ - src/bin_proxy_server/tezos-proxy-server.opam +# Generate everything from the manifest. +echo "Updating manifest: generate dune and opam files..." +make -C manifest diff --git a/src/tooling/shellcheck_skips b/src/tooling/shellcheck_skips index b85a497098da..1deb152d8925 100644 --- a/src/tooling/shellcheck_skips +++ b/src/tooling/shellcheck_skips @@ -13,7 +13,6 @@ scripts/ci/docker_registry_read.sh scripts/ci/docker_registry_tag.sh scripts/create_docker_image.sh scripts/install_sapling_parameters.sh -scripts/link_protocol.sh scripts/opam-check.sh scripts/opam-remove.sh scripts/opam-upgrade.sh -- GitLab From 2345f817a97543453a7cddffe2a2accef8050638 Mon Sep 17 00:00:00 2001 From: Romain Bardou Date: Mon, 29 Nov 2021 10:51:40 +0100 Subject: [PATCH 2/4] Build: apply manifest --- src/bin_client/dune | 10 ++-------- src/bin_client/tezos-client.opam | 2 ++ src/bin_codec/dune | 3 +++ src/bin_codec/tezos-codec.opam | 2 ++ src/bin_node/dune | 10 ++-------- src/bin_node/tezos-node.opam | 2 ++ src/bin_openapi/dune | 3 +++ src/bin_proxy_server/dune | 5 ++--- src/bin_proxy_server/tezos-proxy-server.opam | 2 ++ src/bin_sandbox/dune | 3 +++ src/bin_signer/dune | 3 +++ src/bin_signer/tezos-signer.opam | 2 ++ src/bin_snoop/dune | 3 +++ src/bin_snoop/tezos-snoop.opam | 2 ++ src/bin_tps_evaluation/dune | 3 +++ src/bin_tps_evaluation/tezos-tps-evaluation.opam | 2 ++ src/bin_validation/bin/dune | 3 +++ src/bin_validation/dune | 3 +++ src/bin_validation/tezos-validator.opam | 2 ++ src/lib_base/dune | 3 +++ src/lib_base/test/dune | 3 +++ src/lib_base/test_helpers/dune | 3 +++ src/lib_base/test_helpers/tezos-base-test-helpers.opam | 2 ++ src/lib_base/tezos-base.opam | 2 ++ src/lib_base/unix/dune | 8 ++------ src/lib_base/unix/test/dune | 3 +++ src/lib_benchmark/dune | 5 ++++- src/lib_benchmark/example/dune | 3 +++ src/lib_benchmark/lib_micheline_rewriting/dune | 3 +++ src/lib_benchmark/lib_micheline_rewriting/test/dune | 3 +++ .../tezos-micheline-rewriting.opam | 2 ++ src/lib_benchmark/test/dune | 3 +++ src/lib_benchmark/tezos-benchmark-examples.opam | 2 ++ src/lib_benchmark/tezos-benchmark-tests.opam | 2 ++ src/lib_benchmark/tezos-benchmark.opam | 2 ++ src/lib_clic/dune | 3 +++ src/lib_clic/test/dune | 3 +++ src/lib_clic/tezos-clic.opam | 2 ++ src/lib_clic/unix/dune | 3 +++ src/lib_client_base/dune | 3 +++ src/lib_client_base/gen/dune | 3 +++ src/lib_client_base/test/dune | 3 +++ src/lib_client_base/tezos-client-base.opam | 2 ++ src/lib_client_base_unix/dune | 3 +++ src/lib_client_base_unix/test/dune | 3 +++ src/lib_client_base_unix/tezos-client-base-unix.opam | 2 ++ src/lib_client_commands/dune | 3 +++ src/lib_client_commands/tezos-client-commands.opam | 2 ++ src/lib_context/dune | 3 +++ src/lib_context/encoding/dune | 3 +++ src/lib_context/helpers/dune | 3 +++ src/lib_context/memory/dune | 3 +++ src/lib_context/memory/test/dune | 3 +++ src/lib_context/sigs/dune | 3 +++ src/lib_context/test/dune | 3 +++ src/lib_context/tezos-context.opam | 2 ++ src/lib_crypto/dune | 5 +++-- src/lib_crypto/test/dune | 3 +++ src/lib_crypto/tezos-crypto.opam | 2 ++ src/lib_error_monad/dune | 3 +++ src/lib_error_monad/test/dune | 3 +++ src/lib_error_monad/tezos-error-monad.opam | 2 ++ src/lib_event_logging/dune | 3 +++ src/lib_event_logging/test_helpers/dune | 3 +++ .../test_helpers/tezos-event-logging-test-helpers.opam | 2 ++ src/lib_event_logging/tezos-event-logging.opam | 2 ++ src/lib_hacl_glue/js/hacl-star-raw-empty.opam | 2 ++ src/lib_hacl_glue/js/src/dune | 3 +++ src/lib_hacl_glue/js/test/dune | 6 ++---- src/lib_hacl_glue/js/tezos-hacl-glue-js.opam | 2 ++ src/lib_hacl_glue/unix/dune | 3 +++ src/lib_hacl_glue/unix/test/dune | 3 +++ src/lib_hacl_glue/unix/tezos-hacl-glue-unix.opam | 2 ++ src/lib_hacl_glue/virtual/dune | 3 +++ src/lib_hacl_glue/virtual/tezos-hacl-glue.opam | 2 ++ src/lib_lwt_result_stdlib/bare/functor_outputs/dune | 3 +++ src/lib_lwt_result_stdlib/bare/sigs/dune | 3 +++ src/lib_lwt_result_stdlib/bare/structs/dune | 3 +++ src/lib_lwt_result_stdlib/dune | 3 +++ src/lib_lwt_result_stdlib/examples/traces/dune | 3 +++ src/lib_lwt_result_stdlib/test/dune | 3 +++ src/lib_lwt_result_stdlib/tezos-lwt-result-stdlib.opam | 2 ++ src/lib_lwt_result_stdlib/traced/functor_outputs/dune | 3 +++ src/lib_lwt_result_stdlib/traced/sigs/dune | 3 +++ src/lib_lwt_result_stdlib/traced/structs/dune | 3 +++ src/lib_micheline/dune | 3 +++ src/lib_micheline/test/dune | 3 +++ src/lib_micheline/tezos-micheline.opam | 2 ++ src/lib_mockup/dune | 5 ++++- src/lib_mockup/test/dune | 3 +++ src/lib_mockup/tezos-mockup-commands.opam | 2 ++ src/lib_mockup/tezos-mockup-registration.opam | 2 ++ src/lib_mockup/tezos-mockup.opam | 2 ++ src/lib_mockup_proxy/dune | 3 +++ src/lib_mockup_proxy/tezos-mockup-proxy.opam | 2 ++ src/lib_openapi/dune | 3 +++ src/lib_openapi/tezos-openapi.opam | 2 ++ src/lib_p2p/dune | 3 +++ src/lib_p2p/test/dune | 6 +++--- src/lib_p2p/tezos-p2p.opam | 3 +++ src/lib_p2p_services/dune | 3 +++ src/lib_p2p_services/tezos-p2p-services.opam | 2 ++ src/lib_protocol_compiler/bin/dune | 3 +++ src/lib_protocol_compiler/dune | 3 +++ src/lib_protocol_compiler/tezos-protocol-compiler.opam | 3 ++- src/lib_protocol_environment/dune | 3 +++ src/lib_protocol_environment/s_packer/dune | 3 +++ src/lib_protocol_environment/sigs/dune | 3 +++ src/lib_protocol_environment/structs/dune | 3 +++ src/lib_protocol_environment/test/dune | 3 +++ .../tezos-protocol-environment-packer.opam | 2 ++ .../tezos-protocol-environment-sigs.opam | 2 ++ .../tezos-protocol-environment-structs.opam | 2 ++ .../tezos-protocol-environment.opam | 6 ++++-- src/lib_protocol_environment/tezos-shell-context.opam | 2 ++ src/lib_protocol_updater/dune | 3 +++ src/lib_protocol_updater/tezos-protocol-updater.opam | 2 ++ src/lib_proxy/dune | 3 +++ src/lib_proxy/test/dune | 3 +++ src/lib_proxy/tezos-proxy.opam | 2 ++ src/lib_proxy_server_config/dune | 3 +++ src/lib_proxy_server_config/test/dune | 3 +++ .../tezos-proxy-server-config.opam | 2 ++ src/lib_requester/dune | 3 +++ src/lib_requester/test/dune | 3 +++ src/lib_requester/tezos-requester.opam | 2 ++ src/lib_rpc/dune | 3 +++ src/lib_rpc/tezos-rpc.opam | 2 ++ src/lib_rpc_http/dune | 3 +++ src/lib_rpc_http/test/dune | 3 +++ src/lib_rpc_http/tezos-rpc-http-client-unix.opam | 2 ++ src/lib_rpc_http/tezos-rpc-http-client.opam | 2 ++ src/lib_rpc_http/tezos-rpc-http-server.opam | 2 ++ src/lib_rpc_http/tezos-rpc-http.opam | 2 ++ src/lib_sapling/bindings/dune | 3 +++ src/lib_sapling/dune | 4 ++-- src/lib_sapling/test/dune | 3 +++ src/lib_sapling/tezos-sapling.opam | 2 ++ src/lib_shell/bench/dune | 3 +++ src/lib_shell/dune | 3 +++ src/lib_shell/test/dune | 3 +++ src/lib_shell/tezos-shell.opam | 2 ++ src/lib_shell_benchmarks/dune | 3 +++ src/lib_shell_benchmarks/tezos-shell-benchmarks.opam | 2 ++ src/lib_shell_services/dune | 5 ++++- src/lib_shell_services/test/dune | 3 +++ src/lib_shell_services/test_helpers/dune | 3 +++ src/lib_shell_services/test_helpers/test/dune | 3 +++ .../tezos-shell-services-test-helpers.opam | 2 ++ src/lib_shell_services/tezos-shell-services.opam | 2 ++ src/lib_signer_backends/dune | 3 +++ src/lib_signer_backends/test/dune | 3 +++ src/lib_signer_backends/tezos-signer-backends.opam | 2 ++ src/lib_signer_backends/unix/dune | 3 +++ src/lib_signer_backends/unix/test/dune | 3 +++ src/lib_signer_services/dune | 3 +++ src/lib_signer_services/tezos-signer-services.opam | 2 ++ src/lib_stdlib/dune | 3 +++ src/lib_stdlib/test-unix/dune | 3 +++ src/lib_stdlib/test/dune | 3 +++ src/lib_stdlib/tezos-stdlib.opam | 2 ++ src/lib_stdlib_unix/dune | 3 +++ src/lib_stdlib_unix/tezos-stdlib-unix.opam | 2 ++ src/lib_store/dune | 3 +++ src/lib_store/test/dune | 3 +++ src/lib_store/tezos-store.opam | 2 ++ src/lib_test/dune | 5 +++-- src/lib_test/tezos-test-helpers.opam | 2 ++ src/lib_validation/dune | 3 +++ src/lib_validation/tezos-validation.opam | 2 ++ src/lib_version/dune | 4 +++- src/lib_version/tezos-version.opam | 2 ++ src/lib_workers/dune | 3 +++ src/lib_workers/tezos-workers.opam | 2 ++ src/tooling/dune | 3 +++ src/tooling/tezos-tooling.opam | 2 ++ src/tooling/tztop/dune | 9 +++------ tezt/lib/dune | 3 +++ tezt/lib/tezt.opam | 2 ++ tezt/lib_tezos/dune | 3 +++ tezt/lib_tezos/tezt-tezos.opam | 2 ++ 181 files changed, 475 insertions(+), 51 deletions(-) diff --git a/src/bin_client/dune b/src/bin_client/dune index 4b8e85f9910d..3a3938874b40 100644 --- a/src/bin_client/dune +++ b/src/bin_client/dune @@ -1,6 +1,5 @@ -; See src/bin_node/dune to understand in detail how this file abuses -; the alternative dependency mechanism of dune to implement optional -; dependencies. +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. (env (static (flags (:standard -ccopt -static)))) @@ -72,11 +71,6 @@ (select void_for_linking-tezos-client-alpha-commands-registration from (tezos-client-alpha-commands-registration -> void_for_linking-tezos-client-alpha-commands-registration.empty) (-> void_for_linking-tezos-client-alpha-commands-registration.empty)) - - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - ; If you modify this file around here, modify src/bin_proxy_server/dune too! ; - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - (select void_for_linking-tezos-baking-011-PtHangz2-commands-registration from (tezos-baking-011-PtHangz2-commands.registration -> void_for_linking-tezos-baking-011-PtHangz2-commands-registration.empty) (-> void_for_linking-tezos-baking-011-PtHangz2-commands-registration.empty)) diff --git a/src/bin_client/tezos-client.opam b/src/bin_client/tezos-client.opam index cfcb1178fa5a..d3a208392807 100644 --- a/src/bin_client/tezos-client.opam +++ b/src/bin_client/tezos-client.opam @@ -1,3 +1,5 @@ +# This file was automatically generated, do not edit. +# Edit file manifest/main.ml instead. opam-version: "2.0" maintainer: "contact@tezos.com" authors: ["Tezos devteam"] diff --git a/src/bin_codec/dune b/src/bin_codec/dune index 6a0a126688b9..5dbfa77f9122 100644 --- a/src/bin_codec/dune +++ b/src/bin_codec/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (env (static (flags (:standard -ccopt -static)))) (executable diff --git a/src/bin_codec/tezos-codec.opam b/src/bin_codec/tezos-codec.opam index 33c18328f197..c374f3cc0659 100644 --- a/src/bin_codec/tezos-codec.opam +++ b/src/bin_codec/tezos-codec.opam @@ -1,3 +1,5 @@ +# This file was automatically generated, do not edit. +# Edit file manifest/main.ml instead. opam-version: "2.0" maintainer: "contact@tezos.com" authors: ["Tezos devteam"] diff --git a/src/bin_node/dune b/src/bin_node/dune index cd1e9a3f39c3..4eadd6a12d7a 100644 --- a/src/bin_node/dune +++ b/src/bin_node/dune @@ -1,11 +1,5 @@ -; This file abuses the alternative dependency mechanism of dune to -; implement optional dependencies. -; The semantic of `(select a from (b -> c) (-> d))` is: if libraries -; `b` are present, `cp c a` and link `b` else `cp d a`. Here, we don't -; care about the cp part as we are not using the file obtained at -; all. So, we give them names only meant to not clash with anything -; and copy always the same (generated itself) empty file -; "void_for_linking". +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. (env (static (flags (:standard -ccopt -static)))) diff --git a/src/bin_node/tezos-node.opam b/src/bin_node/tezos-node.opam index 6449cacefefc..fdfa4eea44e0 100644 --- a/src/bin_node/tezos-node.opam +++ b/src/bin_node/tezos-node.opam @@ -1,3 +1,5 @@ +# This file was automatically generated, do not edit. +# Edit file manifest/main.ml instead. opam-version: "2.0" maintainer: "contact@tezos.com" authors: ["Tezos devteam"] diff --git a/src/bin_openapi/dune b/src/bin_openapi/dune index 291dab91fbde..ba2d578d4371 100644 --- a/src/bin_openapi/dune +++ b/src/bin_openapi/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (executable (name rpc_openapi) (instrumentation (backend bisect_ppx)) diff --git a/src/bin_proxy_server/dune b/src/bin_proxy_server/dune index 1e4403a15599..e8ad43434c7c 100644 --- a/src/bin_proxy_server/dune +++ b/src/bin_proxy_server/dune @@ -1,6 +1,5 @@ -; See src/bin_node/dune to understand in detail how this file abuses -; the alternative dependency mechanism of dune to implement optional -; dependencies. +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. (env (static (flags (:standard -ccopt -static)))) diff --git a/src/bin_proxy_server/tezos-proxy-server.opam b/src/bin_proxy_server/tezos-proxy-server.opam index a32a4cb21483..f67cb4312acc 100644 --- a/src/bin_proxy_server/tezos-proxy-server.opam +++ b/src/bin_proxy_server/tezos-proxy-server.opam @@ -1,3 +1,5 @@ +# This file was automatically generated, do not edit. +# Edit file manifest/main.ml instead. opam-version: "2.0" maintainer: "contact@tezos.com" authors: ["Tezos devteam"] diff --git a/src/bin_sandbox/dune b/src/bin_sandbox/dune index 90d65b78acf1..d4530fd51174 100644 --- a/src/bin_sandbox/dune +++ b/src/bin_sandbox/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (executable (name main) (libraries diff --git a/src/bin_signer/dune b/src/bin_signer/dune index 75cb83ab9af1..bedd2051fb5a 100644 --- a/src/bin_signer/dune +++ b/src/bin_signer/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (env (static (flags (:standard -ccopt -static)))) (executable diff --git a/src/bin_signer/tezos-signer.opam b/src/bin_signer/tezos-signer.opam index 278482823724..d79a06495496 100644 --- a/src/bin_signer/tezos-signer.opam +++ b/src/bin_signer/tezos-signer.opam @@ -1,3 +1,5 @@ +# This file was automatically generated, do not edit. +# Edit file manifest/main.ml instead. opam-version: "2.0" maintainer: "contact@tezos.com" authors: ["Tezos devteam"] diff --git a/src/bin_snoop/dune b/src/bin_snoop/dune index 7bb60282b830..b07da8e0d853 100644 --- a/src/bin_snoop/dune +++ b/src/bin_snoop/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (env (static (flags (:standard -ccopt -static)))) (executable diff --git a/src/bin_snoop/tezos-snoop.opam b/src/bin_snoop/tezos-snoop.opam index 4d522d364efb..9951f91dbe5c 100644 --- a/src/bin_snoop/tezos-snoop.opam +++ b/src/bin_snoop/tezos-snoop.opam @@ -1,3 +1,5 @@ +# This file was automatically generated, do not edit. +# Edit file manifest/main.ml instead. opam-version: "2.0" maintainer: "contact@tezos.com" authors: ["Tezos devteam"] diff --git a/src/bin_tps_evaluation/dune b/src/bin_tps_evaluation/dune index 51b035622d6a..e8268dbb1458 100644 --- a/src/bin_tps_evaluation/dune +++ b/src/bin_tps_evaluation/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (executable (name main_tps_evaluation) (public_name tezos-tps-evaluation) diff --git a/src/bin_tps_evaluation/tezos-tps-evaluation.opam b/src/bin_tps_evaluation/tezos-tps-evaluation.opam index 708a425de8b5..537c60251b28 100644 --- a/src/bin_tps_evaluation/tezos-tps-evaluation.opam +++ b/src/bin_tps_evaluation/tezos-tps-evaluation.opam @@ -1,3 +1,5 @@ +# This file was automatically generated, do not edit. +# Edit file manifest/main.ml instead. opam-version: "2.0" maintainer: "contact@tezos.com" authors: ["Tezos devteam"] diff --git a/src/bin_validation/bin/dune b/src/bin_validation/bin/dune index 8067f96ed4e1..3d38c6cc8638 100644 --- a/src/bin_validation/bin/dune +++ b/src/bin_validation/bin/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (env (static (flags (:standard -ccopt -static)))) (executable diff --git a/src/bin_validation/dune b/src/bin_validation/dune index ad34aedbcdf5..a3078701ee23 100644 --- a/src/bin_validation/dune +++ b/src/bin_validation/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (library (name tezos_validator) (public_name tezos-validator) diff --git a/src/bin_validation/tezos-validator.opam b/src/bin_validation/tezos-validator.opam index 9486a8224e09..d988a45ec7f2 100644 --- a/src/bin_validation/tezos-validator.opam +++ b/src/bin_validation/tezos-validator.opam @@ -1,3 +1,5 @@ +# This file was automatically generated, do not edit. +# Edit file manifest/main.ml instead. opam-version: "2.0" maintainer: "contact@tezos.com" authors: ["Tezos devteam"] diff --git a/src/lib_base/dune b/src/lib_base/dune index 1d95f0f47026..a43246be4b8e 100644 --- a/src/lib_base/dune +++ b/src/lib_base/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (library (name tezos_base) (public_name tezos-base) diff --git a/src/lib_base/test/dune b/src/lib_base/test/dune index c07d9b9ab6a5..af73eed523fb 100644 --- a/src/lib_base/test/dune +++ b/src/lib_base/test/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (tests (names test_time test_protocol) (package tezos-base) diff --git a/src/lib_base/test_helpers/dune b/src/lib_base/test_helpers/dune index 1f7c3a4af292..d96cfcb3fdae 100644 --- a/src/lib_base/test_helpers/dune +++ b/src/lib_base/test_helpers/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (library (name tezos_base_test_helpers) (public_name tezos-base-test-helpers) diff --git a/src/lib_base/test_helpers/tezos-base-test-helpers.opam b/src/lib_base/test_helpers/tezos-base-test-helpers.opam index 581681d171c2..5926f4ec5519 100644 --- a/src/lib_base/test_helpers/tezos-base-test-helpers.opam +++ b/src/lib_base/test_helpers/tezos-base-test-helpers.opam @@ -1,3 +1,5 @@ +# This file was automatically generated, do not edit. +# Edit file manifest/main.ml instead. opam-version: "2.0" maintainer: "contact@tezos.com" authors: ["Tezos devteam"] diff --git a/src/lib_base/tezos-base.opam b/src/lib_base/tezos-base.opam index 7486d6b9a447..fc5e10f397e4 100644 --- a/src/lib_base/tezos-base.opam +++ b/src/lib_base/tezos-base.opam @@ -1,3 +1,5 @@ +# This file was automatically generated, do not edit. +# Edit file manifest/main.ml instead. opam-version: "2.0" maintainer: "contact@tezos.com" authors: ["Tezos devteam"] diff --git a/src/lib_base/unix/dune b/src/lib_base/unix/dune index d0aa8b861b45..a0de944e34e4 100644 --- a/src/lib_base/unix/dune +++ b/src/lib_base/unix/dune @@ -1,8 +1,5 @@ -; tezos-crypto depends on the tezos glue packages that -; are dune virtual packages and require an implementation. - -; tezos-base.unix is used in many executables as a proxy to -; force linking of the unix implementation of the tezos crypto libraries +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. (library (name tezos_base_unix) @@ -12,7 +9,6 @@ data-encoding tezos-crypto bls12-381-unix - ; unix implementation of hacl tezos-hacl-glue-unix tezos-base tezos-stdlib diff --git a/src/lib_base/unix/test/dune b/src/lib_base/unix/test/dune index 228022aafaf9..ab5c7009f7e1 100644 --- a/src/lib_base/unix/test/dune +++ b/src/lib_base/unix/test/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (test (name test_unix_error) (package tezos-base) diff --git a/src/lib_benchmark/dune b/src/lib_benchmark/dune index 21f20923aad8..a2fe06630b91 100644 --- a/src/lib_benchmark/dune +++ b/src/lib_benchmark/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (library (name tezos_benchmark) (public_name tezos-benchmark) @@ -10,6 +13,6 @@ data-encoding prbnmcn-stats benchmark-utils - pyml-plot ;; because of Matrix module... pyml-plot should be split further + pyml-plot ocaml-migrate-parsetree) (flags (:standard -open Tezos_base__TzPervasives -open Tezos_stdlib_unix))) diff --git a/src/lib_benchmark/example/dune b/src/lib_benchmark/example/dune index c69008520f53..41380b6e11b8 100644 --- a/src/lib_benchmark/example/dune +++ b/src/lib_benchmark/example/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (library (name tezos_benchmark_examples) (public_name tezos-benchmark-examples) diff --git a/src/lib_benchmark/lib_micheline_rewriting/dune b/src/lib_benchmark/lib_micheline_rewriting/dune index e12f26417ce8..dab242c95f8d 100644 --- a/src/lib_benchmark/lib_micheline_rewriting/dune +++ b/src/lib_benchmark/lib_micheline_rewriting/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (library (name tezos_micheline_rewriting) (public_name tezos-micheline-rewriting) diff --git a/src/lib_benchmark/lib_micheline_rewriting/test/dune b/src/lib_benchmark/lib_micheline_rewriting/test/dune index f26d36e74f57..d0e8089d222d 100644 --- a/src/lib_benchmark/lib_micheline_rewriting/test/dune +++ b/src/lib_benchmark/lib_micheline_rewriting/test/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (test (name test_rewriting) (package tezos-micheline-rewriting) diff --git a/src/lib_benchmark/lib_micheline_rewriting/tezos-micheline-rewriting.opam b/src/lib_benchmark/lib_micheline_rewriting/tezos-micheline-rewriting.opam index ceef625c11d6..143b92249279 100644 --- a/src/lib_benchmark/lib_micheline_rewriting/tezos-micheline-rewriting.opam +++ b/src/lib_benchmark/lib_micheline_rewriting/tezos-micheline-rewriting.opam @@ -1,3 +1,5 @@ +# This file was automatically generated, do not edit. +# Edit file manifest/main.ml instead. opam-version: "2.0" maintainer: "contact@tezos.com" authors: ["Tezos devteam"] diff --git a/src/lib_benchmark/test/dune b/src/lib_benchmark/test/dune index 0f290e042206..00e425b5a2ba 100644 --- a/src/lib_benchmark/test/dune +++ b/src/lib_benchmark/test/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (test (name main_ci) (package tezos-benchmark-tests) diff --git a/src/lib_benchmark/tezos-benchmark-examples.opam b/src/lib_benchmark/tezos-benchmark-examples.opam index 352b60bc2fe4..94e3820e4591 100644 --- a/src/lib_benchmark/tezos-benchmark-examples.opam +++ b/src/lib_benchmark/tezos-benchmark-examples.opam @@ -1,3 +1,5 @@ +# This file was automatically generated, do not edit. +# Edit file manifest/main.ml instead. opam-version: "2.0" maintainer: "contact@tezos.com" authors: ["Tezos devteam"] diff --git a/src/lib_benchmark/tezos-benchmark-tests.opam b/src/lib_benchmark/tezos-benchmark-tests.opam index 22900acad04a..ca6512e91d1f 100644 --- a/src/lib_benchmark/tezos-benchmark-tests.opam +++ b/src/lib_benchmark/tezos-benchmark-tests.opam @@ -1,3 +1,5 @@ +# This file was automatically generated, do not edit. +# Edit file manifest/main.ml instead. opam-version: "2.0" maintainer: "contact@tezos.com" authors: ["Tezos devteam"] diff --git a/src/lib_benchmark/tezos-benchmark.opam b/src/lib_benchmark/tezos-benchmark.opam index 4a56869b2ba8..a984d1872956 100644 --- a/src/lib_benchmark/tezos-benchmark.opam +++ b/src/lib_benchmark/tezos-benchmark.opam @@ -1,3 +1,5 @@ +# This file was automatically generated, do not edit. +# Edit file manifest/main.ml instead. opam-version: "2.0" maintainer: "contact@tezos.com" authors: ["Tezos devteam"] diff --git a/src/lib_clic/dune b/src/lib_clic/dune index 85b7e81d318f..037fd374fbc0 100644 --- a/src/lib_clic/dune +++ b/src/lib_clic/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (library (name tezos_clic) (public_name tezos-clic) diff --git a/src/lib_clic/test/dune b/src/lib_clic/test/dune index f726a5e4e026..5edb9bdf59c6 100644 --- a/src/lib_clic/test/dune +++ b/src/lib_clic/test/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (test (name test_clic) (package tezos-clic) diff --git a/src/lib_clic/tezos-clic.opam b/src/lib_clic/tezos-clic.opam index ced40511f550..0a1a532eb61e 100644 --- a/src/lib_clic/tezos-clic.opam +++ b/src/lib_clic/tezos-clic.opam @@ -1,3 +1,5 @@ +# This file was automatically generated, do not edit. +# Edit file manifest/main.ml instead. opam-version: "2.0" maintainer: "contact@tezos.com" authors: ["Tezos devteam"] diff --git a/src/lib_clic/unix/dune b/src/lib_clic/unix/dune index 65df0b02cc91..a2336b9e70ef 100644 --- a/src/lib_clic/unix/dune +++ b/src/lib_clic/unix/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (library (name tezos_clic_unix) (public_name tezos-clic.unix) diff --git a/src/lib_client_base/dune b/src/lib_client_base/dune index b84ba9053470..876487d01d5a 100644 --- a/src/lib_client_base/dune +++ b/src/lib_client_base/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (library (name tezos_client_base) (public_name tezos-client-base) diff --git a/src/lib_client_base/gen/dune b/src/lib_client_base/gen/dune index 61c999e817db..38e5a46e167e 100644 --- a/src/lib_client_base/gen/dune +++ b/src/lib_client_base/gen/dune @@ -1,2 +1,5 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (executable (name bip39_generator)) diff --git a/src/lib_client_base/test/dune b/src/lib_client_base/test/dune index 7e27291ad60a..d512bfd4fa12 100644 --- a/src/lib_client_base/test/dune +++ b/src/lib_client_base/test/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (tests (names bip39_tests pbkdf_tests) (package tezos-client-base) diff --git a/src/lib_client_base/tezos-client-base.opam b/src/lib_client_base/tezos-client-base.opam index 1b48d26c59f1..f501cf41a68d 100644 --- a/src/lib_client_base/tezos-client-base.opam +++ b/src/lib_client_base/tezos-client-base.opam @@ -1,3 +1,5 @@ +# This file was automatically generated, do not edit. +# Edit file manifest/main.ml instead. opam-version: "2.0" maintainer: "contact@tezos.com" authors: ["Tezos devteam"] diff --git a/src/lib_client_base_unix/dune b/src/lib_client_base_unix/dune index 3f71cc580ce6..e75244a41cbc 100644 --- a/src/lib_client_base_unix/dune +++ b/src/lib_client_base_unix/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (library (name tezos_client_base_unix) (public_name tezos-client-base-unix) diff --git a/src/lib_client_base_unix/test/dune b/src/lib_client_base_unix/test/dune index 1f1bc0241178..8085cb85dea9 100644 --- a/src/lib_client_base_unix/test/dune +++ b/src/lib_client_base_unix/test/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (test (name test_mockup_wallet) (package tezos-client-base-unix) diff --git a/src/lib_client_base_unix/tezos-client-base-unix.opam b/src/lib_client_base_unix/tezos-client-base-unix.opam index c18640012e57..f60768819c49 100644 --- a/src/lib_client_base_unix/tezos-client-base-unix.opam +++ b/src/lib_client_base_unix/tezos-client-base-unix.opam @@ -1,3 +1,5 @@ +# This file was automatically generated, do not edit. +# Edit file manifest/main.ml instead. opam-version: "2.0" maintainer: "contact@tezos.com" authors: ["Tezos devteam"] diff --git a/src/lib_client_commands/dune b/src/lib_client_commands/dune index 8af104eebb96..ada350876c54 100644 --- a/src/lib_client_commands/dune +++ b/src/lib_client_commands/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (library (name tezos_client_commands) (public_name tezos-client-commands) diff --git a/src/lib_client_commands/tezos-client-commands.opam b/src/lib_client_commands/tezos-client-commands.opam index 713576c565ba..b16e3bcebb8a 100644 --- a/src/lib_client_commands/tezos-client-commands.opam +++ b/src/lib_client_commands/tezos-client-commands.opam @@ -1,3 +1,5 @@ +# This file was automatically generated, do not edit. +# Edit file manifest/main.ml instead. opam-version: "2.0" maintainer: "contact@tezos.com" authors: ["Tezos devteam"] diff --git a/src/lib_context/dune b/src/lib_context/dune index bcecd767105e..4e02565b0715 100644 --- a/src/lib_context/dune +++ b/src/lib_context/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (library (name tezos_context) (public_name tezos-context) diff --git a/src/lib_context/encoding/dune b/src/lib_context/encoding/dune index 4066a941becb..7c2af4e33483 100644 --- a/src/lib_context/encoding/dune +++ b/src/lib_context/encoding/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (library (name tezos_context_encoding) (public_name tezos-context.encoding) diff --git a/src/lib_context/helpers/dune b/src/lib_context/helpers/dune index 9c793b24e369..b0e5a34f6e6a 100644 --- a/src/lib_context/helpers/dune +++ b/src/lib_context/helpers/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (library (name tezos_context_helpers) (public_name tezos-context.helpers) diff --git a/src/lib_context/memory/dune b/src/lib_context/memory/dune index 2c2f1f113ff5..6b8b74dd5912 100644 --- a/src/lib_context/memory/dune +++ b/src/lib_context/memory/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (library (name tezos_context_memory) (public_name tezos-context.memory) diff --git a/src/lib_context/memory/test/dune b/src/lib_context/memory/test/dune index ba81fe43452f..454c8ffe9e41 100644 --- a/src/lib_context/memory/test/dune +++ b/src/lib_context/memory/test/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (test (name test) (package tezos-context) diff --git a/src/lib_context/sigs/dune b/src/lib_context/sigs/dune index 685e83495e3f..90763bd11f9e 100644 --- a/src/lib_context/sigs/dune +++ b/src/lib_context/sigs/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (library (name tezos_context_sigs) (public_name tezos-context.sigs) diff --git a/src/lib_context/test/dune b/src/lib_context/test/dune index 5c1658c56692..36fc7ab72132 100644 --- a/src/lib_context/test/dune +++ b/src/lib_context/test/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (test (name test) (package tezos-context) diff --git a/src/lib_context/tezos-context.opam b/src/lib_context/tezos-context.opam index 17ea9a63e577..99df4badce85 100644 --- a/src/lib_context/tezos-context.opam +++ b/src/lib_context/tezos-context.opam @@ -1,3 +1,5 @@ +# This file was automatically generated, do not edit. +# Edit file manifest/main.ml instead. opam-version: "2.0" maintainer: "contact@tezos.com" authors: ["Tezos devteam"] diff --git a/src/lib_crypto/dune b/src/lib_crypto/dune index aab0958eaa12..f67e36c62fb6 100644 --- a/src/lib_crypto/dune +++ b/src/lib_crypto/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (library (name tezos_crypto) (public_name tezos-crypto) @@ -6,8 +9,6 @@ data-encoding tezos-lwt-result-stdlib lwt - ; NOTE: tezos_*_glue are virtual packages; - ; either the unix or js implementation must be installed tezos-hacl-glue secp256k1-internal tezos-error-monad diff --git a/src/lib_crypto/test/dune b/src/lib_crypto/test/dune index 1e62f581cd24..e4bbd270107d 100644 --- a/src/lib_crypto/test/dune +++ b/src/lib_crypto/test/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (tests (names test_run test_prop_signature) (package tezos-crypto) diff --git a/src/lib_crypto/tezos-crypto.opam b/src/lib_crypto/tezos-crypto.opam index 18454148d100..78820166514b 100644 --- a/src/lib_crypto/tezos-crypto.opam +++ b/src/lib_crypto/tezos-crypto.opam @@ -1,3 +1,5 @@ +# This file was automatically generated, do not edit. +# Edit file manifest/main.ml instead. opam-version: "2.0" maintainer: "contact@tezos.com" authors: ["Tezos devteam"] diff --git a/src/lib_error_monad/dune b/src/lib_error_monad/dune index 257c3f02cfb6..8ca4491a16e8 100644 --- a/src/lib_error_monad/dune +++ b/src/lib_error_monad/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (library (name tezos_error_monad) (public_name tezos-error-monad) diff --git a/src/lib_error_monad/test/dune b/src/lib_error_monad/test/dune index f7e1ac8c51a6..85c0042e0418 100644 --- a/src/lib_error_monad/test/dune +++ b/src/lib_error_monad/test/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (test (name test_registration) (package tezos-error-monad) diff --git a/src/lib_error_monad/tezos-error-monad.opam b/src/lib_error_monad/tezos-error-monad.opam index 27129ae3ebda..e468e36a8340 100644 --- a/src/lib_error_monad/tezos-error-monad.opam +++ b/src/lib_error_monad/tezos-error-monad.opam @@ -1,3 +1,5 @@ +# This file was automatically generated, do not edit. +# Edit file manifest/main.ml instead. opam-version: "2.0" maintainer: "contact@tezos.com" authors: ["Tezos devteam"] diff --git a/src/lib_event_logging/dune b/src/lib_event_logging/dune index b72192d9ea3a..3b478cc1a30d 100644 --- a/src/lib_event_logging/dune +++ b/src/lib_event_logging/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (library (name tezos_event_logging) (public_name tezos-event-logging) diff --git a/src/lib_event_logging/test_helpers/dune b/src/lib_event_logging/test_helpers/dune index 5ad822fb158b..00d5ad777127 100644 --- a/src/lib_event_logging/test_helpers/dune +++ b/src/lib_event_logging/test_helpers/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (library (name tezos_event_logging_test_helpers) (public_name tezos-event-logging-test-helpers) diff --git a/src/lib_event_logging/test_helpers/tezos-event-logging-test-helpers.opam b/src/lib_event_logging/test_helpers/tezos-event-logging-test-helpers.opam index 85fa4b6b1d0f..16bd4e5f7d2d 100644 --- a/src/lib_event_logging/test_helpers/tezos-event-logging-test-helpers.opam +++ b/src/lib_event_logging/test_helpers/tezos-event-logging-test-helpers.opam @@ -1,3 +1,5 @@ +# This file was automatically generated, do not edit. +# Edit file manifest/main.ml instead. opam-version: "2.0" maintainer: "contact@tezos.com" authors: ["Tezos devteam"] diff --git a/src/lib_event_logging/tezos-event-logging.opam b/src/lib_event_logging/tezos-event-logging.opam index 5ef29f4317bf..5841792379fa 100644 --- a/src/lib_event_logging/tezos-event-logging.opam +++ b/src/lib_event_logging/tezos-event-logging.opam @@ -1,3 +1,5 @@ +# This file was automatically generated, do not edit. +# Edit file manifest/main.ml instead. opam-version: "2.0" maintainer: "contact@tezos.com" authors: ["Tezos devteam"] diff --git a/src/lib_hacl_glue/js/hacl-star-raw-empty.opam b/src/lib_hacl_glue/js/hacl-star-raw-empty.opam index 16d01f7584d6..dc3611c631e6 100644 --- a/src/lib_hacl_glue/js/hacl-star-raw-empty.opam +++ b/src/lib_hacl_glue/js/hacl-star-raw-empty.opam @@ -1,3 +1,5 @@ +# This file was automatically generated, do not edit. +# Edit file manifest/main.ml instead. opam-version: "2.0" maintainer: "contact@tezos.com" authors: ["Tezos devteam"] diff --git a/src/lib_hacl_glue/js/src/dune b/src/lib_hacl_glue/js/src/dune index 4787e69f67e0..e00b296b9f36 100644 --- a/src/lib_hacl_glue/js/src/dune +++ b/src/lib_hacl_glue/js/src/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (library (name hacl_star_raw_empty) (public_name hacl-star-raw-empty) diff --git a/src/lib_hacl_glue/js/test/dune b/src/lib_hacl_glue/js/test/dune index b70fc311a63c..74f8ab100f99 100644 --- a/src/lib_hacl_glue/js/test/dune +++ b/src/lib_hacl_glue/js/test/dune @@ -1,7 +1,5 @@ -;; We use virtual libraries, and want to compile the same test with -;; unix and js. In order to do this, we copy tests from the unix -;; directory and change the library providing the implementation of -;; the virtual lib (tezos-hacl-glue-js) +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. (executables (names test_hacl test_prop_signature_pk) diff --git a/src/lib_hacl_glue/js/tezos-hacl-glue-js.opam b/src/lib_hacl_glue/js/tezos-hacl-glue-js.opam index c4bf76c1878f..18aa7e0df639 100644 --- a/src/lib_hacl_glue/js/tezos-hacl-glue-js.opam +++ b/src/lib_hacl_glue/js/tezos-hacl-glue-js.opam @@ -1,3 +1,5 @@ +# This file was automatically generated, do not edit. +# Edit file manifest/main.ml instead. opam-version: "2.0" maintainer: "contact@tezos.com" authors: ["Tezos devteam"] diff --git a/src/lib_hacl_glue/unix/dune b/src/lib_hacl_glue/unix/dune index 2f2baf57072f..4d325a9e4c9a 100644 --- a/src/lib_hacl_glue/unix/dune +++ b/src/lib_hacl_glue/unix/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (library (name tezos_hacl_glue_unix) (public_name tezos-hacl-glue-unix) diff --git a/src/lib_hacl_glue/unix/test/dune b/src/lib_hacl_glue/unix/test/dune index 89245a954d01..c3575a3880f9 100644 --- a/src/lib_hacl_glue/unix/test/dune +++ b/src/lib_hacl_glue/unix/test/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (tests (names test_hacl test_prop_hacl_hash test_prop_signature_pk) (package tezos-hacl-glue-unix) diff --git a/src/lib_hacl_glue/unix/tezos-hacl-glue-unix.opam b/src/lib_hacl_glue/unix/tezos-hacl-glue-unix.opam index 374360455e32..226719336d82 100644 --- a/src/lib_hacl_glue/unix/tezos-hacl-glue-unix.opam +++ b/src/lib_hacl_glue/unix/tezos-hacl-glue-unix.opam @@ -1,3 +1,5 @@ +# This file was automatically generated, do not edit. +# Edit file manifest/main.ml instead. opam-version: "2.0" maintainer: "contact@tezos.com" authors: ["Tezos devteam"] diff --git a/src/lib_hacl_glue/virtual/dune b/src/lib_hacl_glue/virtual/dune index acf6cbe6103a..a707b99fed58 100644 --- a/src/lib_hacl_glue/virtual/dune +++ b/src/lib_hacl_glue/virtual/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (library (name tezos_hacl_glue) (public_name tezos-hacl-glue) diff --git a/src/lib_hacl_glue/virtual/tezos-hacl-glue.opam b/src/lib_hacl_glue/virtual/tezos-hacl-glue.opam index 258ad618d774..26405a194df2 100644 --- a/src/lib_hacl_glue/virtual/tezos-hacl-glue.opam +++ b/src/lib_hacl_glue/virtual/tezos-hacl-glue.opam @@ -1,3 +1,5 @@ +# This file was automatically generated, do not edit. +# Edit file manifest/main.ml instead. opam-version: "2.0" maintainer: "contact@tezos.com" authors: ["Tezos devteam"] diff --git a/src/lib_lwt_result_stdlib/bare/functor_outputs/dune b/src/lib_lwt_result_stdlib/bare/functor_outputs/dune index 27aaae2c2040..94cbb784456b 100644 --- a/src/lib_lwt_result_stdlib/bare/functor_outputs/dune +++ b/src/lib_lwt_result_stdlib/bare/functor_outputs/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (library (name bare_functor_outputs) (public_name tezos-lwt-result-stdlib.bare.functor-outputs) diff --git a/src/lib_lwt_result_stdlib/bare/sigs/dune b/src/lib_lwt_result_stdlib/bare/sigs/dune index ca9c18edc371..65f92f0c7ee5 100644 --- a/src/lib_lwt_result_stdlib/bare/sigs/dune +++ b/src/lib_lwt_result_stdlib/bare/sigs/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (library (name bare_sigs) (public_name tezos-lwt-result-stdlib.bare.sigs) diff --git a/src/lib_lwt_result_stdlib/bare/structs/dune b/src/lib_lwt_result_stdlib/bare/structs/dune index f5807a4ecdd4..f8cf88904eca 100644 --- a/src/lib_lwt_result_stdlib/bare/structs/dune +++ b/src/lib_lwt_result_stdlib/bare/structs/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (library (name bare_structs) (public_name tezos-lwt-result-stdlib.bare.structs) diff --git a/src/lib_lwt_result_stdlib/dune b/src/lib_lwt_result_stdlib/dune index cfecba19107f..8b651c07d8e1 100644 --- a/src/lib_lwt_result_stdlib/dune +++ b/src/lib_lwt_result_stdlib/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (library (name tezos_lwt_result_stdlib) (public_name tezos-lwt-result-stdlib) diff --git a/src/lib_lwt_result_stdlib/examples/traces/dune b/src/lib_lwt_result_stdlib/examples/traces/dune index fbe3af13a600..6b61c718e119 100644 --- a/src/lib_lwt_result_stdlib/examples/traces/dune +++ b/src/lib_lwt_result_stdlib/examples/traces/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (library (name traces) (public_name tezos-lwt-result-stdlib.examples.traces) diff --git a/src/lib_lwt_result_stdlib/test/dune b/src/lib_lwt_result_stdlib/test/dune index f7f62179b3ff..29bd2dcb52dd 100644 --- a/src/lib_lwt_result_stdlib/test/dune +++ b/src/lib_lwt_result_stdlib/test/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (tests (names test_hashtbl diff --git a/src/lib_lwt_result_stdlib/tezos-lwt-result-stdlib.opam b/src/lib_lwt_result_stdlib/tezos-lwt-result-stdlib.opam index 4f0c6d309484..baf1eed6e5b1 100644 --- a/src/lib_lwt_result_stdlib/tezos-lwt-result-stdlib.opam +++ b/src/lib_lwt_result_stdlib/tezos-lwt-result-stdlib.opam @@ -1,3 +1,5 @@ +# This file was automatically generated, do not edit. +# Edit file manifest/main.ml instead. opam-version: "2.0" maintainer: "contact@tezos.com" authors: ["Tezos devteam"] diff --git a/src/lib_lwt_result_stdlib/traced/functor_outputs/dune b/src/lib_lwt_result_stdlib/traced/functor_outputs/dune index ce98aaecab8e..b2d25e4f43e6 100644 --- a/src/lib_lwt_result_stdlib/traced/functor_outputs/dune +++ b/src/lib_lwt_result_stdlib/traced/functor_outputs/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (library (name traced_functor_outputs) (public_name tezos-lwt-result-stdlib.traced.functor-outputs) diff --git a/src/lib_lwt_result_stdlib/traced/sigs/dune b/src/lib_lwt_result_stdlib/traced/sigs/dune index 5e8d81ef3504..2ca0ef41c25d 100644 --- a/src/lib_lwt_result_stdlib/traced/sigs/dune +++ b/src/lib_lwt_result_stdlib/traced/sigs/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (library (name traced_sigs) (public_name tezos-lwt-result-stdlib.traced.sigs) diff --git a/src/lib_lwt_result_stdlib/traced/structs/dune b/src/lib_lwt_result_stdlib/traced/structs/dune index bd14281ef1e3..2e8ce184357b 100644 --- a/src/lib_lwt_result_stdlib/traced/structs/dune +++ b/src/lib_lwt_result_stdlib/traced/structs/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (library (name traced_structs) (public_name tezos-lwt-result-stdlib.traced.structs) diff --git a/src/lib_micheline/dune b/src/lib_micheline/dune index e14ce2900185..05276645380e 100644 --- a/src/lib_micheline/dune +++ b/src/lib_micheline/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (library (name tezos_micheline) (public_name tezos-micheline) diff --git a/src/lib_micheline/test/dune b/src/lib_micheline/test/dune index a1f3790baadc..c2347fc34eea 100644 --- a/src/lib_micheline/test/dune +++ b/src/lib_micheline/test/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (tests (names test_parser test_diff) (package tezos-micheline) diff --git a/src/lib_micheline/tezos-micheline.opam b/src/lib_micheline/tezos-micheline.opam index bc6a0d6de7c1..11cad1527f8f 100644 --- a/src/lib_micheline/tezos-micheline.opam +++ b/src/lib_micheline/tezos-micheline.opam @@ -1,3 +1,5 @@ +# This file was automatically generated, do not edit. +# Edit file manifest/main.ml instead. opam-version: "2.0" maintainer: "contact@tezos.com" authors: ["Tezos devteam"] diff --git a/src/lib_mockup/dune b/src/lib_mockup/dune index 564a36404d25..835542fe9fc3 100644 --- a/src/lib_mockup/dune +++ b/src/lib_mockup/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (library (name tezos_mockup_registration) (public_name tezos-mockup-registration) @@ -22,7 +25,7 @@ resto-cohttp-self-serving-client tezos-rpc tezos-p2p-services - tezos-p2p ; for registering the relevant RPCs + tezos-p2p tezos-protocol-environment tezos-stdlib-unix tezos-rpc-http diff --git a/src/lib_mockup/test/dune b/src/lib_mockup/test/dune index e0877cea63f9..742366028756 100644 --- a/src/lib_mockup/test/dune +++ b/src/lib_mockup/test/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (tests (names test_mockup_args test_fuzzing_mockup_args test_persistence) (package tezos-mockup) diff --git a/src/lib_mockup/tezos-mockup-commands.opam b/src/lib_mockup/tezos-mockup-commands.opam index 0fd35756f118..8cabb8c142f2 100644 --- a/src/lib_mockup/tezos-mockup-commands.opam +++ b/src/lib_mockup/tezos-mockup-commands.opam @@ -1,3 +1,5 @@ +# This file was automatically generated, do not edit. +# Edit file manifest/main.ml instead. opam-version: "2.0" maintainer: "contact@tezos.com" authors: ["Tezos devteam"] diff --git a/src/lib_mockup/tezos-mockup-registration.opam b/src/lib_mockup/tezos-mockup-registration.opam index 28a2a4367331..7e68a26a2f90 100644 --- a/src/lib_mockup/tezos-mockup-registration.opam +++ b/src/lib_mockup/tezos-mockup-registration.opam @@ -1,3 +1,5 @@ +# This file was automatically generated, do not edit. +# Edit file manifest/main.ml instead. opam-version: "2.0" maintainer: "contact@tezos.com" authors: ["Tezos devteam"] diff --git a/src/lib_mockup/tezos-mockup.opam b/src/lib_mockup/tezos-mockup.opam index 8b443bc6a9b2..c6bd243a86d3 100644 --- a/src/lib_mockup/tezos-mockup.opam +++ b/src/lib_mockup/tezos-mockup.opam @@ -1,3 +1,5 @@ +# This file was automatically generated, do not edit. +# Edit file manifest/main.ml instead. opam-version: "2.0" maintainer: "contact@tezos.com" authors: ["Tezos devteam"] diff --git a/src/lib_mockup_proxy/dune b/src/lib_mockup_proxy/dune index 611121e0ad5c..200610b2cc4d 100644 --- a/src/lib_mockup_proxy/dune +++ b/src/lib_mockup_proxy/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (library (name tezos_mockup_proxy) (public_name tezos-mockup-proxy) diff --git a/src/lib_mockup_proxy/tezos-mockup-proxy.opam b/src/lib_mockup_proxy/tezos-mockup-proxy.opam index 0ec29ea6f345..b92886a2a2dd 100644 --- a/src/lib_mockup_proxy/tezos-mockup-proxy.opam +++ b/src/lib_mockup_proxy/tezos-mockup-proxy.opam @@ -1,3 +1,5 @@ +# This file was automatically generated, do not edit. +# Edit file manifest/main.ml instead. opam-version: "2.0" maintainer: "contact@tezos.com" authors: ["Tezos devteam"] diff --git a/src/lib_openapi/dune b/src/lib_openapi/dune index 843a6952958d..a3915470fbdb 100644 --- a/src/lib_openapi/dune +++ b/src/lib_openapi/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (library (name tezos_openapi) (public_name tezos-openapi) diff --git a/src/lib_openapi/tezos-openapi.opam b/src/lib_openapi/tezos-openapi.opam index a202d2b5f813..e7c5e5b6efb3 100644 --- a/src/lib_openapi/tezos-openapi.opam +++ b/src/lib_openapi/tezos-openapi.opam @@ -1,3 +1,5 @@ +# This file was automatically generated, do not edit. +# Edit file manifest/main.ml instead. opam-version: "2.0" maintainer: "contact@tezos.com" authors: ["Tezos devteam"] diff --git a/src/lib_p2p/dune b/src/lib_p2p/dune index 3bae4762d283..a4e3a984926c 100644 --- a/src/lib_p2p/dune +++ b/src/lib_p2p/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (library (name tezos_p2p) (public_name tezos-p2p) diff --git a/src/lib_p2p/test/dune b/src/lib_p2p/test/dune index 169c2ca93a18..847d6147b5ad 100644 --- a/src/lib_p2p/test/dune +++ b/src/lib_p2p/test/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (executables (names test_p2p_socket @@ -7,9 +10,6 @@ test_p2p_buffer_reader test_p2p_banned_peers test_p2p_node - ; Deactivated because it fails on CI (but not locally) - ; See https://gitlab.com/tezos/tezos/-/issues/1184 - ; test_p2p_logging test_p2p_connect_handler) (libraries tezos-base diff --git a/src/lib_p2p/tezos-p2p.opam b/src/lib_p2p/tezos-p2p.opam index f8ff4e2837c6..1da471e5b467 100644 --- a/src/lib_p2p/tezos-p2p.opam +++ b/src/lib_p2p/tezos-p2p.opam @@ -1,3 +1,5 @@ +# This file was automatically generated, do not edit. +# Edit file manifest/main.ml instead. opam-version: "2.0" maintainer: "contact@tezos.com" authors: ["Tezos devteam"] @@ -14,6 +16,7 @@ depends: [ "tezos-stdlib" "tezos-stdlib-unix" "tezos-p2p-services" + "bisect_ppx" { with-test & >= "2.7.0" } "tezos-test-helpers" {with-test} "tezos-base-test-helpers" {with-test} "tezos-event-logging-test-helpers" {with-test} diff --git a/src/lib_p2p_services/dune b/src/lib_p2p_services/dune index cec350313fd5..f3ab87513202 100644 --- a/src/lib_p2p_services/dune +++ b/src/lib_p2p_services/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (library (name tezos_p2p_services) (public_name tezos-p2p-services) diff --git a/src/lib_p2p_services/tezos-p2p-services.opam b/src/lib_p2p_services/tezos-p2p-services.opam index 424cae6f1821..9bcca8fc9ee4 100644 --- a/src/lib_p2p_services/tezos-p2p-services.opam +++ b/src/lib_p2p_services/tezos-p2p-services.opam @@ -1,3 +1,5 @@ +# This file was automatically generated, do not edit. +# Edit file manifest/main.ml instead. opam-version: "2.0" maintainer: "contact@tezos.com" authors: ["Tezos devteam"] diff --git a/src/lib_protocol_compiler/bin/dune b/src/lib_protocol_compiler/bin/dune index 036fa138da1e..34166bdcd2c4 100644 --- a/src/lib_protocol_compiler/bin/dune +++ b/src/lib_protocol_compiler/bin/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (env (static (flags (:standard -ccopt -static)))) (executable diff --git a/src/lib_protocol_compiler/dune b/src/lib_protocol_compiler/dune index ed834661db53..68c3cc5790eb 100644 --- a/src/lib_protocol_compiler/dune +++ b/src/lib_protocol_compiler/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (library (name tezos_protocol_registerer) (public_name tezos-protocol-compiler.registerer) diff --git a/src/lib_protocol_compiler/tezos-protocol-compiler.opam b/src/lib_protocol_compiler/tezos-protocol-compiler.opam index 779736a67389..76805daf788c 100644 --- a/src/lib_protocol_compiler/tezos-protocol-compiler.opam +++ b/src/lib_protocol_compiler/tezos-protocol-compiler.opam @@ -1,3 +1,5 @@ +# This file was automatically generated, do not edit. +# Edit file manifest/main.ml instead. opam-version: "2.0" maintainer: "contact@tezos.com" authors: ["Tezos devteam"] @@ -7,7 +9,6 @@ dev-repo: "git+https://gitlab.com/tezos/tezos.git" license: "MIT" depends: [ "dune" { >= "2.9" } - ## ocaml should be in sync with `script/version.sh` "ocaml" { >= "4.12.0" & < "4.13" } "tezos-base" "tezos-protocol-environment-sigs" diff --git a/src/lib_protocol_environment/dune b/src/lib_protocol_environment/dune index b366e102210b..5c7b2c0d7061 100644 --- a/src/lib_protocol_environment/dune +++ b/src/lib_protocol_environment/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (library (name tezos_protocol_environment) (public_name tezos-protocol-environment) diff --git a/src/lib_protocol_environment/s_packer/dune b/src/lib_protocol_environment/s_packer/dune index bbb914014cf8..d75eb949ad18 100644 --- a/src/lib_protocol_environment/s_packer/dune +++ b/src/lib_protocol_environment/s_packer/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (library (name tezos_protocol_environment_packer) (public_name tezos-protocol-environment-packer) diff --git a/src/lib_protocol_environment/sigs/dune b/src/lib_protocol_environment/sigs/dune index 5d5121ebe4ba..decf62efa509 100644 --- a/src/lib_protocol_environment/sigs/dune +++ b/src/lib_protocol_environment/sigs/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (library (name tezos_protocol_environment_sigs) (public_name tezos-protocol-environment-sigs) diff --git a/src/lib_protocol_environment/structs/dune b/src/lib_protocol_environment/structs/dune index 8ed3961cc077..bb57b5373faa 100644 --- a/src/lib_protocol_environment/structs/dune +++ b/src/lib_protocol_environment/structs/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (library (name tezos_protocol_environment_structs) (public_name tezos-protocol-environment-structs) diff --git a/src/lib_protocol_environment/test/dune b/src/lib_protocol_environment/test/dune index 21308da7ce50..0c6c79590154 100644 --- a/src/lib_protocol_environment/test/dune +++ b/src/lib_protocol_environment/test/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (tests (names test test_mem_context_array_theory test_cache) (package tezos-protocol-environment) diff --git a/src/lib_protocol_environment/tezos-protocol-environment-packer.opam b/src/lib_protocol_environment/tezos-protocol-environment-packer.opam index e38450935fa8..4747bd0241a4 100644 --- a/src/lib_protocol_environment/tezos-protocol-environment-packer.opam +++ b/src/lib_protocol_environment/tezos-protocol-environment-packer.opam @@ -1,3 +1,5 @@ +# This file was automatically generated, do not edit. +# Edit file manifest/main.ml instead. opam-version: "2.0" maintainer: "contact@tezos.com" authors: ["Tezos devteam"] diff --git a/src/lib_protocol_environment/tezos-protocol-environment-sigs.opam b/src/lib_protocol_environment/tezos-protocol-environment-sigs.opam index 8bc8033cf0b5..1662d4aa0407 100644 --- a/src/lib_protocol_environment/tezos-protocol-environment-sigs.opam +++ b/src/lib_protocol_environment/tezos-protocol-environment-sigs.opam @@ -1,3 +1,5 @@ +# This file was automatically generated, do not edit. +# Edit file manifest/main.ml instead. opam-version: "2.0" maintainer: "contact@tezos.com" authors: ["Tezos devteam"] diff --git a/src/lib_protocol_environment/tezos-protocol-environment-structs.opam b/src/lib_protocol_environment/tezos-protocol-environment-structs.opam index 180e7e5b3649..df6561a62d24 100644 --- a/src/lib_protocol_environment/tezos-protocol-environment-structs.opam +++ b/src/lib_protocol_environment/tezos-protocol-environment-structs.opam @@ -1,3 +1,5 @@ +# This file was automatically generated, do not edit. +# Edit file manifest/main.ml instead. opam-version: "2.0" maintainer: "contact@tezos.com" authors: ["Tezos devteam"] diff --git a/src/lib_protocol_environment/tezos-protocol-environment.opam b/src/lib_protocol_environment/tezos-protocol-environment.opam index 3d77f95907bc..be3bb24f19b5 100644 --- a/src/lib_protocol_environment/tezos-protocol-environment.opam +++ b/src/lib_protocol_environment/tezos-protocol-environment.opam @@ -1,3 +1,5 @@ +# This file was automatically generated, do not edit. +# Edit file manifest/main.ml instead. opam-version: "2.0" maintainer: "contact@tezos.com" authors: ["Tezos devteam"] @@ -7,9 +9,9 @@ dev-repo: "git+https://gitlab.com/tezos/tezos.git" license: "MIT" depends: [ "dune" { >= "2.9" } - "zarith" { >= "1.12" & < "1.13" } # the signature of the [Z] module has changed in 1.12 + "zarith" { >= "1.12" & < "1.13" } "zarith_stubs_js" - "bls12-381" { >= "1.1.0" & < "1.2.0" } # for env4 + "bls12-381" { >= "1.1.0" & < "1.2.0" } "tezos-base" "tezos-sapling" "tezos-protocol-environment-sigs" diff --git a/src/lib_protocol_environment/tezos-shell-context.opam b/src/lib_protocol_environment/tezos-shell-context.opam index 8b87e23366ff..aa1f175ec69d 100644 --- a/src/lib_protocol_environment/tezos-shell-context.opam +++ b/src/lib_protocol_environment/tezos-shell-context.opam @@ -1,3 +1,5 @@ +# This file was automatically generated, do not edit. +# Edit file manifest/main.ml instead. opam-version: "2.0" maintainer: "contact@tezos.com" authors: ["Tezos devteam"] diff --git a/src/lib_protocol_updater/dune b/src/lib_protocol_updater/dune index 854855d8c21a..436b898bbe78 100644 --- a/src/lib_protocol_updater/dune +++ b/src/lib_protocol_updater/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (library (name tezos_protocol_updater) (public_name tezos-protocol-updater) diff --git a/src/lib_protocol_updater/tezos-protocol-updater.opam b/src/lib_protocol_updater/tezos-protocol-updater.opam index 205b1c17a06e..b39ba141cd85 100644 --- a/src/lib_protocol_updater/tezos-protocol-updater.opam +++ b/src/lib_protocol_updater/tezos-protocol-updater.opam @@ -1,3 +1,5 @@ +# This file was automatically generated, do not edit. +# Edit file manifest/main.ml instead. opam-version: "2.0" maintainer: "contact@tezos.com" authors: ["Tezos devteam"] diff --git a/src/lib_proxy/dune b/src/lib_proxy/dune index fb7b8b47e643..ec96134175c2 100644 --- a/src/lib_proxy/dune +++ b/src/lib_proxy/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (library (name tezos_proxy) (public_name tezos-proxy) diff --git a/src/lib_proxy/test/dune b/src/lib_proxy/test/dune index cbe5d613face..659d639bde2c 100644 --- a/src/lib_proxy/test/dune +++ b/src/lib_proxy/test/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (tests (names test_proxy test_fuzzing_proxy_getter test_light test_fuzzing_light) (package tezos-proxy) diff --git a/src/lib_proxy/tezos-proxy.opam b/src/lib_proxy/tezos-proxy.opam index 83813777c27e..dbfac0c73796 100644 --- a/src/lib_proxy/tezos-proxy.opam +++ b/src/lib_proxy/tezos-proxy.opam @@ -1,3 +1,5 @@ +# This file was automatically generated, do not edit. +# Edit file manifest/main.ml instead. opam-version: "2.0" maintainer: "contact@tezos.com" authors: ["Tezos devteam"] diff --git a/src/lib_proxy_server_config/dune b/src/lib_proxy_server_config/dune index b4e95bc6efb2..d7d8e8539191 100644 --- a/src/lib_proxy_server_config/dune +++ b/src/lib_proxy_server_config/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (library (name tezos_proxy_server_config) (public_name tezos-proxy-server-config) diff --git a/src/lib_proxy_server_config/test/dune b/src/lib_proxy_server_config/test/dune index 8fa9be66fd9a..56d8954039b2 100644 --- a/src/lib_proxy_server_config/test/dune +++ b/src/lib_proxy_server_config/test/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (test (name test_proxy_server_config) (package tezos-proxy-server-config) diff --git a/src/lib_proxy_server_config/tezos-proxy-server-config.opam b/src/lib_proxy_server_config/tezos-proxy-server-config.opam index cdd07b9de56d..61bc36b7754e 100644 --- a/src/lib_proxy_server_config/tezos-proxy-server-config.opam +++ b/src/lib_proxy_server_config/tezos-proxy-server-config.opam @@ -1,3 +1,5 @@ +# This file was automatically generated, do not edit. +# Edit file manifest/main.ml instead. opam-version: "2.0" maintainer: "contact@tezos.com" authors: ["Tezos devteam"] diff --git a/src/lib_requester/dune b/src/lib_requester/dune index 190997f1e102..090136e6e5aa 100644 --- a/src/lib_requester/dune +++ b/src/lib_requester/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (library (name tezos_requester) (public_name tezos-requester) diff --git a/src/lib_requester/test/dune b/src/lib_requester/test/dune index eb0d4caf9bab..8f699cbda7d8 100644 --- a/src/lib_requester/test/dune +++ b/src/lib_requester/test/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (tests (names test_requester test_fuzzing_requester) (package tezos-requester) diff --git a/src/lib_requester/tezos-requester.opam b/src/lib_requester/tezos-requester.opam index ec1f085cf79a..16d3de92db97 100644 --- a/src/lib_requester/tezos-requester.opam +++ b/src/lib_requester/tezos-requester.opam @@ -1,3 +1,5 @@ +# This file was automatically generated, do not edit. +# Edit file manifest/main.ml instead. opam-version: "2.0" maintainer: "contact@tezos.com" authors: ["Tezos devteam"] diff --git a/src/lib_rpc/dune b/src/lib_rpc/dune index 5fa541f5908b..37e3c145d302 100644 --- a/src/lib_rpc/dune +++ b/src/lib_rpc/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (library (name tezos_rpc) (public_name tezos-rpc) diff --git a/src/lib_rpc/tezos-rpc.opam b/src/lib_rpc/tezos-rpc.opam index f5da282937fb..7d5eb44e2145 100644 --- a/src/lib_rpc/tezos-rpc.opam +++ b/src/lib_rpc/tezos-rpc.opam @@ -1,3 +1,5 @@ +# This file was automatically generated, do not edit. +# Edit file manifest/main.ml instead. opam-version: "2.0" maintainer: "contact@tezos.com" authors: ["Tezos devteam"] diff --git a/src/lib_rpc_http/dune b/src/lib_rpc_http/dune index 49a0aecbe5ed..dbb7bab5d08e 100644 --- a/src/lib_rpc_http/dune +++ b/src/lib_rpc_http/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (library (name tezos_rpc_http) (public_name tezos-rpc-http) diff --git a/src/lib_rpc_http/test/dune b/src/lib_rpc_http/test/dune index 998e0ce796fd..0d6d731ee5c4 100644 --- a/src/lib_rpc_http/test/dune +++ b/src/lib_rpc_http/test/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (test (name test_rpc_http) (package 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 9e04f7998e46..3a554a5ac01f 100644 --- a/src/lib_rpc_http/tezos-rpc-http-client-unix.opam +++ b/src/lib_rpc_http/tezos-rpc-http-client-unix.opam @@ -1,3 +1,5 @@ +# This file was automatically generated, do not edit. +# Edit file manifest/main.ml instead. opam-version: "2.0" maintainer: "contact@tezos.com" authors: ["Tezos devteam"] diff --git a/src/lib_rpc_http/tezos-rpc-http-client.opam b/src/lib_rpc_http/tezos-rpc-http-client.opam index 8ce76805ae6a..a99e66d564e5 100644 --- a/src/lib_rpc_http/tezos-rpc-http-client.opam +++ b/src/lib_rpc_http/tezos-rpc-http-client.opam @@ -1,3 +1,5 @@ +# This file was automatically generated, do not edit. +# Edit file manifest/main.ml instead. opam-version: "2.0" maintainer: "contact@tezos.com" authors: ["Tezos devteam"] diff --git a/src/lib_rpc_http/tezos-rpc-http-server.opam b/src/lib_rpc_http/tezos-rpc-http-server.opam index 24587ec82500..3b0f4776a0a7 100644 --- a/src/lib_rpc_http/tezos-rpc-http-server.opam +++ b/src/lib_rpc_http/tezos-rpc-http-server.opam @@ -1,3 +1,5 @@ +# This file was automatically generated, do not edit. +# Edit file manifest/main.ml instead. opam-version: "2.0" maintainer: "contact@tezos.com" authors: ["Tezos devteam"] diff --git a/src/lib_rpc_http/tezos-rpc-http.opam b/src/lib_rpc_http/tezos-rpc-http.opam index a300aeb884fb..37e936558c47 100644 --- a/src/lib_rpc_http/tezos-rpc-http.opam +++ b/src/lib_rpc_http/tezos-rpc-http.opam @@ -1,3 +1,5 @@ +# This file was automatically generated, do not edit. +# Edit file manifest/main.ml instead. opam-version: "2.0" maintainer: "contact@tezos.com" authors: ["Tezos devteam"] diff --git a/src/lib_sapling/bindings/dune b/src/lib_sapling/bindings/dune index 393cc4c1c127..1e468f6e3840 100644 --- a/src/lib_sapling/bindings/dune +++ b/src/lib_sapling/bindings/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (executable (name rustzcash_ctypes_gen) (libraries diff --git a/src/lib_sapling/dune b/src/lib_sapling/dune index e04da04a955e..7d5c05308b19 100644 --- a/src/lib_sapling/dune +++ b/src/lib_sapling/dune @@ -1,5 +1,5 @@ -;; This binding assumes that librustzcash.a is installed in the system default -;; directories or in $OPAM_SWITCH_PREFIX/lib +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. (library (name tezos_sapling) diff --git a/src/lib_sapling/test/dune b/src/lib_sapling/test/dune index 5bdbb85300f5..bd9355fde721 100644 --- a/src/lib_sapling/test/dune +++ b/src/lib_sapling/test/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (tests (names test_rustzcash test_keys test_merkle test_roots test_sapling) (package tezos-sapling) diff --git a/src/lib_sapling/tezos-sapling.opam b/src/lib_sapling/tezos-sapling.opam index 54bd1a2f95cb..52004fa6d46e 100644 --- a/src/lib_sapling/tezos-sapling.opam +++ b/src/lib_sapling/tezos-sapling.opam @@ -1,3 +1,5 @@ +# This file was automatically generated, do not edit. +# Edit file manifest/main.ml instead. opam-version: "2.0" maintainer: "contact@tezos.com" authors: ["Tezos devteam"] diff --git a/src/lib_shell/bench/dune b/src/lib_shell/bench/dune index e7157dee1f9a..b3a5f13afeb8 100644 --- a/src/lib_shell/bench/dune +++ b/src/lib_shell/bench/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (tests (names bench_simple bench_tool) (package tezos-shell) diff --git a/src/lib_shell/dune b/src/lib_shell/dune index 9faad3883dfd..a7b652bcaf46 100644 --- a/src/lib_shell/dune +++ b/src/lib_shell/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (library (name tezos_shell) (public_name tezos-shell) diff --git a/src/lib_shell/test/dune b/src/lib_shell/test/dune index 1eba3c58c71b..190e70cd8e92 100644 --- a/src/lib_shell/test/dune +++ b/src/lib_shell/test/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (tests (names test_shell diff --git a/src/lib_shell/tezos-shell.opam b/src/lib_shell/tezos-shell.opam index 42e504b7ac1b..e923d703d7ad 100644 --- a/src/lib_shell/tezos-shell.opam +++ b/src/lib_shell/tezos-shell.opam @@ -1,3 +1,5 @@ +# This file was automatically generated, do not edit. +# Edit file manifest/main.ml instead. opam-version: "2.0" maintainer: "contact@tezos.com" authors: ["Tezos devteam"] diff --git a/src/lib_shell_benchmarks/dune b/src/lib_shell_benchmarks/dune index 55997cdec1cb..b88703c03d34 100644 --- a/src/lib_shell_benchmarks/dune +++ b/src/lib_shell_benchmarks/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (library (name tezos_shell_benchmarks) (public_name tezos-shell-benchmarks) diff --git a/src/lib_shell_benchmarks/tezos-shell-benchmarks.opam b/src/lib_shell_benchmarks/tezos-shell-benchmarks.opam index 29b31ca47337..784f779a48aa 100644 --- a/src/lib_shell_benchmarks/tezos-shell-benchmarks.opam +++ b/src/lib_shell_benchmarks/tezos-shell-benchmarks.opam @@ -1,3 +1,5 @@ +# This file was automatically generated, do not edit. +# Edit file manifest/main.ml instead. opam-version: "2.0" maintainer: "contact@tezos.com" authors: ["Tezos devteam"] diff --git a/src/lib_shell_services/dune b/src/lib_shell_services/dune index 395357239d44..2d0609a26ff8 100644 --- a/src/lib_shell_services/dune +++ b/src/lib_shell_services/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (library (name tezos_shell_services) (public_name tezos-shell-services) @@ -5,7 +8,7 @@ (libraries tezos-base tezos-workers - tezos-stdlib-unix ;; for Tezos_stdlib_unix.Internal_event_unix + tezos-stdlib-unix tezos-p2p-services tezos-version) (flags diff --git a/src/lib_shell_services/test/dune b/src/lib_shell_services/test/dune index bb37df34d011..6f4572af1848 100644 --- a/src/lib_shell_services/test/dune +++ b/src/lib_shell_services/test/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (test (name test) (package tezos-shell-services) diff --git a/src/lib_shell_services/test_helpers/dune b/src/lib_shell_services/test_helpers/dune index 716c97187b05..decc0e1b32c6 100644 --- a/src/lib_shell_services/test_helpers/dune +++ b/src/lib_shell_services/test_helpers/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (library (name tezos_shell_services_test_helpers) (public_name tezos-shell-services-test-helpers) diff --git a/src/lib_shell_services/test_helpers/test/dune b/src/lib_shell_services/test_helpers/test/dune index 489db3593a03..300808e44a0d 100644 --- a/src/lib_shell_services/test_helpers/test/dune +++ b/src/lib_shell_services/test_helpers/test/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (test (name test_block_services) (package tezos-shell-services-test-helpers) diff --git a/src/lib_shell_services/test_helpers/tezos-shell-services-test-helpers.opam b/src/lib_shell_services/test_helpers/tezos-shell-services-test-helpers.opam index 63a0b7715dba..07d51365daf9 100644 --- a/src/lib_shell_services/test_helpers/tezos-shell-services-test-helpers.opam +++ b/src/lib_shell_services/test_helpers/tezos-shell-services-test-helpers.opam @@ -1,3 +1,5 @@ +# This file was automatically generated, do not edit. +# Edit file manifest/main.ml instead. opam-version: "2.0" maintainer: "contact@tezos.com" authors: ["Tezos devteam"] diff --git a/src/lib_shell_services/tezos-shell-services.opam b/src/lib_shell_services/tezos-shell-services.opam index 478415b7beca..4f9b0d1d716f 100644 --- a/src/lib_shell_services/tezos-shell-services.opam +++ b/src/lib_shell_services/tezos-shell-services.opam @@ -1,3 +1,5 @@ +# This file was automatically generated, do not edit. +# Edit file manifest/main.ml instead. opam-version: "2.0" maintainer: "contact@tezos.com" authors: ["Tezos devteam"] diff --git a/src/lib_signer_backends/dune b/src/lib_signer_backends/dune index f0cd66a22bc6..5a7ae1ede50e 100644 --- a/src/lib_signer_backends/dune +++ b/src/lib_signer_backends/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (library (name tezos_signer_backends) (public_name tezos-signer-backends) diff --git a/src/lib_signer_backends/test/dune b/src/lib_signer_backends/test/dune index a6051b020e24..2daed438fe85 100644 --- a/src/lib_signer_backends/test/dune +++ b/src/lib_signer_backends/test/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (test (name test_encrypted) (package tezos-signer-backends) diff --git a/src/lib_signer_backends/tezos-signer-backends.opam b/src/lib_signer_backends/tezos-signer-backends.opam index bd38e2fb69d5..ae279a1b3b61 100644 --- a/src/lib_signer_backends/tezos-signer-backends.opam +++ b/src/lib_signer_backends/tezos-signer-backends.opam @@ -1,3 +1,5 @@ +# This file was automatically generated, do not edit. +# Edit file manifest/main.ml instead. opam-version: "2.0" maintainer: "contact@tezos.com" authors: ["Tezos devteam"] diff --git a/src/lib_signer_backends/unix/dune b/src/lib_signer_backends/unix/dune index 99c32a10f8a5..82d5b27df3d7 100644 --- a/src/lib_signer_backends/unix/dune +++ b/src/lib_signer_backends/unix/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (library (name tezos_signer_backends_unix) (public_name tezos-signer-backends.unix) diff --git a/src/lib_signer_backends/unix/test/dune b/src/lib_signer_backends/unix/test/dune index b8fe7f080e6c..66a6aaedeaeb 100644 --- a/src/lib_signer_backends/unix/test/dune +++ b/src/lib_signer_backends/unix/test/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (test (name test_crouching) (package tezos-signer-backends) diff --git a/src/lib_signer_services/dune b/src/lib_signer_services/dune index a52cc0edae08..01b5c2159440 100644 --- a/src/lib_signer_services/dune +++ b/src/lib_signer_services/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (library (name tezos_signer_services) (public_name tezos-signer-services) diff --git a/src/lib_signer_services/tezos-signer-services.opam b/src/lib_signer_services/tezos-signer-services.opam index 695f2fe51c62..2d22688aaf78 100644 --- a/src/lib_signer_services/tezos-signer-services.opam +++ b/src/lib_signer_services/tezos-signer-services.opam @@ -1,3 +1,5 @@ +# This file was automatically generated, do not edit. +# Edit file manifest/main.ml instead. opam-version: "2.0" maintainer: "contact@tezos.com" authors: ["Tezos devteam"] diff --git a/src/lib_stdlib/dune b/src/lib_stdlib/dune index 22eb92bb69ec..a70ca9eebbb2 100644 --- a/src/lib_stdlib/dune +++ b/src/lib_stdlib/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (library (name tezos_stdlib) (public_name tezos-stdlib) diff --git a/src/lib_stdlib/test-unix/dune b/src/lib_stdlib/test-unix/dune index 480f0caacffc..eb0be4172b1a 100644 --- a/src/lib_stdlib/test-unix/dune +++ b/src/lib_stdlib/test-unix/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (tests (names test_lwt_pipe test_circular_buffer test_circular_buffer_fuzzy) (package tezos-stdlib) diff --git a/src/lib_stdlib/test/dune b/src/lib_stdlib/test/dune index 498db102508b..6edd339ac2c8 100644 --- a/src/lib_stdlib/test/dune +++ b/src/lib_stdlib/test/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (tests (names test_bits diff --git a/src/lib_stdlib/tezos-stdlib.opam b/src/lib_stdlib/tezos-stdlib.opam index 28b2c0185bc0..8300d58b9998 100644 --- a/src/lib_stdlib/tezos-stdlib.opam +++ b/src/lib_stdlib/tezos-stdlib.opam @@ -1,3 +1,5 @@ +# This file was automatically generated, do not edit. +# Edit file manifest/main.ml instead. opam-version: "2.0" maintainer: "contact@tezos.com" authors: ["Tezos devteam"] diff --git a/src/lib_stdlib_unix/dune b/src/lib_stdlib_unix/dune index 0e699efafeaf..b4edb8f277ae 100644 --- a/src/lib_stdlib_unix/dune +++ b/src/lib_stdlib_unix/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (library (name tezos_stdlib_unix) (public_name tezos-stdlib-unix) diff --git a/src/lib_stdlib_unix/tezos-stdlib-unix.opam b/src/lib_stdlib_unix/tezos-stdlib-unix.opam index 32406d5c54db..30dee0a24d23 100644 --- a/src/lib_stdlib_unix/tezos-stdlib-unix.opam +++ b/src/lib_stdlib_unix/tezos-stdlib-unix.opam @@ -1,3 +1,5 @@ +# This file was automatically generated, do not edit. +# Edit file manifest/main.ml instead. opam-version: "2.0" maintainer: "contact@tezos.com" authors: ["Tezos devteam"] diff --git a/src/lib_store/dune b/src/lib_store/dune index 1923652fcb76..0ffcbf088775 100644 --- a/src/lib_store/dune +++ b/src/lib_store/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (library (name tezos_store) (public_name tezos-store) diff --git a/src/lib_store/test/dune b/src/lib_store/test/dune index e9cc456b71ff..b3d55af6f3fa 100644 --- a/src/lib_store/test/dune +++ b/src/lib_store/test/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (executable (name test) (libraries diff --git a/src/lib_store/tezos-store.opam b/src/lib_store/tezos-store.opam index 2f740d720480..aadc627a39fa 100644 --- a/src/lib_store/tezos-store.opam +++ b/src/lib_store/tezos-store.opam @@ -1,3 +1,5 @@ +# This file was automatically generated, do not edit. +# Edit file manifest/main.ml instead. opam-version: "2.0" maintainer: "contact@tezos.com" authors: ["Tezos devteam"] diff --git a/src/lib_test/dune b/src/lib_test/dune index 1475e281b3eb..fe62fb136ec8 100644 --- a/src/lib_test/dune +++ b/src/lib_test/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (library (name lib_test) (public_name tezos-test-helpers) @@ -12,6 +15,4 @@ (js_of_ocaml) (flags (:standard -linkall))) -;; This rule is necessary for `make lint-tests-pkg`, without it dune -;; complains that the alias is empty (rule (alias runtest_js) (action progn)) diff --git a/src/lib_test/tezos-test-helpers.opam b/src/lib_test/tezos-test-helpers.opam index c62786e554a9..19e04124ddfb 100644 --- a/src/lib_test/tezos-test-helpers.opam +++ b/src/lib_test/tezos-test-helpers.opam @@ -1,3 +1,5 @@ +# This file was automatically generated, do not edit. +# Edit file manifest/main.ml instead. opam-version: "2.0" maintainer: "contact@tezos.com" authors: ["Tezos devteam"] diff --git a/src/lib_validation/dune b/src/lib_validation/dune index 66b6482ad0b0..eda1ab54202c 100644 --- a/src/lib_validation/dune +++ b/src/lib_validation/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (library (name tezos_validation) (public_name tezos-validation) diff --git a/src/lib_validation/tezos-validation.opam b/src/lib_validation/tezos-validation.opam index 77dd2e174951..64b056e6733a 100644 --- a/src/lib_validation/tezos-validation.opam +++ b/src/lib_validation/tezos-validation.opam @@ -1,3 +1,5 @@ +# This file was automatically generated, do not edit. +# Edit file manifest/main.ml instead. opam-version: "2.0" maintainer: "contact@tezos.com" authors: ["Tezos devteam"] diff --git a/src/lib_version/dune b/src/lib_version/dune index 949aff061d70..7d16f6ec6e2b 100644 --- a/src/lib_version/dune +++ b/src/lib_version/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (library (name tezos_version) (public_name tezos-version) @@ -8,6 +11,5 @@ (rule (targets generated_git_info.ml) - ; Ensures the hash update whenever a source file is modified ; (deps (universe) (:script get-git-info.mlt)) (action (with-stdout-to %{targets} (run %{ocaml} unix.cma %{script})))) diff --git a/src/lib_version/tezos-version.opam b/src/lib_version/tezos-version.opam index 5a2451517c56..5c9dd4c67168 100644 --- a/src/lib_version/tezos-version.opam +++ b/src/lib_version/tezos-version.opam @@ -1,3 +1,5 @@ +# This file was automatically generated, do not edit. +# Edit file manifest/main.ml instead. opam-version: "2.0" maintainer: "contact@tezos.com" authors: ["Tezos devteam"] diff --git a/src/lib_workers/dune b/src/lib_workers/dune index b7568f42c103..ec4182244358 100644 --- a/src/lib_workers/dune +++ b/src/lib_workers/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (library (name tezos_workers) (public_name tezos-workers) diff --git a/src/lib_workers/tezos-workers.opam b/src/lib_workers/tezos-workers.opam index 56d00f5d81bd..61d9bb31f5f7 100644 --- a/src/lib_workers/tezos-workers.opam +++ b/src/lib_workers/tezos-workers.opam @@ -1,3 +1,5 @@ +# This file was automatically generated, do not edit. +# Edit file manifest/main.ml instead. opam-version: "2.0" maintainer: "contact@tezos.com" authors: ["Tezos devteam"] diff --git a/src/tooling/dune b/src/tooling/dune index 834bedfccbdf..be5d30d56190 100644 --- a/src/tooling/dune +++ b/src/tooling/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (library (name tezos_tooling) (public_name tezos-tooling) diff --git a/src/tooling/tezos-tooling.opam b/src/tooling/tezos-tooling.opam index 2c8f59890509..c15874f7bb62 100644 --- a/src/tooling/tezos-tooling.opam +++ b/src/tooling/tezos-tooling.opam @@ -1,3 +1,5 @@ +# This file was automatically generated, do not edit. +# Edit file manifest/main.ml instead. opam-version: "2.0" maintainer: "contact@tezos.com" authors: ["Tezos devteam"] diff --git a/src/tooling/tztop/dune b/src/tooling/tztop/dune index 6868f3fdd41d..8b8490df2012 100644 --- a/src/tooling/tztop/dune +++ b/src/tooling/tztop/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (executable (name tztop_main) (public_name tztop) @@ -8,9 +11,3 @@ tezos-base compiler-libs.toplevel (select tztop.ml from (utop -> tztop.utop.ml) (-> tztop.vanilla.ml)))) - -; We use Dune's select statement and keep uTop optional -; Keeping uTop optional lets `make build` succeed, -; which uses tezos/opam-repository to resolve dependencies, -; on the CI. This prevents having to add dev-dependency to -; tezos/opam-repository unnecessarily diff --git a/tezt/lib/dune b/tezt/lib/dune index af1afc7d444b..13f6b233b7cb 100644 --- a/tezt/lib/dune +++ b/tezt/lib/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (library (name tezt) (public_name tezt) diff --git a/tezt/lib/tezt.opam b/tezt/lib/tezt.opam index 028eb8203a9b..314149d5432d 100644 --- a/tezt/lib/tezt.opam +++ b/tezt/lib/tezt.opam @@ -1,3 +1,5 @@ +# This file was automatically generated, do not edit. +# Edit file manifest/main.ml instead. opam-version: "2.0" maintainer: "contact@tezos.com" authors: ["Tezos devteam"] diff --git a/tezt/lib_tezos/dune b/tezt/lib_tezos/dune index 83e677217e53..461e309a7a32 100644 --- a/tezt/lib_tezos/dune +++ b/tezt/lib_tezos/dune @@ -1,3 +1,6 @@ +; This file was automatically generated, do not edit. +; Edit file manifest/main.ml instead. + (library (name tezt_tezos) (public_name tezt-tezos) diff --git a/tezt/lib_tezos/tezt-tezos.opam b/tezt/lib_tezos/tezt-tezos.opam index 8449c28f03b4..a95cbc48b7f8 100644 --- a/tezt/lib_tezos/tezt-tezos.opam +++ b/tezt/lib_tezos/tezt-tezos.opam @@ -1,3 +1,5 @@ +# This file was automatically generated, do not edit. +# Edit file manifest/main.ml instead. opam-version: "2.0" maintainer: "contact@tezos.com" authors: ["Tezos devteam"] -- GitLab From 532a316ede1f81a6abddc15064ed466e9270e6dd Mon Sep 17 00:00:00 2001 From: Romain Bardou Date: Wed, 24 Nov 2021 13:59:53 +0100 Subject: [PATCH 3/4] CI: check consistency of manifest-generated files --- .gitlab/ci/sanity.yml | 1 + manifest/Makefile | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/.gitlab/ci/sanity.yml b/.gitlab/ci/sanity.yml index 1f608e94d03d..55b085c2553f 100644 --- a/.gitlab/ci/sanity.yml +++ b/.gitlab/ci/sanity.yml @@ -8,6 +8,7 @@ sanity_ci: before_script: - . ./scripts/version.sh script: + - make -C manifest check - src/tooling/lint.sh --check-gitlab-ci-yml docker-hadolint: diff --git a/manifest/Makefile b/manifest/Makefile index e8b718a91576..bc440654ecc0 100644 --- a/manifest/Makefile +++ b/manifest/Makefile @@ -19,6 +19,17 @@ manifest: $(foreach file, $(SOURCE), _build/$(file)) ocamlc -bin-annot -g -w @1..3@5..28@30..39@43@46..47@49..57@61..62 \ -I _build $^ -o manifest +# Used in the CI. +.PHONY: check +check: all + @git diff HEAD --exit-code || ( \ + echo "Repository not clean after 'make -C manifest'."; \ + echo "You should not edit generated dune and .opam files directly."; \ + echo "Edit manifest/main.ml instead."; \ + echo "Then run 'make -C manifest' and commit the difference."; \ + exit 1 \ + ) + .PHONY: clean clean: rm -rf _build manifest -- GitLab From b1d14fb38bc824df39adb633f5ef034289787a81 Mon Sep 17 00:00:00 2001 From: Romain Bardou Date: Wed, 5 Jan 2022 14:36:47 +0100 Subject: [PATCH 4/4] Manifest: add README.md --- manifest/README.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 manifest/README.md diff --git a/manifest/README.md b/manifest/README.md new file mode 100644 index 000000000000..c4983e097a4d --- /dev/null +++ b/manifest/README.md @@ -0,0 +1,29 @@ +# Octez Manifest + +This directory contains all the information which is needed to +generate `dune` and `.opam` files for Octez. Module `Manifest` +provides functions to express those `dune` and `.opam` files, +and file `main.ml` uses it to declare Dune targets and Opam packages. +File `manifest.mli` documents how to declare them. + +## Usage + +After you add, remove or modify a target, run `make -C manifest` from +the root directory of the repository to regenerate all `dune` +and `.opam` files. If you are removing targets, you need to remove the +corresponding `dune` and `.opam` files manually. Then, commit both +your modifications to the manifest and to the `dune` and `.opam` files. + +## VS Code + +If you use VS Code to edit the files in this directory, you may want +to add a `dune` file for better editor integration with `ocaml-lsp-server`. +This `dune` file can simply contain: + + (executable (name main)) + +Then, instead of using `make -C manifest` to build, use +`dune exec manifest/main.exe` (from the root directory of the repository). + +You can see more information about this issue in: +https://gitlab.com/tezos/tezos/-/merge_requests/3366#note_763223998 -- GitLab