Following up my earlier post with more detail -- pardon the length, but I want 
to be sure of giving enough info to allow a useful answer:

I'm using Racket 5.3.1 on OS X and a fresh copy of the handin-server 
collection, recently downloaded from the Racket git repo (and configured with 
"raco setup -l handin-server"), and encountering two problems in my attempts to 
write a checker script:

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

-- 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")

If I comment out the (define e ...) line above, the handin runs as specified in 
the docs. Changing the evaluator's language makes no visible difference.

Having tried plenty of variations of checker file, server config.rktd file, and 
even client setup (which, I expect, is irrelevant), I don't know where else to 
look for the root problem.  Can anyone point out possible causes I might be 
missing, or fixes that might work?

I've been hesitant to file this as a bug report, figuring that there may be 
something I have misunderstood in the docs...but I'm now thinking it looks like 
there really is something amiss in the server.  I'd like to get that conjecture 
decided, of course.

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?

Regards,
Jordan


On Nov 13, 2012, at 9:55 PM, Jordan Johnson wrote:

> Hi all,
> 
> I am trying to set up the handin server -- spent some time at it last year, 
> but gave up as the school year was already underway with its pressing demands 
> -- and am getting this error when trying to hand in an assignment from a test 
> account:
> 
> ; --begin error message--
>       submit error: Error in your code -- namespace-attach-module: a 
> different module with the same name is already in the destination namespace 
> module name: "/usr/local/racket/collects/scheme/base.rkt"
> ; --end error message--
> 
> It happens even with a trivially simple checker file:
> 
> ;; sample checker.rkt file:
> #lang s-exp handin-server/checker
> 
> (check: :language '(special beginner)
> )
> ;; end checker.rkt
> 
> I've been trying valiantly to troubleshoot on my own, but I've given more 
> hours to the project than I can afford -- so, any suggestions where to look?
> 
> Thanks,
> jmj


____________________
  Racket Users list:
  http://lists.racket-lang.org/users

Reply via email to