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

From: Jordan Johnson (jmj at fellowhuman.com)
Date: Tue Nov 20 03:47:29 EST 2012

Many thanks for the response, Matthew.  When I realized (after posting) that v5.3 changed the server's behavior, I just started running the server under the 5.2 installation I still had on my Mac, but I will pull down the new version with your fixes sometime soon, so thanks a bunch!

Working with the handin server has been teaching me plenty about eval, the sandbox, namespaces, and various other bits of Racket functionality, btw.  Fun stuff, in spite of the occasional frustrations.

Best,
Jordan

On Nov 19, 2012, at 7:26 AM, Matthew Flatt <mflatt at cs.utah.edu> wrote:

> 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.