From 25adab8cbb90902480f1c1657829006803e6843e Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Mon, 14 Feb 2011 10:22:21 -0600 Subject: [PATCH] This is a change to paper over a bug elsewhere in the system that threatens the release. Specifically, when there is an error in the namespace require (say if one of the teachpack files gets corrupted (because you use a script that monkeys around in the installation, say, and things go wrong)) then the first-opened method does not return normally, but raises an exception. This, so far, is not a problem, but it appears that there is a bug in the implementation of the drracket repl io ports that causes them to deadlock when flushing the error port under certain conditions (I'm not sure what is really going on with this bug, but I am observing a call to flush that fails to return) and the error-display-handler for the teaching languages flushes the output port. This change just avoids printing the error and so the error display handler is not called in the fragile state. This change goes back to exactly what was happening in 5.0.2, at least as far as the teaching language's first-opened method is concerned. So, if this seems okay, I'd like to suggest it be included in the release. --- collects/lang/htdp-langs.rkt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/collects/lang/htdp-langs.rkt b/collects/lang/htdp-langs.rkt index 719712085f..5dfa39c10c 100644 --- a/collects/lang/htdp-langs.rkt +++ b/collects/lang/htdp-langs.rkt @@ -439,7 +439,8 @@ (define/override (first-opened settings) (for ([tp (in-list (htdp-lang-settings-teachpacks settings))]) - (namespace-require/constant tp))) + (with-handlers ((exn:fail? void)) + (namespace-require/constant tp)))) (inherit get-module get-transformer-module get-init-code use-namespace-require/copy?)