[plt-scheme] Re: Using planet packages with the Handin server?

From: John Clements (clements at brinckerhoff.org)
Date: Tue Sep 22 15:23:56 EDT 2009

On Sep 21, 2009, at 2:52 PM, John Clements wrote:

>
> Well, I'm coming back to this five months later, because PLAI is now  
> a planet package, which means that my inability to refer to planet  
> packages in the handin server now means that I can't make the handin  
> server work with PLAI at all.
>
> Specifically, I'm hoping that you or someone else with additional  
> namespace-fu can help me with the necessary plumbing to implement  
> your suggestion.  Alternatively, since (IIRC) you are use PLAI  
> yourself, perhaps you've already extended the handin server to work  
> with planet packages in a way that's not already obvious to me.

Per a phone conversation with Eli, it appears that the key to making  
this work in a nice way is to give "read" and "read-bytecode"  
privileges to the planet directory, using 'sandbox-path-permissions'.

This works:

#lang scheme

(require scheme/sandbox)

(sandbox-path-permissions `((read-bytecode ,(string->path "/Users/ 
clements/Library/PLT Scheme/"))
                             (read ,(string->path "/"))))

((make-evaluator '(planet plai/plai) '(test (+ 3 4) 8)) 13)


... but I have to say, I was a bit alarmed by the requirement of going  
all the way up to the *root* in the "read" permissions.  That is,  
without this clause (or with a version of the clause that specifies my  
planet directory) I get the error:

cleanse-path: `exists' access denied for ../../../collects

... which befuddles me.

John

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2484 bytes
Desc: not available
URL: <http://lists.racket-lang.org/users/archive/attachments/20090922/9dbe34e3/attachment.p7s>

Posted on the users mailing list.