raco setup: defend against bad scribblings in "info.rkt"

Closes #1142
This commit is contained in:
Matthew Flatt 2016-02-18 13:45:53 -07:00
parent 6a78beecdf
commit 1005701b8e

View File

@ -558,8 +558,15 @@
(not (eq? omit 'all))) (not (eq? omit 'all)))
(filter (lambda (p) (not (member p omit))) (filter (lambda (p) (not (member p omit)))
(map (lambda (s) (if (string? s) (string->path s) s)) (map (lambda (s) (if (string? s) (string->path s) s))
(map car (call-info info 'scribblings (map car
(lambda () null) (lambda (x) #f))))) (let ([v (call-info info 'scribblings (lambda () null) void)])
;; Ignore ill-formed 'scribblings entries at this level:
(if (list? v)
(for/list ([i (in-list v)]
#:when (and (pair? i)
(string? i)))
i)
null)))))
null) null)
(map (lambda (s) (if (string? s) (string->path s) s)) (map (lambda (s) (if (string? s) (string->path s) s))
(call-info info 'compile-include-files (lambda () null) void)))) (call-info info 'compile-include-files (lambda () null) void))))