From 22b331dbed831da453da08c1e7e4994a0dc574e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Georges=20Dup=C3=A9ron?= Date: Wed, 15 May 2019 15:17:04 +0200 Subject: [PATCH] Added tests to build, fixed some unused variables. --- .gitignore | 2 ++ .gitlab-ci.yml | 12 +++++++++++- src/.gitignore | 3 +-- src/parser/parser.ml | 6 +++--- vendors/ligo-opam-repository | 2 +- vendors/ligo-utils | 2 +- 6 files changed, 19 insertions(+), 8 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..3bf9025ae --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/_build/ +/dune-project diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index feb1bfaa4..e5147cb4e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -34,12 +34,22 @@ before_script: # paths: # - src/ligo/bin/cli.ml +local-dune-job: + script: + - vendors/ligo-opam-repository/rewrite-local-opam-repository.sh + - opam repository add localrepo "file://$PWD/vendors/ligo-opam-repository/" + - opam install -y --build-test --deps-only ./src/ + - (dune build -p ligo) + # TODO: also try instead from time to time: + #- (cd ./src/; dune build -p ligo) + dune build -p ligo + local-repo-job: script: - vendors/ligo-opam-repository/rewrite-local-opam-repository.sh - opam repository add localrepo "file://$PWD/vendors/ligo-opam-repository/" #--build-test - - opam install -y -v ligo + - opam install -y ligo remote-repo-job: script: diff --git a/src/.gitignore b/src/.gitignore index b49caf123..e780d0ea9 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -1,5 +1,4 @@ -_build/* -*/_build +_build/ .merlin */.merlin *.install diff --git a/src/parser/parser.ml b/src/parser/parser.ml index 854029d33..0ca86bd76 100644 --- a/src/parser/parser.ml +++ b/src/parser/parser.ml @@ -22,7 +22,7 @@ let parse_file (source: string) : AST_Raw.t result = (fun () -> open_in pp_input) in let lexbuf = Lexing.from_channel channel in let module Lexer = Lexer.Make(LexToken) in - let Lexer.{read ; close} = + let Lexer.{read ; close ; _} = Lexer.open_token_stream None in specific_try (fun () -> function | Parser.Error -> ( @@ -59,7 +59,7 @@ let parse_file (source: string) : AST_Raw.t result = let parse_string (s:string) : AST_Raw.t result = let lexbuf = Lexing.from_string s in let module Lexer = Lexer.Make(LexToken) in - let Lexer.{read ; close} = + let Lexer.{read ; close ; _} = Lexer.open_token_stream None in specific_try (fun () -> function | Parser.Error -> ( @@ -83,7 +83,7 @@ let parse_string (s:string) : AST_Raw.t result = let parse_expression (s:string) : AST_Raw.expr result = let lexbuf = Lexing.from_string s in let module Lexer = Lexer.Make(LexToken) in - let Lexer.{read ; close} = + let Lexer.{read ; close; _} = Lexer.open_token_stream None in specific_try (fun () -> function | Parser.Error -> ( diff --git a/vendors/ligo-opam-repository b/vendors/ligo-opam-repository index fbfa642eb..c794c6169 160000 --- a/vendors/ligo-opam-repository +++ b/vendors/ligo-opam-repository @@ -1 +1 @@ -Subproject commit fbfa642ebd4d55ec1a33cbdc75093c0681ddd3ce +Subproject commit c794c6169960fd6d625ec2eb292f4136ec276f99 diff --git a/vendors/ligo-utils b/vendors/ligo-utils index 6ccdf0bf9..3a7d2a85f 160000 --- a/vendors/ligo-utils +++ b/vendors/ligo-utils @@ -1 +1 @@ -Subproject commit 6ccdf0bf9e69585197d97b2f023590aeb03076de +Subproject commit 3a7d2a85f1792105a375e35aa03afa137b29a9af