From 5ad11c85e67318c36b4c8e070daa9f81f37f28c5 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Tue, 27 May 2014 08:30:24 +0100 Subject: [PATCH] raco {make,decompile}: fix bytecode path calculation Use `compiler/compilation-path` to take into account PLTCOMPILEDROOTS, etc. Closes PR 14525 --- .../compiler-lib/compiler/commands/decompile.rkt | 3 ++- .../compiler-lib/compiler/commands/make.rkt | 13 +++++-------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/pkgs/compiler-pkgs/compiler-lib/compiler/commands/decompile.rkt b/pkgs/compiler-pkgs/compiler-lib/compiler/commands/decompile.rkt index 57b7f55af0..fd6a2a4261 100644 --- a/pkgs/compiler-pkgs/compiler-lib/compiler/commands/decompile.rkt +++ b/pkgs/compiler-pkgs/compiler-lib/compiler/commands/decompile.rkt @@ -3,6 +3,7 @@ raco/command-name compiler/zo-parse compiler/decompile + compiler/compilation-path racket/pretty racket/format) @@ -75,7 +76,7 @@ (for ([zo-file source-files]) (let ([zo-file (path->complete-path zo-file)]) (let-values ([(base name dir?) (split-path zo-file)]) - (let ([alt-file (build-path base "compiled" (path-add-suffix name #".zo"))]) + (let ([alt-file (get-compilation-bytecode-file zo-file)]) (check-files zo-file alt-file) (parameterize ([current-load-relative-directory base] [print-graph #t]) diff --git a/pkgs/compiler-pkgs/compiler-lib/compiler/commands/make.rkt b/pkgs/compiler-pkgs/compiler-lib/compiler/commands/make.rkt index 15c8d7bd4b..2724b49057 100644 --- a/pkgs/compiler-pkgs/compiler-lib/compiler/commands/make.rkt +++ b/pkgs/compiler-pkgs/compiler-lib/compiler/commands/make.rkt @@ -3,6 +3,7 @@ raco/command-name compiler/cm compiler/compiler + compiler/compilation-path dynext/file setup/parallel-build setup/path-to-relative @@ -89,14 +90,10 @@ [compile-enforce-module-constants (not (disable-const))]) (managed-compile-zo file)) - (let ([dest (append-zo-suffix - (let-values ([(base name dir?) (split-path file)]) - (build-path (if (symbol? base) 'same base) - "compiled" name)))]) - (when (verbose) - (printf " [~a \"~a\"]\n" - (if did-one? "output to" "already up-to-date at") - dest)))))))] + (when (verbose) + (printf " [~a \"~a\"]\n" + (if did-one? "output to" "already up-to-date at") + (get-compilation-bytecode-file file)))))))] ;; Parallel make: [else (define path-cache (make-hash))