aboutsummaryrefslogtreecommitdiff
path: root/coq/coq-par-compile.el
AgeCommit message (Collapse)Author
2021-02-13improve/fix code documentation for vok processingHendrik Tews
2021-02-13add second stage -vok for Coq >= 8.11Hendrik Tews
New value vos-and-vok for coq-compile-vos customization option, existing value vos stands now for vos-no-vok. The implementation uses the existing vio2vo infrastructure with symbols vok and vio2vo. Documentation is still missing.
2021-02-13generalize vio2vo symbol names for vok compilationHendrik Tews
In functions, variables and symbols vio2vo is replaced with second-stage to accommodate for vok compilation. For backward compatibility, the options coq-compile-vio2vo-delay and coq-max-background-vio2vo-percentage are kept. They provide default values for their renamed counterparts, if they have been set manually or through the customization system. Documentation has only been marked but not updated yet.
2021-01-10add Coq compile test for a delayed requireHendrik Tews
2020-12-26make-temp-file without text argument for emacs 25Hendrik Tews
fixes #534
2020-12-19ensure vo compilation for tests, increase parallelism, more config outputHendrik Tews
2020-12-19fix 2 background compilation bugs for a dependency in state readyHendrik Tews
2020-12-19add test for recompilation with changesHendrik Tews
2020-12-19fix keep-going when dependency exists but failedHendrik Tews
2020-12-19redesign of parallel background compilation without clonesHendrik Tews
- no clones any more, existing jobs are directly linked - the whole require command is processed by coqdep to determine the required files, this fixes #352 - the require commands are a separate kind of jobs, because they do not need to get compiled - queue items are only stored in require jobs and file jobs can not have a queue dependency, this simplifies the logic
2020-06-19coq-par-compile: use hash for ancestorsHendrik Tews
The hash avoids an exponentially growing number of duplicates in the ancestor collection. Fixes #499
2020-04-15coq-par-compile: support -vos for coq >= 8.11 and default setting changeHendrik Tews
This commit adds support for the new -vos compilation. For coq >= 8.11 only -vos can be used, depending on the config option coq-compile-vos. For coq < 8.11 only -quick/-vio is used, depending on option coq-compile-quick, as before. For a smooth upgrade path, if coq-compile-vos has not been configured, the users intention on whether to use -vos or not for coq >= 8.11 is derived from coq-compile-quick. Some defaults have been changed: - parallel background compilation is the default now in case coq-compile-before-require is enabled. - for coq < 8.11, quick/vio compilation with delayed vio-to-vo conversion is now the default
2019-08-21coq-par-compile: fix 8.10 -schedule-vio2vo incompatibilityHendrik Tews
Use coqc for vio2vo compilation instead of coqtop for Coq >= 8.10+alpha. With https://github.com/coq/coq/pull/8690 vio2vo compilation (-schedule-vio2vo) was moved from coqtop to coqc, see also https://github.com/coq/coq/issues/10679. This commit makes PG compilation compatible with Coq after that PR. However, the patch only checks for the Coq version, therefore making PG vio2vo compilation fail on 8.10 versions before PR 8690. (Compilation still works, it's just that vio2vo postprocessing for the mode quick-and-vio2vo fails.)
2018-12-14Fix remaining uses of CL; Make files more declarativeStefan Monnier
Emacs occasionally loads Elisp files just to get more info (e.g. for C-h f), so loading a file should "no effect". Fix the most obvious such effects: the splash screen and the autotests by moving those effects into a function. * coq/coq-autotest.el: Make it declarative. Use lexical-binding. (coq-autotest): New function holding the code that used to be at top-level. * generic/proof.el: Use lexical-binding. Don't call proof-splash-message just because we're being loaded. * generic/proof-script.el: Use lexical-scoping; fix all warnings. (pg-show-all-portions): Simplify the code with a closure. (proof-activate-scripting): Declare activated-interactively as dyn-scoped. (proof--splash-done): New var. (proof-mode): Call proof-splash-message upon first use. * generic/proof-splash.el (proof-splash-message): Don't check byte-compile-current-file now that we're only called when the mode is activated. * acl2/acl2.el (auto-mode-alist): Use `add-to-list` and \'. * coq/coq-db.el (coq-build-menu-from-db-internal): Avoid silly O(N²). * coq/coq-seq-compile.el: * coq/coq-par-test.el: * coq/coq-par-compile.el: Fix leftover uses of CL's `assert`. * generic/proof-utils.el: * generic/pg-movie.el: * etc/testsuite/pg-test.el: * coq/coq-syntax.el: Fix leftover uses of CL's `incf`. * generic/pg-autotest.el: Fix leftover uses of CL's `decf`. * obsolete/plastic/plastic.el (plastic-preprocessing): Fix leftover use of CL's `loop`. * generic/pg-user.el (proof-add-completions): Do nothing if no proof-assistant is set yet (i.e. during byte-compilation). (byte-compile-current-file): No need to test this any more. * generic/proof-syntax.el (proof-regexp-alt-list): Use mapconcat. Remove unnecessary "\\(?:...\\)". (proof-regexp-alt): Redefine in terms of proof-regexp-alt-list.
2018-12-13Use `cl-lib` instead of `cl` everywhereStefan Monnier
Use lexical-binding in a few files where it was easy. Don't require `proof-compat` when it's not used. * coq/coq-db.el: Use lexical-binding. * coq/coq-system.el: Use lexical-binding. (coq--extract-prog-args): Use concatenated-args rather than recomputing it. * coq/coq.el: Require `span` to silence some warnings. * generic/pg-user.el: Use lexical-binding. (complete, add-completion, completion-min-length): Silence warnings. * generic/pg-xml.el: Use lexical-binding. (pg-xml-string-of): Prefer mapconcat to reduce+concat. * generic/proof-depends.el: Use lexical-binding. (proof-dep-split-deps): Use `push`. * generic/proof-shell.el: Require `span` to silence some warnings. (proof-shell-invisible-command): Don't use lexical-let just to build a wasteful η-redex! * lib/holes.el: Use lexical-binding. Remove redundant :group args. * lib/span.el: Use lexical-binding. (span-read-only-hook): Use user-error. (span-raise): Remove, unused.
2018-12-12Cleanup patch; Moving defvar to toplevelStefan Monnier
Move `defvar`s used to silence warnings outside of eval-when-compile. Make sure they don't actually give a value to the var. * pg-init.el: Simplify. Use (if t ...) to avoid running `require` at compile-time. Don't add subdirs to load-path here since this code is never used. (pg-init--script-full-path, pg-init--pg-root): Inline their definition into their sole user. * generic/proof-utils.el (proof-resize-window-tofit): Inline definitions of window-leftmost-p and window-rightmost-p previously in proof-compat.el. * lib/proof-compat.el (proof-running-on-win32): Remove, not used. (mac-key-mode): Remove, there's no carbon-emacs-package-version in Emacs≥24.3. (pg-custom-undeclare-variable): Use dolist. (save-selected-frame): Remove, save-selected-window also saves&restores the selected frame at the same time. Update all users (which already used save-selected-window around it). (window-leftmost-p, window-rightmost-p, window-bottom-p) (find-coding-system): Remove, unused. * hol-light/hol-light.el (caml-font-lock-keywords): Don't try to defvar it to a dummy value and... (hol-light): ...check its existence before using it instead. * coq/coq.el (coq-may-use-prettify): Simplify initialization.
2018-08-23Fix most doc issues raised by (checkdoc)Erik Martin-Dorel
2018-02-21Update copyright messages and improve the header of elisp files.Erik Martin-Dorel
2017-05-05Change (eval-when (compile) ...) to (eval-when-compile ...)Clément Pit--Claudel
This fixes a bunch of compilation warnings
2017-03-08Remove uses of defpacustom in coq-compile-commonClément Pit--Claudel
This file is `require'-d from other places, at compile time. This doesn't work nicely with compilation by package.el (PG complains and says "defpacustom: Proof assistant setting compile-before-require re-defined!")
2017-03-08Fix incorrect uses of defvarClément Pit--Claudel
It didn't really matter that these variables were defined and set to nil during compilation, since we ran compilation in a clean Emacs in --batch mode; it does matter now, however, since package.el compiles PG in the user's currently running Emacs instance.
2017-01-18split emergency-cleanup to handle interrupts properly (fixes #143)Hendrik Tews
Split coq-par-emergency-cleanup into two functions, one for reacting on user interrupts and one for cleaning up after compilation errors.
2016-12-28properly reset the vio2vo delay timerHendrik Tews
cancel-timer does of course not set the variable that holds the timer to nil
2016-12-15die gracefully when visiting files in nonexisting directoriesHendrik Tews
2016-12-14fix generic interrupt procedure to interrupt parallel background compilationHendrik Tews
2016-12-14fix race in vio2vo compilation startHendrik Tews
2016-12-08option coq-compile-keep-going for parallel compilationHendrik Tews
With this option set, compilation continues after the first error to compile as much as possible and to potentially report more than one error.
2016-12-02remove ancestor hash in Coq parallel background compilationHendrik Tews
2016-11-30style change: use when for if coq-debug-auto-compilationHendrik Tews
2016-11-30use coq-- for internal compilation variablesHendrik Tews
2016-11-29delay vio2vo compilationHendrik Tews
... to make it less likely people run into the library inconsistency issue with vio2vo
2016-11-29don't unnecessarily delete .vio files for ensure-voHendrik Tews
If both .vio and .vo exists, coq loads the newer one. Therefore, for ensure-vo, don't delete up-to-date .vio files when the .vo is newer.
2016-11-29support vio2vo background processingHendrik Tews
Selecting quick-and-vio2vo will start vio2vo conversion in the background on a subset of the available cores, see `coq-max-background-vio2vo-percentage'. The vio2vo conversion starts after all compilation for the require command has been finished and the require has been processed. Because of a certain incompatibility between .vio and .vo files (see coq issue 5223) slowly single stepping through require commands does not work (but processing them as a batch does).
2016-11-22improve compilation when both .vio and .vo are up-to-dateHendrik Tews
In this case Coq loads the younger file and emits a warning if the .vio file is the younger one. With this patch, the dependency analysis for parallel compilation continues with the older value. The interesting case to look at is when b.v depends on a.v and both are compiled with -quick and later a parallel vio2vo produces a.vo and b.vo such that b.vo is older (because, eg. b.v is shorter than a.v). Without this patch a second auto compilation would recompile b.v, because the dependency a.vo is younger.
2016-11-17fix parallel compilation for the unlikely case of identical time stampsHendrik Tews
Since version 24.3 Emacs supports pico second precision in time stamps and Emacs on ext4 seems to have a time precision of 5 milliseconds for file time stamps. It is therefor quite unlikely that a source and an object file have the same time stamp. This patch fixes parallel compilation for these corner cases and adds a few hundred test cases to test all combinations where some files have identical time stamps. On Emacs older than 24.3 or on file systems with a low precision (eg. ext3) this patch can cause additional compilations.
2016-11-16first version for quick compilationHendrik Tews
Select "Quick compilation mode" in the Coq menu. See also documentation of coq-compile-quick, the and-vio2vo stuff is not yet there.
2016-11-10avoid leaving partial files behind when compilation failsHendrik Tews
2016-11-02fix #123, also improve debugging outputHendrik Tews
2016-10-28fix typo in last commitHendrik Tews
2016-10-27give a more helpful error message if Coq version detection failsHendrik Tews
- coq--pre-v85 signals coq-unclassifiable-version for "Invalid version" errors - background compilation converts this into an even more helpful message (fixes #70)
2016-10-27fix parallel compilation and improve assertions and debugging codeHendrik Tews
- fixes #92
2016-06-23Fix a typoClément Pit--Claudel
2016-06-23par-compile: Don't try to compile plugins (cm.*)Clément Pit--Claudel
2016-03-08Should fix #49 and #55 (compilation of From .. Require).Pierre Courtieu
2016-01-14Automatically detect which version of Coq we're usingClément Pit--Claudel
2016-01-14Refactor the project file parsing codeClément Pit--Claudel
2015-12-14Small refactoring of coqxxx args detection.Pierre Courtieu
Need some more refactoring actually: Some code from coq-compile-common became necessary to coq/pg globally. We shoudl refelct this by moving these parts somewhere else.
2015-11-17recompilation: Improve error checkingClément Pit--Claudel
Bug recipe: * Process some imports * Enable on the fly compilation * Kill coq process Error: Debugger entered--Lisp error: (wrong-type-argument hash-table-p nil) maphash((lambda (ancestor state) (if (eq state (quote locked)) (progn (coq-unlock-ancestor ancestor) (puthash ancestor nil coq-par-ancestor-files)))) nil) (progn (maphash (function (lambda (ancestor state) (if (eq state (quote locked)) (progn (coq-unlock-ancestor ancestor) (puthash ancestor nil coq-par-ancestor-files))))) coq-par-ancestor-files)) (if (or t coq-par-ancestor-files) (progn (maphash (function (lambda (ancestor state) (if (eq state (quote locked)) (progn (coq-unlock-ancestor ancestor) (puthash ancestor nil coq-par-ancestor-files))))) coq-par-ancestor-files))) coq-par-unlock-ancestors-on-error() coq-par-emergency-cleanup() run-hooks(proof-shell-signal-interrupt-hook) proof-shell-kill-function() kill-buffer(#<buffer *coq*>) proof-shell-exit(nil) funcall-interactively(proof-shell-exit nil) #<subr call-interactively>(proof-shell-exit nil nil) ad-Advice-call-interactively(#<subr call-interactively> proof-shell-exit nil nil) apply(ad-Advice-call-interactively #<subr call-interactively> (proof-shell-exit nil nil)) call-interactively(proof-shell-exit nil nil) command-execute(proof-shell-exit)
2013-07-11fix two bugs in parallel compilation for CoqHendrik Tews
2013-03-05fix overwriting the empty compilation queueHendrik Tews