aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/CODEOWNERS3
-rw-r--r--.gitlab-ci.yml36
-rw-r--r--kernel/cbytegen.ml4
-rw-r--r--kernel/cbytegen.mli3
-rw-r--r--kernel/clambda.ml4
-rw-r--r--kernel/clambda.mli3
-rw-r--r--lib/flags.ml8
-rw-r--r--lib/flags.mli29
-rw-r--r--vernac/vernacentries.ml10
9 files changed, 56 insertions, 44 deletions
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index 7f3ee5c37d..329697ca4b 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -302,6 +302,9 @@
/dev/build/windows @MSoegtropIMC
# Secondary maintainer @maximedenes
+# This file belongs to CI
+Makefile.ci @ejgallego
+# Secondary maintainer @SkySkimmer
########## Developer tools ##########
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index ad3d5e46db..6b42ac7eb1 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,12 +1,15 @@
-image: ubuntu:xenial
+image: ubuntu:bionic
stages:
- opam-boot
- build
- test
+# some default values
variables:
- # some default values
+ # Format: $IMAGE-V$DATE-$HOUR-$MINUTE
+ CACHEKEY: bionic-V2018-04-29-00-50
+ DEBIAN_FRONTEND: "noninteractive"
NJOBS: "2"
COMPILER: "4.02.3"
CAMLP5_VER: "6.14"
@@ -16,26 +19,26 @@ variables:
# some useful values
COMPILER_32BIT: "4.02.3+32bit"
- COMPILER_BLEEDING_EDGE: "4.06.0"
- CAMLP5_VER_BLEEDING_EDGE: "7.03"
+ COMPILER_BLEEDING_EDGE: "4.06.1"
+ CAMLP5_VER_BLEEDING_EDGE: "7.05"
- TIMING_PACKAGES: "time python"
+ TIMING_PACKAGES: "time python3"
COQIDE_PACKAGES: "libgtk2.0-dev libgtksourceview2.0-dev"
#COQIDE_PACKAGES_32BIT: "libgtk2.0-dev:i386 libgtksourceview2.0-dev:i386"
- COQIDE_OPAM: "lablgtk-extras"
- COQIDE_OPAM_BE: "lablgtk.2.18.6 lablgtk-extras.1.6"
- COQDOC_PACKAGES: "texlive-latex-base texlive-latex-recommended texlive-latex-extra texlive-math-extra texlive-fonts-recommended texlive-fonts-extra latex-xcolor ghostscript tipa python3-pip"
- COQDOC_OPAM: "hevea"
- SPHINX_PACKAGES: "bs4 sphinx sphinx_rtd_theme pexpect antlr4-python3-runtime sphinxcontrib-bibtex"
+ COQIDE_OPAM: "lablgtk.2.18.5 conf-gtksourceview.2"
+ COQIDE_OPAM_BE: "lablgtk.2.18.6 conf-gtksourceview.2"
+ COQDOC_PACKAGES: "texlive-latex-extra texlive-fonts-recommended hevea python3-sphinx python3-pexpect python3-sphinx-rtd-theme python3-bs4 python3-sphinxcontrib.bibtex python3-pip"
+ SPHINX_PACKAGES: "antlr4-python3-runtime"
ELPI_OPAM: "elpi"
-
before_script:
+ - cat /proc/{cpu,mem}info || true
- ls -a # figure out if artifacts are around
- printenv
# - if [ "$COMPILER" = "$COMPILER_32BIT" ]; then sudo dpkg --add-architecture i386; fi
- apt-get update -qq && apt-get install -y -qq m4 opam ${EXTRA_PACKAGES}
+ # This should be replaced by standard debian packages once python3-antlr4 makes to the archive.
- if [ -n "${PIP_PACKAGES}" ]; then pip3 install ${PIP_PACKAGES}; fi
# if no cache running opam config fails!
- if [ -d .opamcache ]; then eval $(opam config env); fi
@@ -57,9 +60,6 @@ before_script:
- .opamcache
expire_in: 1 week
script:
- # the default repo in this docker image is a local directory
- # at the time of 4aaeb8abf it lagged behind the official
- # repository such that camlp5 7.01 was not available
- opam init -a -y -j $NJOBS --compiler=${COMPILER} default https://opam.ocaml.org
- eval $(opam config env)
- opam update
@@ -178,16 +178,16 @@ opam-boot:
cache:
paths: &cache-paths
- .opamcache
- key: main
+ key: "main-$CACHEKEY"
variables:
- EXTRA_OPAM: "$COQIDE_OPAM $COQDOC_OPAM ocamlgraph $ELPI_OPAM"
+ EXTRA_OPAM: "$COQIDE_OPAM ocamlgraph $ELPI_OPAM"
EXTRA_PACKAGES: "$COQIDE_PACKAGES"
opam-boot:32bit:
<<: *opam-boot-template
cache:
paths: *cache-paths
- key: 32bit
+ key: "32bit-$CACHEKEY"
variables:
COMPILER: "$COMPILER_32BIT"
EXTRA_PACKAGES: "gcc-multilib"
@@ -196,7 +196,7 @@ opam-boot:bleeding-edge:
<<: *opam-boot-template
cache:
paths: *cache-paths
- key: be
+ key: "be-$CACHEKEY"
variables:
COMPILER: "$COMPILER_BLEEDING_EDGE"
CAMLP5_VER: "$CAMLP5_VER_BLEEDING_EDGE"
diff --git a/kernel/cbytegen.ml b/kernel/cbytegen.ml
index 70dc6867ac..a771945dd2 100644
--- a/kernel/cbytegen.ml
+++ b/kernel/cbytegen.ml
@@ -829,6 +829,8 @@ let is_univ_copy max u =
else
false
+let dump_bytecode = ref false
+
let dump_bytecodes init code fvs =
let open Pp in
(str "code =" ++ fnl () ++
@@ -872,7 +874,7 @@ let compile ~fail_on_error ?universes:(universes=0) env c =
reloc, init_code
in
let fv = List.rev (!(reloc.in_env).fv_rev) in
- (if !Flags.dump_bytecode then
+ (if !dump_bytecode then
Feedback.msg_debug (dump_bytecodes init_code !fun_code fv)) ;
Some (init_code,!fun_code, Array.of_list fv)
with TooLargeInductive msg ->
diff --git a/kernel/cbytegen.mli b/kernel/cbytegen.mli
index abab58b60b..1c4cdcbeb4 100644
--- a/kernel/cbytegen.mli
+++ b/kernel/cbytegen.mli
@@ -25,3 +25,6 @@ val compile_constant_body : fail_on_error:bool ->
(** Shortcut of the previous function used during module strengthening *)
val compile_alias : Names.Constant.t -> body_code
+
+(** Dump the bytecode after compilation (for debugging purposes) *)
+val dump_bytecode : bool ref
diff --git a/kernel/clambda.ml b/kernel/clambda.ml
index 7b637c20e6..641d424e2c 100644
--- a/kernel/clambda.ml
+++ b/kernel/clambda.ml
@@ -807,7 +807,7 @@ and lambda_of_args env start args =
(*********************************)
-
+let dump_lambda = ref false
let optimize_lambda lam =
let lam = simplify subst_id lam in
@@ -819,7 +819,7 @@ let lambda_of_constr ~optimize genv c =
Renv.push_rels env (Array.of_list ids);
let lam = lambda_of_constr env c in
let lam = if optimize then optimize_lambda lam else lam in
- if !Flags.dump_lambda then
+ if !dump_lambda then
Feedback.msg_debug (pp_lam lam);
lam
diff --git a/kernel/clambda.mli b/kernel/clambda.mli
index 89b7fd8e3b..6cf46163e3 100644
--- a/kernel/clambda.mli
+++ b/kernel/clambda.mli
@@ -25,3 +25,6 @@ val dynamic_int31_compilation : bool -> lambda array -> lambda
(*spiwack: compiling function to insert dynamic decompilation before
matching integers (in case they are in processor representation) *)
val int31_escape_before_match : bool -> lambda -> lambda
+
+(** Dump the VM lambda code after compilation (for debugging purposes) *)
+val dump_lambda : bool ref
diff --git a/lib/flags.ml b/lib/flags.ml
index 2a1c50f52b..56940f1cf7 100644
--- a/lib/flags.ml
+++ b/lib/flags.ml
@@ -159,11 +159,3 @@ let print_mod_uid = ref false
let profile_ltac = ref false
let profile_ltac_cutoff = ref 2.0
-
-let dump_bytecode = ref false
-let set_dump_bytecode = (:=) dump_bytecode
-let get_dump_bytecode () = !dump_bytecode
-
-let dump_lambda = ref false
-let set_dump_lambda = (:=) dump_lambda
-let get_dump_lambda () = !dump_lambda
diff --git a/lib/flags.mli b/lib/flags.mli
index 53a69f3566..17776d68a4 100644
--- a/lib/flags.mli
+++ b/lib/flags.mli
@@ -10,6 +10,25 @@
(** Global options of the system. *)
+(** WARNING: don't add new entries to this file!
+
+ This file is own its way to deprecation in favor of a purely
+ functional state, but meanwhile it will contain options that are
+ truly global to the system such as [compat] or [debug]
+
+ If you are thinking about adding a global flag, well, just
+ don't. First of all, options make testins exponentially more
+ expensive, due to the growth of flag combinations. So please make
+ some effort in order for your idea to work in a configuration-free
+ manner.
+
+ If you absolutely must pass an option to your new system, then do
+ so as a functional argument so flags are exposed to unit
+ testing. Then, register such parameters with the proper
+ state-handling mechanism of the top-level subsystem of Coq.
+
+ *)
+
(** Command-line flags *)
val boot : bool ref
@@ -126,13 +145,3 @@ val print_mod_uid : bool ref
val profile_ltac : bool ref
val profile_ltac_cutoff : float ref
-
-(** Dump the bytecode after compilation (for debugging purposes) *)
-val dump_bytecode : bool ref
-val set_dump_bytecode : bool -> unit
-val get_dump_bytecode : unit -> bool
-
-(** Dump the VM lambda code after compilation (for debugging purposes) *)
-val dump_lambda : bool ref
-val set_dump_lambda : bool -> unit
-val get_dump_lambda : unit -> bool
diff --git a/vernac/vernacentries.ml b/vernac/vernacentries.ml
index 19658806c5..8c48490ffe 100644
--- a/vernac/vernacentries.ml
+++ b/vernac/vernacentries.ml
@@ -1465,22 +1465,22 @@ let _ =
optkey = ["Printing";"Universes"];
optread = (fun () -> !Constrextern.print_universes);
optwrite = (fun b -> Constrextern.print_universes:=b) }
-
+
let _ =
declare_bool_option
{ optdepr = false;
optname = "dumping bytecode after compilation";
optkey = ["Dump";"Bytecode"];
- optread = Flags.get_dump_bytecode;
- optwrite = Flags.set_dump_bytecode }
+ optread = (fun () -> !Cbytegen.dump_bytecode);
+ optwrite = (:=) Cbytegen.dump_bytecode }
let _ =
declare_bool_option
{ optdepr = false;
optname = "dumping VM lambda code after compilation";
optkey = ["Dump";"Lambda"];
- optread = Flags.get_dump_lambda;
- optwrite = Flags.set_dump_lambda }
+ optread = (fun () -> !Clambda.dump_lambda);
+ optwrite = (:=) Clambda.dump_lambda }
let _ =
declare_bool_option