From 1032bb867bc21ad473520d17687bf9c03c8b26f4 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Fri, 2 May 2008 13:21:03 +0000 Subject: [PATCH] when searching for docs, follow module chains only through .zo, and bail out when files are unavailable or inconsistent svn: r9589 original commit: 119c09a27e47c0a85d87c3f04688d48381469518 --- collects/scribble/search.ss | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/collects/scribble/search.ss b/collects/scribble/search.ss index 7628b11e..dd6df55f 100644 --- a/collects/scribble/search.ss +++ b/collects/scribble/search.ss @@ -123,8 +123,12 @@ rmp (lambda () (let-values ([(valss stxess) - (module-compiled-exports - (get-module-code (resolved-module-path-name rmp)))]) + (with-handlers ([exn:fail? + (lambda (exn) + (values null null))]) + (module-compiled-exports + (get-module-code (resolved-module-path-name rmp) + #:choose (lambda (src zo so) 'zo))))]) (let ([t ;; Merge the two association lists: (let loop ([base valss] @@ -164,8 +168,14 @@ 0))) (cadr a)) rqueue)) - (error 'find-scheme-tag - "dead end when looking for binding source: ~e" - id)))) + (begin + ;; A dead end may not be our fault: the files could + ;; have changed in inconsistent ways. So just say #f + ;; for now. + #; + (error 'find-scheme-tag + "dead end when looking for binding source: ~e" + id) + #f)))) ;; Can't get the module source, so continue with queue: (loop queue rqueue)))))))])))))))