tweaks to drracket startup compilation code and added mention of PLTDRPAR to the docs

This commit is contained in:
Robby Findler 2011-02-09 08:26:57 -06:00
parent 33db7b1229
commit a142492833
2 changed files with 22 additions and 19 deletions

View File

@ -36,14 +36,12 @@
[debugging?
(flprintf "PLTDRDEBUG: loading CM to load/create errortrace zos\n")
(let-values ([(zo-compile
make-compilation-manager-load/use-compiled-handler
manager-trace-handler)
make-compilation-manager-load/use-compiled-handler)
(parameterize ([current-namespace (make-base-empty-namespace)]
[use-compiled-file-paths '()])
(values
(dynamic-require 'errortrace/zo-compile 'zo-compile)
(dynamic-require 'compiler/cm 'make-compilation-manager-load/use-compiled-handler)
(dynamic-require 'compiler/cm 'manager-trace-handler)))])
(dynamic-require 'compiler/cm 'make-compilation-manager-load/use-compiled-handler)))])
(flprintf "PLTDRDEBUG: installing CM to load/create errortrace zos\n")
(current-compile zo-compile)
(use-compiled-file-paths (list (build-path "compiled" "errortrace")))
@ -55,12 +53,9 @@
(run-trace-thread)))]
[install-cm?
(flprintf "PLTDRCM: loading compilation manager\n")
(let-values ([(make-compilation-manager-load/use-compiled-handler
manager-trace-handler)
(parameterize ([current-namespace (make-base-empty-namespace)])
(values
(dynamic-require 'compiler/cm 'make-compilation-manager-load/use-compiled-handler)
(dynamic-require 'compiler/cm 'manager-trace-handler)))])
(let ([make-compilation-manager-load/use-compiled-handler
(parameterize ([current-namespace (make-base-empty-namespace)])
(dynamic-require 'compiler/cm 'make-compilation-manager-load/use-compiled-handler))])
(flprintf "PLTDRCM: installing compilation manager\n")
(current-load/use-compiled (make-compilation-manager-load/use-compiled-handler))
(when cm-trace?
@ -74,11 +69,9 @@
(filter
(λ (x) (regexp-match #rx"rkt$" (path->string x)))
(directory-list dir))))
(define-values (make-compilation-manager-load/use-compiled-handler manager-trace-handler)
(define make-compilation-manager-load/use-compiled-handler
(parameterize ([current-namespace (make-base-empty-namespace)])
(values
(dynamic-require 'compiler/cm 'make-compilation-manager-load/use-compiled-handler)
(dynamic-require 'compiler/cm 'manager-trace-handler))))
(dynamic-require 'compiler/cm 'make-compilation-manager-load/use-compiled-handler)))
(when cm-trace?
(flprintf "PLTDRPAR: enabling CM tracing\n")
(run-trace-thread))
@ -93,7 +86,7 @@
(case handler-type
[(done) (void)]
[else
(printf "msg: ~s\n" msg)
(printf "~a\n" msg)
(printf "stdout from compiling ~a:\n~a\n" path out)
(flush-output)
(fprintf (current-error-port) "stderr from compiling ~a:\n~a\n" path err)])))

View File

@ -1,6 +1,7 @@
#lang scribble/doc
@(require "common.ss"
(for-label compiler/cm
setup/parallel-build
racket/promise))
@title[#:tag "extending-drracket"]{Extending DrRacket}
@ -125,11 +126,20 @@ Several environment variables can affect DrRacket's behavior:
@item{@indexed-envvar{PLTDRCM} : When this environment variable is
set, DrRacket installs the compilation manager before starting
up, which means that the @filepath{.zo} files are automatically
kept up to date, as DrRacket's (or a tools) source is modified.
kept up to date, as DrRacket's (or a tool's) source is modified.
If the variable is set to @litchar{trace} then the compilation
manager's output is traced, using the
@racket[manager-trace-handler] procedure.}
If the variable is set to @litchar{trace} then the files that are
actually recompiled are shown.}
@item{@indexed-envvar{PLTDRPAR} : When this environment variable is
set, DrRacket uses @racket[parallel-compile-files] to compile
the framework and the drracket collections in parallel and then
installs the compilation manager before starting
up, which means that the @filepath{.zo} files are automatically
kept up to date, as DrRacket's (or a tool's) source is modified.
If the variable is set to @litchar{trace} then the files that are
actually recompiled are shown.}
@item{@indexed-envvar{PLTDRDEBUG} : When this environment variable is
set, DrRacket starts up with errortrace enabled. If the