[racket-dev] DrRacket, automatic compilation, and images in files

From: Sam Tobin-Hochstadt (samth at ccs.neu.edu)
Date: Wed Jan 16 10:37:58 EST 2013

In the first-year course that David and I are teaching, we use custom
languages specified with #lang, multiple files, DrRacket, and images
embedded in .rkt files.  Unfortunately, these features, which are all
great on their own, don't play nicely together.  As a result, I ended
up writing this course blog post:

  http://www.ccs.neu.edu/course/cs2510h/Blog.html#%28part._.Fixing_image_errors_in_.Dr.Racket%29

This happens only when the file in the definitions window `require`s a
file which has an embedded image, but it provides a totally
inscrutable error message.  We run into this more than we otherwise
would because we encourage students to put inline images in separate
files, since the WXME format is opaque and thus harder to
read/grade/diff/etc.

Would it be possible to either avoid this error altogether by simply
not trying to compile WXME-format files, or having DrRacket handle
this error behind the scenes, or even provide a more student-friendly
error message?  Any of these would be a significant help for us.

Sam

Posted on the dev mailing list.