Yes, it's a bug in v6.1.1. I've just pushed a repair for the next build. Do you need a workaround for v6.1.1? Your variant that sets `sandbox-namespace-specs` is what I would have tried; unfortunately, that runs into a second bug in v6.1.1 that I recently fixed. If you need a workaround other than using the next snapshot, I can look harder for one.
Thanks for the report! At Mon, 26 Jan 2015 21:27:31 -0500, Nadeem Abdul Hamid wrote: > Ah, I am still struggling with this sandbox problem! (previous message to > 'users' below) I'm starting to feel like maybe there's a bug in 6.1.1, or > else something changed in recent versions that I'm missing. The following > screenshots show the entire contents of the BSL file that I'm trying to > load using make-module-evaluator, with gracket v6.1.1 failing the second > time you try to load the file (or another one) that contains a comment box, > while racket v6.1.1 and gracket 6.0 don't have this behavior: > > http://cs.berry.edu/~nhamid/temp/foo.png > http://cs.berry.edu/~nhamid/temp/foo60.png > > ??? > > --- nadeem > > > > ---------- Forwarded message ---------- > From: Nadeem Abdul Hamid <nad...@acm.org> > Date: Sun, Jan 25, 2015 at 10:35 PM > Subject: Sandbox evaluation problem - files with comment boxes > To: users <us...@racket-lang.org> > > > > I'm trying to create a simple sandbox evaluator (to load in programs in > *SL). I have the following code: > > #lang racket > (require racket/sandbox) > (define E > (parameterize ([sandbox-path-permissions > '([write "/var/folders"] > [exists "/"] > [read "/"])] > ) > (make-module-evaluator (string->path "test-file.rkt")))) > > > This works fine as long as test-file.rkt does *not* contain a comment box. > If the file contains a comment box, then the following error occurs: > > /Applications/Racket > v6.1.1/share/pkgs/snip-lib/racket/snip/private/load-one.rkt:21:2: > dynamic-require: unknown module > module name: #<resolved-module-path:"/Applications/Racket > v6.1.1/share/pkgs/gui-lib/framework/main.rkt"> > > > > I thought maybe parameterizing sandbox-namespace-specs with 'framework > might do something: > > (require racket/sandbox racket/gui) > (define E > (parameterize ([sandbox-path-permissions > '([write "/var/folders"] > [exists "/"] > [read "/"])] > [sandbox-namespace-specs > (list make-gui-namespace 'framework)] > ) > (make-module-evaluator (string->path "lab01-insulin.rkt")))) > > But it results in: > namespace-attach-module: a different instance of the same module is > already in the destination namespace > module name: "/Applications/Racket > v6.1.1/collects/racket/stxparam-exptime.rkt" > > > Any suggestions? > > Thanks! > > --- nadeem > _________________________ > Racket Developers list: > http://lists.racket-lang.org/dev _________________________ Racket Developers list: http://lists.racket-lang.org/dev