[racket] runtime-path + dynamic-require ?

From: Laurent (laurent.orseau at gmail.com)
Date: Fri Sep 10 11:06:54 EDT 2010

On Fri, Sep 10, 2010 at 16:43, Sam Tobin-Hochstadt <samth at ccs.neu.edu>wrote:

> On Fri, Sep 10, 2010 at 10:34 AM, Laurent <laurent.orseau at gmail.com>
> wrote:
> >
> > So now, how do I make things work with `dynamic-require' ?
> > Do all paths need to be defined as runtime-paths in my "splash.rkt",
> > to use only normal relative paths in dynamically required files?
> > Or can I get completely rid of runtime-path?
>
> I believe that you should add:
>
> (define-runtime-module-path name require-path)
>
> for each `require-path' that is `dynamic-require'd.  The docs are here:
>
> http://docs.racket-lang.org/reference/Filesystem.html?q=define-runtime#%28form._%28%28lib._racket/runtime-path..rkt%29._define-runtime-module-path%29%29
>
>
Ah thanks Sam, that is exactly what I needed!
I guess I read the docs too quickly... again.

If others are interested: All the other files that were previously defined
as runtime-paths (without the dynamic require) should remain so when
using dynamic-require. (maybe something like this could be added to the
docs.)

Strangely, it seems that everythings is launched faster with dynamic-require

than without it. But it is probably just an illusion.

Laurent
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20100910/88776140/attachment.html>

Posted on the users mailing list.