From c8339ed2efdf4ab9a39f641e298c584451a9be4a Mon Sep 17 00:00:00 2001 From: Lesenechal Remi Date: Wed, 11 Dec 2019 12:23:11 +0100 Subject: [PATCH] first try --- .gitignore | 1 + ligo.opam | 6 +++++- src/bin/dune | 2 +- src/bin/expect_tests/dune | 2 +- src/dune | 2 +- src/main/compile/dune | 2 +- src/main/dune | 2 +- src/main/run/dune | 2 +- src/main/uncompile/dune | 2 +- src/passes/1-parser/cameligo/dune | 7 +++++-- src/passes/1-parser/dune | 2 +- src/passes/1-parser/pascaligo/dune | 17 +++++++++++------ src/passes/1-parser/reasonligo/dune | 9 +++++++-- src/passes/1-parser/shared/dune | 6 +++++- src/passes/2-simplify/dune | 1 + src/passes/3-self_ast_simplified/dune | 2 +- src/passes/4-typer/dune | 2 +- src/passes/6-transpiler/dune | 2 +- src/passes/7-self_mini_c/dune | 2 +- src/passes/8-compiler/dune | 2 +- src/passes/9-self_michelson/dune | 2 +- src/passes/operators/dune | 2 +- src/stages/ast_simplified/dune | 2 +- src/stages/ast_typed/dune | 2 +- src/stages/common/dune | 2 +- src/stages/mini_c/dune | 2 +- src/stages/typesystem/dune | 2 +- src/test/dune | 2 +- 28 files changed, 56 insertions(+), 33 deletions(-) diff --git a/.gitignore b/.gitignore index fb756e969..6b016bfb5 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ Version.ml **/.DS_Store .vscode/ /ligo.install +/_coverage/ diff --git a/ligo.opam b/ligo.opam index 303135cdb..896b93eee 100644 --- a/ligo.opam +++ b/ligo.opam @@ -11,6 +11,7 @@ depends: [ "ocamlfind" { build } "dune" { build & = "1.11.4" } "menhir" { = "20190626" } + "bisect_ppx" {dev & >= "2.0.0"} "ppx_let" "ppx_deriving" "ppx_expect" @@ -20,7 +21,10 @@ depends: [ "alcotest" { with-test } "getopt" # work around upstream in-place update - "ocaml-migrate-parsetree" { = "1.3.1" } + "ocaml-migrate-parsetree" { = "1.4.0" } +] +pin-depends: [ + ["bisect_ppx.git" "git+https://github.com/aantron/bisect_ppx.git"] ] build: [ [ "dune" "build" "-p" name "-j" jobs ] diff --git a/src/bin/dune b/src/bin/dune index 4546f2a6f..60874931e 100644 --- a/src/bin/dune +++ b/src/bin/dune @@ -7,7 +7,7 @@ ) (modules cli cli_helpers version) (preprocess - (pps ppx_let) + (pps ppx_let bisect_ppx --conditional) ) (flags (:standard -open Simple_utils)) ) diff --git a/src/bin/expect_tests/dune b/src/bin/expect_tests/dune index c7856e438..9c3d03b03 100644 --- a/src/bin/expect_tests/dune +++ b/src/bin/expect_tests/dune @@ -2,5 +2,5 @@ (name cli_expect_tests) (libraries simple-utils cli) (inline_tests) - (preprocess (pps ppx_let ppx_expect)) + (preprocess (pps ppx_let ppx_expect bisect_ppx --conditional)) (flags (:standard -open Simple_utils))) diff --git a/src/dune b/src/dune index de5be01e6..0bfd1396c 100644 --- a/src/dune +++ b/src/dune @@ -9,6 +9,6 @@ main ) (preprocess - (pps ppx_let) + (pps ppx_let bisect_ppx --conditional) ) ) diff --git a/src/main/compile/dune b/src/main/compile/dune index e13261066..90c858e1d 100644 --- a/src/main/compile/dune +++ b/src/main/compile/dune @@ -18,7 +18,7 @@ self_michelson ) (preprocess - (pps ppx_let) + (pps ppx_let bisect_ppx --conditional) ) (flags (:standard -w +1..62-4-9-44-40-42-48-30@39@33 -open Simple_utils -open Tezos_utils )) ) diff --git a/src/main/dune b/src/main/dune index e2fe18f86..802ab2af3 100644 --- a/src/main/dune +++ b/src/main/dune @@ -7,7 +7,7 @@ uncompile ) (preprocess - (pps ppx_let) + (pps ppx_let bisect_ppx --conditional) ) (flags (:standard -w +1..62-4-9-44-40-42-48-30@39@33 -open Simple_utils -open Tezos_utils )) ) diff --git a/src/main/run/dune b/src/main/run/dune index f39c18a69..faaedeab4 100644 --- a/src/main/run/dune +++ b/src/main/run/dune @@ -17,7 +17,7 @@ compile ) (preprocess - (pps ppx_let) + (pps ppx_let bisect_ppx --conditional) ) (flags (:standard -w +1..62-4-9-44-40-42-48-30@39@33 -open Simple_utils -open Tezos_utils )) ) diff --git a/src/main/uncompile/dune b/src/main/uncompile/dune index 3db4a92f0..bf039deb8 100644 --- a/src/main/uncompile/dune +++ b/src/main/uncompile/dune @@ -11,7 +11,7 @@ transpiler ) (preprocess - (pps ppx_let) + (pps ppx_let bisect_ppx --conditional) ) (flags (:standard -w +1..62-4-9-44-40-42-48-30@39@33 -open Simple_utils -open Tezos_utils )) ) diff --git a/src/passes/1-parser/cameligo/dune b/src/passes/1-parser/cameligo/dune index 730290696..f68e85661 100644 --- a/src/passes/1-parser/cameligo/dune +++ b/src/passes/1-parser/cameligo/dune @@ -15,8 +15,11 @@ str simple-utils tezos-utils - getopt) - (flags (:standard -open Simple_utils -open Parser_shared ))) + getopt ) + (preprocess + (pps bisect_ppx --conditional) ) + (flags (:standard -open Simple_utils -open Parser_shared )) +) (executable (name LexerMain) diff --git a/src/passes/1-parser/dune b/src/passes/1-parser/dune index 8e478b392..bbf559aa0 100644 --- a/src/passes/1-parser/dune +++ b/src/passes/1-parser/dune @@ -10,7 +10,7 @@ parser_reasonligo ) (preprocess - (pps ppx_let) + (pps ppx_let bisect_ppx --conditional) ) (flags (:standard -w +1..62-4-9-44-40-42-48-30@39@33 -open Simple_utils -open Parser_shared)) ) diff --git a/src/passes/1-parser/pascaligo/dune b/src/passes/1-parser/pascaligo/dune index 53c2d8385..a5bcdc6b7 100644 --- a/src/passes/1-parser/pascaligo/dune +++ b/src/passes/1-parser/pascaligo/dune @@ -10,12 +10,17 @@ (public_name ligo.parser.pascaligo) (modules AST pascaligo Parser ParserLog LexToken) (libraries - menhirLib - parser_shared - hex - simple-utils - tezos-utils) - (flags (:standard -open Parser_shared -open Simple_utils))) + menhirLib + parser_shared + hex + simple-utils + tezos-utils + ) + (preprocess + (pps bisect_ppx --conditional) + ) + (flags (:standard -open Parser_shared -open Simple_utils)) +) (executable (name LexerMain) diff --git a/src/passes/1-parser/reasonligo/dune b/src/passes/1-parser/reasonligo/dune index 8d65f1363..e98678262 100644 --- a/src/passes/1-parser/reasonligo/dune +++ b/src/passes/1-parser/reasonligo/dune @@ -16,8 +16,13 @@ str simple-utils tezos-utils - getopt) - (flags (:standard -open Simple_utils -open Parser_shared -open Parser_cameligo))) + getopt + ) + (preprocess + (pps bisect_ppx --conditional) + ) + (flags (:standard -open Simple_utils -open Parser_shared -open Parser_cameligo )) +) (executable (name LexerMain) diff --git a/src/passes/1-parser/shared/dune b/src/passes/1-parser/shared/dune index 61c43fb28..7777459d0 100644 --- a/src/passes/1-parser/shared/dune +++ b/src/passes/1-parser/shared/dune @@ -7,7 +7,11 @@ simple-utils uutf getopt - zarith) + zarith + ) + (preprocess + (pps bisect_ppx --conditional) + ) (modules Lexer LexerLog diff --git a/src/passes/2-simplify/dune b/src/passes/2-simplify/dune index 20ec8cb9d..66ab7d4b2 100644 --- a/src/passes/2-simplify/dune +++ b/src/passes/2-simplify/dune @@ -12,6 +12,7 @@ (preprocess (pps ppx_let + bisect_ppx --conditional ) ) (flags (:standard -w +1..62-4-9-44-40-42-48-30@39@33 -open Simple_utils )) diff --git a/src/passes/3-self_ast_simplified/dune b/src/passes/3-self_ast_simplified/dune index 39eacaf3e..69dc6b507 100644 --- a/src/passes/3-self_ast_simplified/dune +++ b/src/passes/3-self_ast_simplified/dune @@ -6,7 +6,7 @@ ast_simplified ) (preprocess - (pps ppx_let) + (pps ppx_let bisect_ppx --conditional) ) (flags (:standard -w +1..62-4-9-44-40-42-48-30@39@33 -open Simple_utils )) ) diff --git a/src/passes/4-typer/dune b/src/passes/4-typer/dune index dc6164c4f..35c5e807d 100644 --- a/src/passes/4-typer/dune +++ b/src/passes/4-typer/dune @@ -11,7 +11,7 @@ operators ) (preprocess - (pps ppx_let) + (pps ppx_let bisect_ppx --conditional) ) (flags (:standard -w +1..62-4-9-44-40-42-48-30@39@33 -open Simple_utils )) ) diff --git a/src/passes/6-transpiler/dune b/src/passes/6-transpiler/dune index a547714f0..6c3139e5e 100644 --- a/src/passes/6-transpiler/dune +++ b/src/passes/6-transpiler/dune @@ -10,7 +10,7 @@ operators ) (preprocess - (pps ppx_let) + (pps ppx_let bisect_ppx --conditional) ) (flags (:standard -w +1..62-4-9-44-40-42-48-30@39@33 -open Simple_utils )) ) diff --git a/src/passes/7-self_mini_c/dune b/src/passes/7-self_mini_c/dune index da1927e25..fed4a09a1 100644 --- a/src/passes/7-self_mini_c/dune +++ b/src/passes/7-self_mini_c/dune @@ -6,7 +6,7 @@ ) (inline_tests) (preprocess - (pps ppx_let ppx_expect) + (pps ppx_let ppx_expect bisect_ppx --conditional) ) (flags (:standard -w +1..62-4-9-44-40-42-48-30@39@33 -open Simple_utils )) ) diff --git a/src/passes/8-compiler/dune b/src/passes/8-compiler/dune index 5e4412d81..89878e2fd 100644 --- a/src/passes/8-compiler/dune +++ b/src/passes/8-compiler/dune @@ -9,7 +9,7 @@ operators ) (preprocess - (pps ppx_let) + (pps ppx_let bisect_ppx --conditional) ) (flags (:standard -w +1..62-4-9-44-40-42-48-30@39@33 -open Simple_utils -open Tezos_utils )) ) diff --git a/src/passes/9-self_michelson/dune b/src/passes/9-self_michelson/dune index 047fe33a4..b7387bdc1 100644 --- a/src/passes/9-self_michelson/dune +++ b/src/passes/9-self_michelson/dune @@ -6,7 +6,7 @@ tezos-utils ) (preprocess - (pps ppx_let) + (pps ppx_let bisect_ppx --conditional) ) (flags (:standard -w +1..62-4-9-44-40-42-48-30@39@33 -open Simple_utils )) ) diff --git a/src/passes/operators/dune b/src/passes/operators/dune index f2125905a..64222a117 100644 --- a/src/passes/operators/dune +++ b/src/passes/operators/dune @@ -9,7 +9,7 @@ mini_c ) (preprocess - (pps ppx_let) + (pps ppx_let bisect_ppx --conditional) ) (flags (:standard -open Simple_utils )) ) diff --git a/src/stages/ast_simplified/dune b/src/stages/ast_simplified/dune index 8d0e1651f..f6c961536 100644 --- a/src/stages/ast_simplified/dune +++ b/src/stages/ast_simplified/dune @@ -7,7 +7,7 @@ stage_common ) (preprocess - (pps ppx_let) + (pps ppx_let bisect_ppx --conditional) ) (flags (:standard -open Simple_utils )) ) diff --git a/src/stages/ast_typed/dune b/src/stages/ast_typed/dune index 9494873a7..7eed79e47 100644 --- a/src/stages/ast_typed/dune +++ b/src/stages/ast_typed/dune @@ -8,7 +8,7 @@ stage_common ) (preprocess - (pps ppx_let) + (pps ppx_let bisect_ppx --conditional) ) (flags (:standard -open Simple_utils)) ) diff --git a/src/stages/common/dune b/src/stages/common/dune index c607b6041..0ce33599f 100644 --- a/src/stages/common/dune +++ b/src/stages/common/dune @@ -7,7 +7,7 @@ ) (inline_tests) (preprocess - (pps ppx_let ppx_expect) + (pps ppx_let ppx_expect bisect_ppx --conditional) ) (flags (:standard -open Simple_utils)) ) diff --git a/src/stages/mini_c/dune b/src/stages/mini_c/dune index 86e375fb1..827685e5e 100644 --- a/src/stages/mini_c/dune +++ b/src/stages/mini_c/dune @@ -7,6 +7,6 @@ stage_common ) (inline_tests) - (preprocess (pps ppx_expect ppx_let)) + (preprocess (pps ppx_expect ppx_let bisect_ppx --conditional)) (flags (:standard -w +1..62-4-9-44-40-42-48-30@39@33 -open Simple_utils )) ) diff --git a/src/stages/typesystem/dune b/src/stages/typesystem/dune index d5e1deaf6..922140cf4 100644 --- a/src/stages/typesystem/dune +++ b/src/stages/typesystem/dune @@ -8,7 +8,7 @@ mini_c ) (preprocess - (pps ppx_let) + (pps ppx_let bisect_ppx --conditional) ) (flags (:standard -w +1..62-4-9-44-40-42-48-30@39@33 -open Simple_utils )) ) diff --git a/src/test/dune b/src/test/dune index 24a44109f..a65a038c0 100644 --- a/src/test/dune +++ b/src/test/dune @@ -7,7 +7,7 @@ tezos-crypto ) (preprocess - (pps ppx_let) + (pps ppx_let bisect_ppx --conditional) ) (flags (:standard -w +1..62-4-9-44-40-42-48@39@33 -open Simple_utils )) )