From dc007a85024a1d56c415f87e326c67252aff1eb4 Mon Sep 17 00:00:00 2001 From: Alexis King Date: Thu, 18 Jun 2020 03:36:47 -0500 Subject: [PATCH] =?UTF-8?q?setup:=20Don=E2=80=99t=20count=20main=20docs=20?= =?UTF-8?q?as=20user=20docs=20when=20tidying?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/racket-index/setup/scribble.rkt | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/pkgs/racket-index/setup/scribble.rkt b/pkgs/racket-index/setup/scribble.rkt index 0a4713ff85..d8bb21a380 100644 --- a/pkgs/racket-index/setup/scribble.rkt +++ b/pkgs/racket-index/setup/scribble.rkt @@ -412,23 +412,22 @@ (not latex-dest) infos) (log-setup-info "tidying database") - (define files (make-hash)) (define tidy-docs (if tidy? docs (map info-doc infos))) - (define (get-files! main?) + (define (get-files main?) + (define files (make-hash)) (for ([doc (in-list tidy-docs)] #:when (eq? main? (main-doc? doc))) (hash-set! files (sxref-path latex-dest doc "in.sxref") #t) (for ([c (in-range (add1 (doc-out-count doc)))]) - (hash-set! files (sxref-path latex-dest doc (format "out~a.sxref" c)) #t)))) + (hash-set! files (sxref-path latex-dest doc (format "out~a.sxref" c)) #t))) + files) (unless avoid-main? - (get-files! #t) - (doc-db-clean-files main-db files)) + (doc-db-clean-files main-db (get-files #t))) (when (and (file-exists? user-db) (not (equal? main-db user-db))) - (get-files! #f) - (doc-db-clean-files user-db files)))) + (doc-db-clean-files user-db (get-files #f))))) (define (make-loop first? iter) (let ([infos (filter-not info-failed? infos)]