[racket] handin server bugs? (was Re: handin server error)

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Mon Nov 19 10:26:00 EST 2012

At Sat, 17 Nov 2012 16:31:23 -0800, Jordan Johnson wrote:
> -- 1 --
> 
> Starting a checker file with "#lang handin-server/checker" (as the 
> handin-server/checker docs suggest) does not work; the log file indicates the 
> server is failing to load the checker, with this error:
> 
> standard-module-name-resolver: collection not found
> collection: "handin-server/checker/lang"
> 
> Using "#lang s-exp handin-server/checker" seems to work, but I can't tell if 
> there are other related problems that this fix is merely hiding.

I'm inclined to call that a documentation bug, but I will also make
`#lang handin-server/checker' work.

> -- 2 --
> 
> I can create and run checker files that define a trivial checker function 
> explicitly (i.e., without using the "check:" form from handin-server/checker), 
> but it appears that if I do anything that creates an evaluator -- be it using 
> make-evaluator/submission (or the other make-evaluator* functions, whether I'm 
> require'ing them from handin-server/sandbox or directly from racket/sandbox) or 
> using "check:" -- when the client attempts to hand in, I get an error from 
> namespace-attach-module, quoted below in my original message. For example, this 
> triggers the error:
> 
> 	#lang racket
> 
> 	(require racket/sandbox)
> 	(provide checker)
> 
> 	(define (checker users submission)
> 	  (define e (make-evaluator '(special beginner)))
> 	  "save-it-here.rkt")

I finally tracked this down to an assumption that `racket/base' was
reachable from `mred/private/mred' (which ceased to be true at some
point in the never-ending `scheme' to `racket' conversion) along with a
mismatch between `gui-require-dynamic' and its documentation. I've
pushed a repair to both of those problems.

I think we could work around the problem in v5.3.1, but it sounds like
you're using the latest via git to get the handin server, anyway.


> By the way, is it possible to write automated tests for a checker script that 
> uses #lang handin-server/checker -- as opposed to testing it interactively 
> using the client?

I'm pretty sure that I've `require'd the `checker' function from a
`handin-server/checker' module to call it directly, but I don't
remember the details.


Posted on the users mailing list.