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

From: Noel Welsh (noelwelsh at gmail.com)
Date: Fri Aug 29 16:37:11 EDT 2008


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

  (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?)
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?


Posted on the users mailing list.