[plt-scheme] Specifying directory sandbox evalutes file requires relative to

From: Robby Findler (robby at cs.uchicago.edu)
Date: Fri Aug 29 17:04:26 EDT 2008

It does seem like something fishy is going on there, but why aren't you writing:

  (require "db.ss")



On Fri, Aug 29, 2008 at 3:37 PM, Noel Welsh <noelwelsh at gmail.com> wrote:
> Hello,
> I have a problem creating an interaction-environment with a require
> statement that uses a file require.  This is used for Scribble
> documentation, which lives in a sub-directory called scribblings.  The
> require statement requires a file in the same directory using a line
> like:
>  (file "db.ss")
> It works fine in testing, but when I come to build the package using
> "planet create" it seems that the require statement is resolved
> relative to the top level directory, so it breaks.  I can fix it:
>  (file "scribblings/db.ss")
> but now I get this really weird error message:
> WARNING: collected information for key multiple times: (exporting-libraries #f)
> "modcollapse.ss" broke the contract
>  (->
>   (or/c symbol? module-path-index?)
>   (or/c
>    ...etc...
>    path?))
> on collapse-module-path-index; expected <(or/c (and/c module-path?
> (or/c symbol? (cons/c (symbols (quote lib)) any/c) (cons/c (symbols
> (quote file)) any/c) (cons/c (symbols (quote planet)) any/c) (cons/c
> (symbols (quote quote)) any/c))) path?)>, given: (planet
> "../generic/connection.ss" ("untyped" "snooze.plt" 2))
> This require statement points outside the package!  It does not appear
> anywhere in my code, so I assume it is created in generating the
> Scribble docs.
> Any ideas?
> Thanks,
> Noel
> _________________________________________________
>  For list-related administrative tasks:
>  http://list.cs.brown.edu/mailman/listinfo/plt-scheme

Posted on the users mailing list.