aboutsummaryrefslogtreecommitdiffhomepage
path: root/coq/coq-par-compile.el
diff options
context:
space:
mode:
authorGravatar Clément Pit--Claudel <clement.pitclaudel@live.com>2015-11-17 23:25:23 -0500
committerGravatar Clément Pit--Claudel <clement.pitclaudel@live.com>2015-11-17 23:29:27 -0500
commit7155ac935ea4c5cd9bc00cb1382649abdc776f4c (patch)
tree877b90282f63a4ce5829f80dd1a8ee7777bc14d5 /coq/coq-par-compile.el
parent72f6fbe94fd3a90646c757cf5a76cfae50ac96bc (diff)
recompilation: Improve error checking
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)
Diffstat (limited to 'coq/coq-par-compile.el')
-rw-r--r--coq/coq-par-compile.el14
1 files changed, 8 insertions, 6 deletions
diff --git a/coq/coq-par-compile.el b/coq/coq-par-compile.el
index 915fe3ed..f469b4df 100644
--- a/coq/coq-par-compile.el
+++ b/coq/coq-par-compile.el
@@ -612,12 +612,14 @@ function returns () if MODULE-ID comes from the standard library."
(defun coq-par-unlock-ancestors-on-error ()
"Unlock ancestors which are not in an asserted span.
Used for unlocking ancestors on compilation errors."
- (maphash
- (lambda (ancestor state)
- (when (eq state 'locked)
- (coq-unlock-ancestor ancestor)
- (puthash ancestor nil coq-par-ancestor-files)))
- coq-par-ancestor-files))
+ (when coq-par-ancestor-files
+ ;; nil e.g. when enabling on-the-fly compilation after processing imports.
+ (maphash
+ (lambda (ancestor state)
+ (when (eq state 'locked)
+ (coq-unlock-ancestor ancestor)
+ (puthash ancestor nil coq-par-ancestor-files)))
+ coq-par-ancestor-files)))
(defun coq-par-emergency-cleanup ()
"Emergency cleanup for parallel background compilation.