<span id="mailbox-conversation">How does this handle dynamic and lazy requires?</span><br><br><div class="gmail_quote"><p>On Sun, Apr 6, 2014 at 11:30 AM, Greg Hendershott <span dir="ltr"><<a href="mailto:greghendershott@gmail.com" target="_blank">greghendershott@gmail.com</a>></span> wrote:<br></p><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><p>For those following along at home, I just pushed to `experimental`
<br>branch an updated strategy:
<br><br>https://github.com/greghendershott/racket-mode/commit/0358c0248a062245c134c48053aed79298a71c3a
<br><br>"When racket/gui/base not already loaded, examine the user module we're
<br>about to load to see if it will require racket/gui/base. If so,
<br>dynamic-require racket/gui/base on our main custodian. Then switch to
<br>user custodian and dynamic-require the module as usual. That way, we can
<br>do a custodian-shutdown-all on the user custodian, while leaving intact
<br>the main eventspace defined by racket/gui/base."
<br><br><br>How to "examine the user module we're about to load to see if it will
<br>require racket/gui/base"? Following the example of how syntax/moddeps
<br>works, recursively exploring using module-compiled-imports. (And
<br>memoizing, since there can easily be hundreds of imports to explore.)
<br><br>In my limited set of tests, this works as-desired. Of course there
<br>might be big holes in it I don't yet know about.
<br>____________________
<br> Racket Users list:
<br> http://lists.racket-lang.org/users
<br></p></blockquote></div><br>