bkyk8rc3zvpnsf5inmcqq4n3k98cv6hj-my-site-hyper-literate-git.test.suzanne.soy-0.0.1

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit f2c9297253c11cfb8fb406178850ec5e468eb2db
parent b5865f2f7958f7b4639b2672ea398b4c1316c250
Author: Matthew Flatt <mflatt@racket-lang.org>
Date:   Wed, 21 Nov 2012 16:15:17 -0700

raco setup: move doc dependency and duplicate checking to database

This change makes document building --- and specially incremental
document building --- more scalable. The global duplicate-definition
check is handled by a database query, for example.

original commit: 9888fac99e32131a6e848f30c40024abb893a9b9

Diffstat:
Mcollects/scribble/base.rkt | 5++++-
Mcollects/scribble/xref.rkt | 22++++++++++++----------
2 files changed, 16 insertions(+), 11 deletions(-)

diff --git a/collects/scribble/base.rkt b/collects/scribble/base.rkt @@ -746,7 +746,10 @@ (let ([parent (collected-info-parent (part-collected-info sec ri))]) (if parent (collected-info-info (part-collected-info parent ri)) - (collect-info-ext-ht (resolve-info-ci ri)))) + (let ([ci (resolve-info-ci ri)]) + ;; Force all xref info: + ((collect-info-ext-demand ci) #f ci) + (collect-info-ext-ht ci)))) (lambda (k v) (when (and (pair? k) (eq? 'index-entry (car k))) (set! l (cons (cons (cadr k) v) l))))) diff --git a/collects/scribble/xref.rkt b/collects/scribble/xref.rkt @@ -42,8 +42,9 @@ [load-source (lambda (src ci) (parameterize ([current-namespace (namespace-anchor->empty-namespace here)]) - (let ([v (src)]) - (when v (send renderer deserialize-info v ci #:root root-path)))))] + (let ([vs (src)]) + (for ([v (in-list (if (procedure? vs) (vs) (list vs)))]) + (when v (send renderer deserialize-info v ci #:root root-path))))))] [ci (send renderer collect null null fp (lambda (key ci) (define src (demand-source key)) @@ -57,14 +58,15 @@ ;; Xref reading (define (xref-index xrefs) - (filter - values - (hash-map - (collect-info-ext-ht (resolve-info-ci (xrefs-ri xrefs))) - (lambda (k v) - (and (pair? k) - (eq? (car k) 'index-entry) - (make-entry (car v) (cadr v) (cadr k) (caddr v))))))) + (define ci (resolve-info-ci (xrefs-ri xrefs))) + ;; Force all xref info: + ((collect-info-ext-demand ci) #f ci) + ;; look for `index-entry' keys: + (for/list ([(k v) (in-hash (collect-info-ext-ht ci))] + #:when + (and (pair? k) + (eq? (car k) 'index-entry))) + (make-entry (car v) (cadr v) (cadr k) (caddr v)))) ;; dest-file can be #f, which will make it return a string holding the ;; resulting html