[plt-scheme] reloading servlets and modules

From: Doug Orleans (dougo at ccs.neu.edu)
Date: Mon Dec 16 17:23:30 EST 2002

Doug Orleans writes:
 > I've tried re`load'ing the module file and requiring the module by
 > name, and this usually seems to work, but I'm a little wary of its
 > generality.

Well, for the record, I've already run into a problem with this:

subdir/foo.scm:
(module foo mzscheme
  (require "bar.scm")
  (display x) (newline))

subdir/bar.scm:
(module bar mzscheme
  (define x 1)
  (provide x))

> (require "subdir/foo.scm")
1
> (load "subdir/foo.scm")
> (require foo)
default-load-handler: cannot open input file: "/home/dougo/fred/scratch/bar.scm" (No such file or directory; errno=2)

I'm hesitant to call this a bug, since it's not really the intended
usage of loading modules, but it does sort of seem like `require'
should use the module directory (see that other thread...) for
relative path strings, rather than the runtime value of
`(current-load-relative-directory)' (or, in this case,
`(current-directory)') when the module is actually invoked.

--dougo at ccs.neu.edu


Posted on the users mailing list.