diff --git a/pkgs/racket-test/tests/setup/parallel-build.rkt b/pkgs/racket-test/tests/setup/parallel-build.rkt index 5180429d59..73eddbf1a0 100644 --- a/pkgs/racket-test/tests/setup/parallel-build.rkt +++ b/pkgs/racket-test/tests/setup/parallel-build.rkt @@ -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) diff --git a/racket/collects/setup/parallel-build.rkt b/racket/collects/setup/parallel-build.rkt index 431f656fe4..411b87ec27 100644 --- a/racket/collects/setup/parallel-build.rkt +++ b/racket/collects/setup/parallel-build.rkt @@ -136,10 +136,9 @@ (define (retry) (get-job workerid)) (define (build-job cc file last) (values - (list cc file last) - (list (->bytes (cc-name cc)) - (dir->bytes (cc-path cc)) - (->bytes file) + (list cc file last) + (list (->bytes (cc-name cc)) + (->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"))]))