raco setup: clean collections before compiling any
In case a collection "a" is composed from two places, and in case the first place has a bytecode file for "x.rkt" while only the second place has the source of "x.rkt" (probably it was recently moved), then `raco setup` should delete the sourceless bytecode so that any dependency on "x.rkt" will reference the right version.
This commit is contained in:
parent
2602ff530d
commit
9a7d046062
|
@ -899,9 +899,11 @@
|
||||||
[compile-notify-handler doing-path])
|
[compile-notify-handler doing-path])
|
||||||
(thunk)))))
|
(thunk)))))
|
||||||
|
|
||||||
(define (clean-cc cc dir info)
|
(define (clean-cc cc)
|
||||||
;; Clean up bad .zos:
|
;; Clean up bad .zos:
|
||||||
(unless (assume-virtual-sources? cc)
|
(unless (assume-virtual-sources? cc)
|
||||||
|
(define dir (cc-path cc))
|
||||||
|
(define info (cc-info cc))
|
||||||
(define roots
|
(define roots
|
||||||
;; If there's more than one relative root, then there will
|
;; If there's more than one relative root, then there will
|
||||||
;; be multiple ways to get to a ".zo" file, and our strategy
|
;; be multiple ways to get to a ".zo" file, and our strategy
|
||||||
|
@ -994,7 +996,6 @@
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(define dir (cc-path cc))
|
(define dir (cc-path cc))
|
||||||
(define info (cc-info cc))
|
(define info (cc-info cc))
|
||||||
(clean-cc cc dir info)
|
|
||||||
(compile-directory-zos dir info
|
(compile-directory-zos dir info
|
||||||
#:omit-root (cc-omit-root cc)
|
#:omit-root (cc-omit-root cc)
|
||||||
#:managed-compile-zo caching-managed-compile-zo
|
#:managed-compile-zo caching-managed-compile-zo
|
||||||
|
@ -1039,16 +1040,14 @@
|
||||||
(move-to 'end (list #rx"<pkgs>/drracket")
|
(move-to 'end (list #rx"<pkgs>/drracket")
|
||||||
(sort-collections-tree
|
(sort-collections-tree
|
||||||
(collection-tree-map top-level-plt-collects)))))
|
(collection-tree-map top-level-plt-collects)))))
|
||||||
(iterate-cct (lambda (cc)
|
(iterate-cct clean-cc cct)
|
||||||
(define dir (cc-path cc))
|
|
||||||
(define info (cc-info cc))
|
|
||||||
(clean-cc cc dir info))
|
|
||||||
cct)
|
|
||||||
(parallel-compile (parallel-workers) setup-fprintf handle-error cct)
|
(parallel-compile (parallel-workers) setup-fprintf handle-error cct)
|
||||||
(for/fold ([gcs 0]) ([cc planet-dirs-to-compile])
|
(for/fold ([gcs 0]) ([cc planet-dirs-to-compile])
|
||||||
(compile-cc cc gcs)))))
|
(compile-cc cc gcs)))))
|
||||||
(with-specified-mode
|
(with-specified-mode
|
||||||
(lambda ()
|
(lambda ()
|
||||||
|
(for ([cc ccs-to-compile])
|
||||||
|
(clean-cc cc))
|
||||||
(for/fold ([gcs 0]) ([cc ccs-to-compile])
|
(for/fold ([gcs 0]) ([cc ccs-to-compile])
|
||||||
(compile-cc cc gcs))))))
|
(compile-cc cc gcs))))))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user