raco setup: avoid recompilation in parallel mode

The `parallel-lock-client` protocol expects a #f back when a
file was meanwhile compiled by another process. So, don't
just forget about a file after it is compiled, in case there
is still a lock request on the way for that file.
This commit is contained in:
Matthew Flatt 2018-11-23 18:12:16 -07:00
parent 4946196c91
commit 0bc010d972

View File

@ -38,6 +38,9 @@
(hash-set!
locks fn
(match v
['done
(wrkr/send wrkr (list 'compiled))
'done]
[(list w waitlst)
(hash-set! depends wrkr (cons w fn))
(let ([fns (check-cycles wrkr (hash) null)])
@ -57,7 +60,7 @@
(for ([x (second (hash-ref locks fn))])
(hash-remove! depends x)
(wrkr/send x (list 'compiled)))
(hash-remove! locks fn)]))
(hash-set! locks fn 'done)]))
(define/private (check-cycles w seen fns)
(cond
[(hash-ref seen w #f) fns]