[plt-scheme] On-demand module reloading

From: YC (yinso.chen at gmail.com)
Date: Fri Jul 3 15:13:04 EDT 2009

On Fri, Jul 3, 2009 at 2:21 AM, Noel Welsh <noelwelsh at gmail.com> wrote:

> Hello,
> It would be a big productivity boost for certain applications to have
> on demand module loading. This means something like scheme/enter: scan
> the filesystem and reload any modules that have changed since the last
> time the code was run.
> Is there any downside to just using scheme/enter? Scanning the code,
> it seems the use of [compile-enforce-module-constants #f] will slow
> things down. I can't see any other downside, and it should be possible
> to get around this by loading the code into a new namespace each time.

IIRC, scheme/enter works at the top-level and "enters" into the namespace of
the module you are loading.  My guess is that you are looking for something
similar to what I asked about in the following thread:


I implemented a mechanism call dyn-require that mimics dynamic-require,
which checks whether the module had changed and reload if necessary.

The basic idea is to replace

(dynamic-require <module> 'symbol)


(dyn-require <module> 'symbol)

This doesn't handle dependency reloading (I thought about it but it seems to
open a can of worms so I didn't go down that route) and can share
dependencies as well (to ensure the depended structs are the same ones).

If this sounds like what you are looking for - let me know and I'll send you
the code.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20090703/4e4b549d/attachment.html>

Posted on the users mailing list.