[racket] using scribble's evaluator for planet packages

From: Eli Barzilay (eli at barzilay.org)
Date: Wed Jun 15 00:21:02 EDT 2011

About two weeks ago, Danny Yoo wrote:
> I survived in scribbling some documentation for a simple PLaneT
> package.  [...]
> It fails because the basic, default evaluator doesn't know about my
> PLaneT package's bindings.

Yes, this is a very-much-intended feature -- you don't want random
examples code to mess with your documentation.

> [...]
>     ../../../../gpfs/data/pro/plt-data/software/racket/5.1.1/std/collects/scribble/eval.rkt:126:11:
> string=?: expects type <string> as 2nd argument, given: #f; other
> arguments were: ""
> [...]
> Oh.  Ok, so I need to do something extra with the evaluator setup;
> it looks like I've forgotten to tell it to feed sandbox output and
> sandbox-error-output, as described in
> http://docs.racket-lang.org/scribble/eval.html.  Ok, let me try that
> next.

Yes, that seems like a bad uncaught error.  I made it catch that, and
throw an informative error, saying:

  format-output: missing output, possibly from a sandbox without a
  configured `sandbox-output'

I'm not happy with it -- the "format-output: ..." seems like it's too
easy to translate to "probably some internal bug, not my problem".

Any suggestions for a better message?

          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!

Posted on the users mailing list.