check-require: fix submod-related bugs

This commit is contained in:
Ryan Culpepper 2014-10-30 02:58:56 -04:00
parent 73f4fa86a3
commit a02beaa821
2 changed files with 11 additions and 2 deletions

View File

@ -90,4 +90,7 @@
[(list 'file part)
(ok? part)]
[(list 'planet part ...)
#t])))
#t]
[(list* 'submod base _)
;; Never bypass to submodules
#f])))

View File

@ -140,7 +140,13 @@
;; FIXME: cache tables
(define (mod->bypass-table mod)
(define table (make-hash))
(let ([prov (get-module-all-exports mod)])
(let/ec escape
(define prov
;; FIXME: hack around mis-resolution of mpis in case of submodules
;; by just bailing out; should just result in missed bypass opportunities
(with-handlers ([(lambda (e) #t)
(lambda (e) (escape (void)))])
(get-module-all-exports mod)))
(for* ([phase+exps (in-list prov)]
#:when (car phase+exps) ;; Skip for-label provides
[name+srcs (in-list (cdr phase+exps))]