aboutsummaryrefslogtreecommitdiff
path: root/tools
AgeCommit message (Collapse)Author
2018-10-01[lib] [flags] Move coqlib handling out of `Flags`Emilio Jesus Gallego Arias
The relevant logic is already in `Envars`, so it makes sense to make it private and don't expose the low-level implementation of the logic.
2018-09-27[coqc] Use standard binary location routine from libEmilio Jesus Gallego Arias
Instead of rolling our own, we use the standard one that works well when binaries are symlinked.
2018-09-26[ocaml] Update required OCaml version to 4.05.0Emilio Jesus Gallego Arias
Closes #7380. Ubuntu 18.04 and Debian Buster will ship this OCaml version so it makes sense we bump our dependency to 4.05.0 as we can use some newer compiler features.
2018-09-21[dune] Improve support for Coq tools.Emilio Jesus Gallego Arias
- Install `CoqMakefile.in` - Build `coqwc` and `coqdoc` This allows to build most contribs I've tried with the Dune-based OPAM package.
2018-09-07[dune] Fix build of coq_dune in 4.02.3Emilio Jesus Gallego Arias
Fixes #8431
2018-09-05[build] Preliminary support for building Coq with `dune`.Emilio Jesus Gallego Arias
[Dune](https://github.com/ocaml/dune) is a compositional declarative build system for OCaml. It provides automatic generation of `version.ml`, `.merlin`, `META`, `opam`, API documentation; install management; easy integration with external libraries, test runners, and modular builds. In particular, Dune uniformly handles components regardless whether they live in, or out-of-tree. This greatly simplifies cases where a plugin [or CoqIde] is checked out in the current working copy but then distributed separately [and vice-versa]. Dune can thus be used as a more flexible `coq_makefile` replacement. For now we provide experimental support for a Dune build. In order to build Coq + the standard library with Dune type: ``` $ make -f Makefile.dune world ``` This PR includes a preliminary, developer-only preview of Dune for Coq. There is still ongoing work, see https://github.com/coq/coq/issues/8052 for tracking status towards full support. ## Technical description. Dune works out of the box with Coq, once we have fixed some modularity issues. The main remaining challenge was to support `.vo` files. As Dune doesn't support custom build rules yet, to properly build `.vo` files we provide a small helper script `tools/coq_dune.ml`. The script will scan the Coq library directories and generate the corresponding rules for `.v -> .vo` and `.ml4 -> .ml` builds. The script uses `coqdep` as to correctly output the dependencies of `.v` files. `coq_dune` is akin to `coq_makefile` and should be able to be used to build Coq projects in the future. Due to this pitfall, the build process has to proceed in three stages: 1) build `coqdep` and `coq_dune`; 2) generate `dune` files for `theories` and `plugins`; 3) perform a regular build with all targets are in scope. ## FAQ ### Why Dune? Coq has a moderately complex build system and it is not a secret that many developer-hours have been spent fighting with `make`. In particular, the current `make`-based system does offer poor support to verify that the current build rules and variables are coherent, and requires significant manual, error-prone. Many variables must be passed by hand, duplicated, etc... Additionally, our make system offers poor integration with now standard OCaml ecosystem tools such as `opam`, `ocamlfind` or `odoc`. Another critical point is build compositionality. Coq is rich in 3rd party contributions, and a big shortcoming of the current make system is that it cannot be used to build these projects; requiring us to maintain a custom tool, `coq_makefile`, with the corresponding cost. In the past, there has been some efforts to migrate Coq to more specialized build systems, however these stalled due to a variety of reasons. Dune, is a declarative, OCaml-specific build tool that is on the path to become the standard build system for the OCaml ecosystem. Dune seems to be a good fit for Coq well: it is well-supported, fast, compositional, and designed for large projects. ### Does Dune replace the make-based build system? The current, make-based build system is unmodified by this PR and kept as the default option. However, Dune has the potential ### Is this PR complete? What does it provide? This PR is ready for developer preview and feedback. The build system is functional, however, more work is necessary in order to make Dune the default for Coq. The main TODOs are tracked at https://github.com/coq/coq/issues/8052 This PR allows developers to use most of the features of Dune today: - Modular organization of the codebase; each component is built only against declared dependencies so components are checked for containment more strictly. - Hygienic builds; Dune places all artifacts under `_build`. - Automatic generation of `.install` files, simplified OPAM workflow. - `utop` support, `-opaque` in developer mode, etc... - `ml4` files are handled using `coqp5`, a native-code customized camlp5 executable which brings much faster `ml4 -> ml` processing. ### What dependencies does Dune require? Dune doesn't depend on any 3rd party package other than the OCaml compiler. ### Some Benchs: ``` $ /usr/bin/time make DUNEOPT="-j 1000" -f Makefile.dune states 59.50user 18.81system 0:29.83elapsed 262%CPU (0avgtext+0avgdata 302996maxresident)k 0inputs+646632outputs (0major+4893811minor)pagefaults 0swaps $ /usr/bin/time sh -c "./configure -local -native-compiler no && make -j states" 88.21user 23.65system 0:32.96elapsed 339%CPU (0avgtext+0avgdata 304992maxresident)k 0inputs+1051680outputs (0major+5300680minor)pagefaults 0swaps ```
2018-08-29Merge PR #8282: [coq_makefile] print all options (Fix #7529)Théo Zimmermann
2018-08-24Fix ordering of before/after in print-pretty-timed-*Jason Gross
Fixes #8158
2018-08-21[coq_makefile] print all options (Fix #7529)Enrico Tassi
2018-07-29Adding support for custom entries in notations.Hugo Herbelin
- New command "Declare Custom Entry bar". - Entries can have levels. - Printing is done using a notion of coercion between grammar entries. This typically corresponds to rules of the form 'Notation "[ x ]" := x (x custom myconstr).' but also 'Notation "{ x }" := x (in custom myconstr, x constr).'. - Rules declaring idents such as 'Notation "x" := x (in custom myconstr, x ident).' are natively recognized. - Rules declaring globals such as 'Notation "x" := x (in custom myconstr, x global).' are natively recognized. Incidentally merging ETConstr and ETConstrAsBinder. Noticed in passing that parsing binder as custom was not done as in constr. Probably some fine-tuning still to do (priority of notations, interactions between scopes and entries, ...). To be tested live further.
2018-07-17Remove fourier pluginMaxime Dénès
As stated in the manual, the fourier tactic is subsumed by lra.
2018-07-11Merge PR #8002: make-both-single-timing-files: fix --sort-by=diffJason Gross
2018-07-08Merge PR #8015: Output UTF-8 explicitly in timing toolsJason Gross
2018-07-08Remove Emacs modes.Théo Zimmermann
They are not used anymore. People should use Proof-General (and optionally Company-Coq) instead.
2018-07-07make diff sort by difference, not absolute differenceRalf Jung
2018-07-07make-both-single-timing-files: fix --sort-by=diffRalf Jung
2018-07-07Output UTF-8 explicitly in timing toolsJasper Hugunin
2018-07-07Merge PR #7921: Archive the `gallina` toolMaxime Dénès
2018-07-05Merge PR #7990: Convert timing tool to python3Jason Gross
2018-07-05Merge PR #7746: Many small cleanups removing unused arguments and functionsPierre-Marie Pédrot
2018-07-04Convert timing tools to run with both python2 and python3Jasper Hugunin
2018-07-03Fix timing tools on NixOS.Théo Zimmermann
2018-07-03coqdoc Index.find_string: remove unused argument.Gaëtan Gilbert
Unused since 6832c60f741e6bfb2a850d567fd6a1dff7059393.
2018-07-03Coq_makefile.generate_conf_coq_config: remove unused argument.Gaëtan Gilbert
2018-06-25Archive the `gallina` toolVincent Laporte
2018-06-16Fix #7836: tools/inferior-coq.el uses next-line instead of forward-line.Perry E. Metzger
2018-06-13Merge PR #7241: [coq_makefile] COQMF_WINDRIVE is empty on linux (fix #7233)Théo Zimmermann
2018-05-31Explicitly require python2 in python scripts in tools/Armaël Guéneau
2018-05-21[ide] Remove special option `-ideslave`Emilio Jesus Gallego Arias
This has no effect anymore, verbose printing is controlled now by the regular, common `quiet` flag.
2018-05-21[stm] Make toplevels standalone executables.Emilio Jesus Gallego Arias
We turn coqtop "plugins" into standalone executables, which will be installed in `COQBIN` and located using the standard `PATH` mechanism. Using dynamic linking for `coqtop` customization didn't make a lot of sense, given that only one of such "plugins" could be loaded at a time. This cleans up some code and solves two problems: - `coqtop` needing to locate plugins, - dependency issues as plugins in `stm` depended on files in `toplevel`. In order to implement this, we do some minor cleanup of the toplevel API, making it functional, and implement uniform build rules. In particular: - `stm` and `toplevel` have become library-only directories, - a new directory, `topbin`, contains the new executables, - 4 new binaries have been introduced, for coqide and the stm. - we provide a common and cleaned up way to locate toplevels.
2018-05-08[coqdep] Remove unnecessary dependency on Pp and CError.Emilio Jesus Gallego Arias
This allows for even earlier bootstrapping.
2018-05-08[coqdep] Minor cleanups.Emilio Jesus Gallego Arias
- Remove inclusion of the `tactics` directory, this is coming from a time loadable modules were found there, now all are under `plugins`. - Remove 2 dependencies so we can bootstrap coqdep earlier. - Use `Format` instead of `Printf` for printing.
2018-05-04Fix #7413: coqdep warning on repeated filesGaëtan Gilbert
The same warning exists in ocamllibdep so I copied the change there. Detecting when 2 paths are the same is approximate, eg ././a.ml and a.ml are considered different. Implementing realpath probably isn't worth doing for this warning.
2018-04-27Fix PHONY typo in coq_makefileGaëtan Gilbert
2018-04-13[coq_makefile] COQMF_WINDRIVE is empty on linux (fix #7233)Enrico Tassi
2018-03-30Remove deprecated commands Arguments Scope and Implicit ArgumentsJasper Hugunin
2018-03-21docsRalf Jung
2018-03-20coq_makefile: provide variables to override for adding extra flagsRalf Jung
2018-03-20coq_makefile: FLAG make variables should not contain LIBSRalf Jung
2018-03-09Merge PR #6851: Fix #6830: coqdep VDFILE uses too many arguments for ↵Maxime Dénès
fiat-crypto/OSX
2018-03-08Merge PR #6582: Mangle auto-generated namesMaxime Dénès
2018-03-06Closes #6830: coqdep reads options and files from _CoqProject.Gaëtan Gilbert
Note that we don't look inside -arg for eg -coqlib.
2018-03-01Add source (project file / command line) to project fields.Gaëtan Gilbert
2018-02-28Fix #6830: coqdep VDFILE uses too many arguments for fiat-crypto/OSXGaëtan Gilbert
We fix as suggested by @JasonGross by reading file names from the _CoqProject when coq_makefile was invoked with one. I made coqdep only look at the .v files from _CoqProject because it's easier this way. Since we're going through the _CoqProject parser we could have coqdep understand more of it but let's leave that to another PR (and maybe someone else). Some projects pass vfiles on the command line, we keep the list of these files to pass them to coqdep via command line even when there is a _CoqProject. Multiple project files is probably broken.
2018-02-27Update headers following #6543.Théo Zimmermann
2018-02-19Merge PR #6646: Change references to CAMLP4 to CAMLP5 since we no longer use ↵Maxime Dénès
camlp4
2018-02-17Change references to CAMLP4 to CAMLP5 to be more accurate since we noJim Fehrle
longer use camlp4.
2018-02-17Implement name mangling optionJasper Hugunin
2018-02-15Merge PR #1073: new quick2vo target: like vio2vo, but smarterMaxime Dénès
2018-02-15new quick2vo target: like vio2vo, but smarterRalf Jung