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
This commit is contained in:
parent
b5865f2f79
commit
f2c9297253
|
@ -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)))))
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user