File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed
Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change 121121
122122(defvar *current-mapped-source* nil )
123123
124+ (defun map-source (fun source)
125+ (let ((*current-mapped-source* (project-name source-file)))
126+ (with-simple-restart (skip " Skip ~A source" *current-mapped-source* )
127+ (funcall fun source))))
128+
124129(defun map-sources (fun)
125130 (with-simple-restart (abort " Give up entirely" )
126131 (dolist (source-file
127132 (directory #p " quicklisp-controller:projects;**;source.txt" ))
128- (let* ((project-name (pathname-project-name source-file))
129- (*current-mapped-source* project-name))
130- (with-simple-restart (skip " Skip ~A source" project-name)
131- (funcall fun (load-source-file project-name source-file)))))))
133+ (let ((project-name (pathname-project-name source-file)))
134+ (map-source fun (load-source-file project-name source-file))))))
132135
133136(defun pmap-sources (fun)
134137 (let ((dependency-tree (lparallel :make-ptree))
137140 (map-sources (lambda (source)
138141 (let ((host (source-host source)))
139142 (lparallel :ptree-fn i (gethash host host-dependency)
140- (lambda (&optional arg)
141- (declare (ignore arg))
142- ( funcall fun source))
143- dependency-tree)
143+ (lambda (&optional arg)
144+ (declare (ignore arg))
145+ (map-source fun source))
146+ dependency-tree)
144147 (setf (gethash host host-dependency) (list i))
145148 (incf i))))
146149 (lparallel :ptree-fn ' everything (loop for j below i collect j)
You can’t perform that action at this time.
0 commit comments