raco setup: allow catching cycle errors

In parallel build mode, if attempting to compile a file triggers a
cycle error that is caught and discarded, don't leave behind a
dependency (that is effectively resolved by the error) in the
parallel-worker manager.
This commit is contained in:
Matthew Flatt 2019-03-05 20:24:02 -07:00
parent 01edfbbfcf
commit 828dc1f276

View File

@ -41,13 +41,13 @@
(wrkr/send wrkr (list 'compiled))
'done]
[(list w waitlst)
(hash-set! depends wrkr (cons w fn))
(let ([fns (check-cycles wrkr (hash) null)])
(let ([fns (check-cycles w (hasheq wrkr #t) null)])
(cond
[fns
(wrkr/send wrkr (list 'cycle (cons fn fns)))
v]
[else
(hash-set! depends wrkr (cons w fn))
(list w (append waitlst (list wrkr)))]))]
[else
(wrkr/send wrkr (list 'locked))