Make parallel-build send the whole filename to the worker.
Closes PR 15000.
This commit is contained in:
parent
06634b74d5
commit
4e3a7c420a
|
@ -10,4 +10,5 @@
|
|||
|
||||
(define temporary-directory (make-temporary-file "parallel-build~a" 'directory))
|
||||
(check-false (parallel-compile-files (list temporary-directory)))
|
||||
(check-false (parallel-compile-files (list (build-path temporary-directory "new-directory" ".."))))
|
||||
(delete-directory/files temporary-directory)
|
||||
|
|
|
@ -138,8 +138,7 @@
|
|||
(values
|
||||
(list cc file last)
|
||||
(list (->bytes (cc-name cc))
|
||||
(dir->bytes (cc-path cc))
|
||||
(->bytes file)
|
||||
(->bytes (build-path (cc-path cc) file))
|
||||
options)))
|
||||
(match cc
|
||||
[(list)
|
||||
|
@ -251,8 +250,8 @@
|
|||
(define-values (dir file b) (split-path hd))
|
||||
(set! filelist tail)
|
||||
(handler workerid 'start hd "" "" "")
|
||||
(values hd (list (->bytes hd) (dir->bytes dir) (->bytes file) null))]
|
||||
[(list) null]))
|
||||
(values hd (list (->bytes hd) (->bytes hd) null))]))
|
||||
|
||||
(define/public (has-jobs?) (not (null? filelist)))
|
||||
(define/public (jobs-cnt) (length filelist))
|
||||
(define/public (get-results) results)
|
||||
|
@ -274,10 +273,10 @@
|
|||
|
||||
(define cmc (make-caching-managed-compile-zo))
|
||||
(match-message-loop
|
||||
[(list name _dir _file options)
|
||||
(DEBUG_COMM (eprintf "COMPILING ~a ~a ~a ~a\n" worker-id name _file _dir))
|
||||
(define dir (bytes->path _dir))
|
||||
(define file (bytes->path _file))
|
||||
[(list name _full-file options)
|
||||
(DEBUG_COMM (eprintf "COMPILING ~a ~a ~a\n" worker-id name _full-file))
|
||||
(define full-file (bytes->path _full-file))
|
||||
(define-values (dir file _) (split-path full-file))
|
||||
(define out-str-port (open-output-string))
|
||||
(define err-str-port (open-output-string))
|
||||
(define cip (current-input-port))
|
||||
|
@ -291,7 +290,7 @@
|
|||
(define (lock-client cmd fn)
|
||||
(match cmd
|
||||
['lock
|
||||
(DEBUG_COMM (eprintf "REQUESTING LOCK ~a ~a ~a ~a\n" worker-id name _file _dir))
|
||||
(DEBUG_COMM (eprintf "REQUESTING LOCK ~a ~a ~a\n" worker-id name _full-file))
|
||||
(match (send/recv (list (list 'LOCK (path->bytes fn)) "" ""))
|
||||
[(list 'locked) #t]
|
||||
[(list 'compiled) #f]
|
||||
|
@ -299,7 +298,7 @@
|
|||
[x (send/error (format "DIDNT MATCH B ~v\n" x))]
|
||||
[else (send/error (format "DIDNT MATCH B\n"))])]
|
||||
['unlock
|
||||
(DEBUG_COMM (eprintf "UNLOCKING ~a ~a ~a ~a\n" worker-id name _file _dir))
|
||||
(DEBUG_COMM (eprintf "UNLOCKING ~a ~a ~a\n" worker-id name _full-file))
|
||||
(send/msg (list (list 'UNLOCK (path->bytes fn)) "" ""))]
|
||||
[x (send/error (format "DIDNT MATCH C ~v\n" x))]
|
||||
[else (send/error (format "DIDNT MATCH C\n"))]))
|
||||
|
|
Loading…
Reference in New Issue
Block a user