raco setup: allow dependency checking to continue after error
When reading a bytecode file fails, record the error and continue.
This commit is contained in:
parent
e46e791724
commit
17e5a56569
|
@ -28,7 +28,7 @@
|
||||||
coll-paths
|
coll-paths
|
||||||
coll-main?s
|
coll-main?s
|
||||||
coll-modes
|
coll-modes
|
||||||
setup-printf setup-fprintf
|
setup-printf setup-fprintf report-error
|
||||||
check-unused? fix? verbose?
|
check-unused? fix? verbose?
|
||||||
all-pkgs-lazily?
|
all-pkgs-lazily?
|
||||||
must-declare-deps?)
|
must-declare-deps?)
|
||||||
|
@ -369,12 +369,16 @@
|
||||||
(append (map path-element->string coll-path) (list base))
|
(append (map path-element->string coll-path) (list base))
|
||||||
"/")))
|
"/")))
|
||||||
(define zo-path (build-path dir zo-f))
|
(define zo-path (build-path dir zo-f))
|
||||||
(define mod-code (call-with-input-file*
|
(let/ec esc
|
||||||
|
(define mod-code (with-handlers ([exn:fail? (lambda (exn)
|
||||||
|
(report-error exn)
|
||||||
|
(esc (void)))])
|
||||||
|
(call-with-input-file*
|
||||||
zo-path
|
zo-path
|
||||||
(lambda (i)
|
(lambda (i)
|
||||||
(parameterize ([read-accept-compiled #t]
|
(parameterize ([read-accept-compiled #t]
|
||||||
[read-on-demand-source zo-path])
|
[read-on-demand-source zo-path])
|
||||||
(read i)))))
|
(read i))))))
|
||||||
;; Recur to cover submodules:
|
;; Recur to cover submodules:
|
||||||
(let loop ([mod-code mod-code])
|
(let loop ([mod-code mod-code])
|
||||||
(define name (module-compiled-name mod-code))
|
(define name (module-compiled-name mod-code))
|
||||||
|
@ -394,7 +398,7 @@
|
||||||
(for-each loop
|
(for-each loop
|
||||||
(append
|
(append
|
||||||
(module-compiled-submodules mod-code #t)
|
(module-compiled-submodules mod-code #t)
|
||||||
(module-compiled-submodules mod-code #f)))))))
|
(module-compiled-submodules mod-code #f))))))))
|
||||||
|
|
||||||
;; ----------------------------------------
|
;; ----------------------------------------
|
||||||
(define (find-compiled-directories path)
|
(define (find-compiled-directories path)
|
||||||
|
|
|
@ -2034,6 +2034,9 @@
|
||||||
'build
|
'build
|
||||||
'run))))
|
'run))))
|
||||||
setup-printf setup-fprintf
|
setup-printf setup-fprintf
|
||||||
|
(lambda (exn)
|
||||||
|
(set! exit-code 1)
|
||||||
|
(setup-printf #f "check failure: ~a" (exn->string exn)))
|
||||||
(check-unused-dependencies)
|
(check-unused-dependencies)
|
||||||
(fix-dependencies)
|
(fix-dependencies)
|
||||||
(verbose)
|
(verbose)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user