From 5ada90bfd26568cbdd33989f0b51c61afe7b1bde Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sat, 15 Feb 2014 14:45:14 -0700 Subject: [PATCH] raco setup: fix the way that "stamp" is compiled for avoided files Instead of claiing "beginning of time" and an empty SHA1, use `file-stamp-in-paths` to get a proper stamp. This fixes a problem when installing built packages into user scope where the built packages refers to an installation-scope library and SHA1s need to be checked to fix up file timestamps. --- racket/collects/compiler/compiler.rkt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/racket/collects/compiler/compiler.rkt b/racket/collects/compiler/compiler.rkt index 9aa427eab8..001b9b573e 100644 --- a/racket/collects/compiler/compiler.rkt +++ b/racket/collects/compiler/compiler.rkt @@ -114,12 +114,18 @@ [manager-skip-file-handler (lambda (path) (and (pair? skip-paths) - (let ([b (path->bytes (simplify-path path #f))]) + (let* ([simp-path (simplify-path path #f)] + [b (path->bytes simp-path)]) (for/or ([skip-path (in-list skip-paths)]) (let ([len (bytes-length skip-path)]) (and ((bytes-length b) . > . len) (bytes=? (subbytes b 0 len) skip-path) - (cons -inf.0 "")))))))]) + (let-values ([(base name dir?) (split-path simp-path)]) + (or (and (path? base) + ;; Compute the stamp: + (file-stamp-in-paths simp-path (list base))) + ;; This shouldn't happen, but just in case: + (cons -inf.0 "")))))))))]) (let* ([sses (append ;; Find all .rkt/.ss/.scm files: (filter extract-base-filename/ss (directory-list))