tweaks to drracket startup compilation code and added mention of PLTDRPAR to the docs
This commit is contained in:
parent
33db7b1229
commit
a142492833
|
@ -36,14 +36,12 @@
|
||||||
[debugging?
|
[debugging?
|
||||||
(flprintf "PLTDRDEBUG: loading CM to load/create errortrace zos\n")
|
(flprintf "PLTDRDEBUG: loading CM to load/create errortrace zos\n")
|
||||||
(let-values ([(zo-compile
|
(let-values ([(zo-compile
|
||||||
make-compilation-manager-load/use-compiled-handler
|
make-compilation-manager-load/use-compiled-handler)
|
||||||
manager-trace-handler)
|
|
||||||
(parameterize ([current-namespace (make-base-empty-namespace)]
|
(parameterize ([current-namespace (make-base-empty-namespace)]
|
||||||
[use-compiled-file-paths '()])
|
[use-compiled-file-paths '()])
|
||||||
(values
|
(values
|
||||||
(dynamic-require 'errortrace/zo-compile 'zo-compile)
|
(dynamic-require 'errortrace/zo-compile 'zo-compile)
|
||||||
(dynamic-require 'compiler/cm 'make-compilation-manager-load/use-compiled-handler)
|
(dynamic-require 'compiler/cm 'make-compilation-manager-load/use-compiled-handler)))])
|
||||||
(dynamic-require 'compiler/cm 'manager-trace-handler)))])
|
|
||||||
(flprintf "PLTDRDEBUG: installing CM to load/create errortrace zos\n")
|
(flprintf "PLTDRDEBUG: installing CM to load/create errortrace zos\n")
|
||||||
(current-compile zo-compile)
|
(current-compile zo-compile)
|
||||||
(use-compiled-file-paths (list (build-path "compiled" "errortrace")))
|
(use-compiled-file-paths (list (build-path "compiled" "errortrace")))
|
||||||
|
@ -55,12 +53,9 @@
|
||||||
(run-trace-thread)))]
|
(run-trace-thread)))]
|
||||||
[install-cm?
|
[install-cm?
|
||||||
(flprintf "PLTDRCM: loading compilation manager\n")
|
(flprintf "PLTDRCM: loading compilation manager\n")
|
||||||
(let-values ([(make-compilation-manager-load/use-compiled-handler
|
(let ([make-compilation-manager-load/use-compiled-handler
|
||||||
manager-trace-handler)
|
(parameterize ([current-namespace (make-base-empty-namespace)])
|
||||||
(parameterize ([current-namespace (make-base-empty-namespace)])
|
(dynamic-require 'compiler/cm 'make-compilation-manager-load/use-compiled-handler))])
|
||||||
(values
|
|
||||||
(dynamic-require 'compiler/cm 'make-compilation-manager-load/use-compiled-handler)
|
|
||||||
(dynamic-require 'compiler/cm 'manager-trace-handler)))])
|
|
||||||
(flprintf "PLTDRCM: installing compilation manager\n")
|
(flprintf "PLTDRCM: installing compilation manager\n")
|
||||||
(current-load/use-compiled (make-compilation-manager-load/use-compiled-handler))
|
(current-load/use-compiled (make-compilation-manager-load/use-compiled-handler))
|
||||||
(when cm-trace?
|
(when cm-trace?
|
||||||
|
@ -74,11 +69,9 @@
|
||||||
(filter
|
(filter
|
||||||
(λ (x) (regexp-match #rx"rkt$" (path->string x)))
|
(λ (x) (regexp-match #rx"rkt$" (path->string x)))
|
||||||
(directory-list dir))))
|
(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)])
|
(parameterize ([current-namespace (make-base-empty-namespace)])
|
||||||
(values
|
(dynamic-require 'compiler/cm 'make-compilation-manager-load/use-compiled-handler)))
|
||||||
(dynamic-require 'compiler/cm 'make-compilation-manager-load/use-compiled-handler)
|
|
||||||
(dynamic-require 'compiler/cm 'manager-trace-handler))))
|
|
||||||
(when cm-trace?
|
(when cm-trace?
|
||||||
(flprintf "PLTDRPAR: enabling CM tracing\n")
|
(flprintf "PLTDRPAR: enabling CM tracing\n")
|
||||||
(run-trace-thread))
|
(run-trace-thread))
|
||||||
|
@ -93,7 +86,7 @@
|
||||||
(case handler-type
|
(case handler-type
|
||||||
[(done) (void)]
|
[(done) (void)]
|
||||||
[else
|
[else
|
||||||
(printf "msg: ~s\n" msg)
|
(printf "~a\n" msg)
|
||||||
(printf "stdout from compiling ~a:\n~a\n" path out)
|
(printf "stdout from compiling ~a:\n~a\n" path out)
|
||||||
(flush-output)
|
(flush-output)
|
||||||
(fprintf (current-error-port) "stderr from compiling ~a:\n~a\n" path err)])))
|
(fprintf (current-error-port) "stderr from compiling ~a:\n~a\n" path err)])))
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#lang scribble/doc
|
#lang scribble/doc
|
||||||
@(require "common.ss"
|
@(require "common.ss"
|
||||||
(for-label compiler/cm
|
(for-label compiler/cm
|
||||||
|
setup/parallel-build
|
||||||
racket/promise))
|
racket/promise))
|
||||||
|
|
||||||
@title[#:tag "extending-drracket"]{Extending DrRacket}
|
@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
|
@item{@indexed-envvar{PLTDRCM} : When this environment variable is
|
||||||
set, DrRacket installs the compilation manager before starting
|
set, DrRacket installs the compilation manager before starting
|
||||||
up, which means that the @filepath{.zo} files are automatically
|
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
|
If the variable is set to @litchar{trace} then the files that are
|
||||||
manager's output is traced, using the
|
actually recompiled are shown.}
|
||||||
@racket[manager-trace-handler] procedure.}
|
|
||||||
|
@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
|
@item{@indexed-envvar{PLTDRDEBUG} : When this environment variable is
|
||||||
set, DrRacket starts up with errortrace enabled. If the
|
set, DrRacket starts up with errortrace enabled. If the
|
||||||
|
|
Loading…
Reference in New Issue
Block a user