From 35a8359c6dc85867dd7f143ee49646fc5e2760f0 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Tue, 30 Aug 2011 13:18:05 -0600 Subject: [PATCH] remove some path case normalization The change allows `raco setup' to reach a fixed point under Windows for "redex/examples/cont-mark-transform". I'm more and more convinced that `normal-case-path' is never a good idea. In some cases, maybe it's good to recognize a few extra equivalences, but it works badly when paths are taken from many sources and are not consistently normalized. It's better to just preserve case. For basic normalization, `simplify-path' is the right choice. Use inode identity (as `raco setup' does) when anything stronger than `simplify-path' is needed. --- collects/setup/path-relativize.rkt | 3 +-- collects/setup/setup-unit.rkt | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/collects/setup/path-relativize.rkt b/collects/setup/path-relativize.rkt index 90ed58c550..22402be0d4 100644 --- a/collects/setup/path-relativize.rkt +++ b/collects/setup/path-relativize.rkt @@ -20,8 +20,7 @@ ;; tree, so we explode the paths. This is slower than the old way ;; (by a factor of 2 or so), but it's simpler and more portable. (define (explode-path path) - (let loop ([path (simplify-path - (normal-case-path (path->complete-path path)))] + (let loop ([path (simplify-path (path->complete-path path))] [rest null]) (let-values ([(base name dir?) (split-path path)]) (if (path? base) diff --git a/collects/setup/setup-unit.rkt b/collects/setup/setup-unit.rkt index a67ffe4d19..4a5cefbb42 100644 --- a/collects/setup/setup-unit.rkt +++ b/collects/setup/setup-unit.rkt @@ -656,7 +656,7 @@ [dir-table (make-hash)] [doing-path (lambda (path) (unless (verbose) - (let ([path (normal-case-path (path-only path))]) + (let ([path (path-only path)]) (unless (hash-ref dir-table path #f) (hash-set! dir-table path #t) (print-verbose oop path)))))])