Re: [racket-users] How to make a sandboxed evaluator in Scribble

2021-04-01 Thread David Storrs
On Thu, Apr 1, 2021 at 3:58 PM Sam Tobin-Hochstadt  wrote:
>
> You might use `(list 'value-evt)` if that's the require you want.
>
> Sam

...
Blarg.

Yes, thank you.  Should have realized.

>
> On Thu, Apr 1, 2021 at 3:41 PM David Storrs  wrote:
> >
> > I cargo-culted this chunk of code and, predictably, it is now failing
> > for reasons I don't understand.  This is in the value-evt scribble
> > file; it works fine when I build the file manually but it's failing in
> > the package server build:
> >
> > @(define eval
> >(call-with-trusted-sandbox-configuration
> > (lambda ()
> >   (parameterize ([sandbox-output 'string]
> >  [sandbox-error-output 'string]
> >  [sandbox-memory-limit 50])
> > [make-evaluator #:requires (list "main.rkt") 'racket]
> >
> > Clearly the issue is with 'main.rkt' as opposed to '../main.rkt'.  I
> > had that originally and it worked when I did 'scribble
> > value-evt.scrbl' while in the scribblings directory but it failed or
> > misgenerated the files when I was in a different directory or I used
> > raco setup.
> >
> > Weirdly, this is being reported as a failing test, which surprised me.
> > Why is that?
> >
> > What should I do instead?
> >
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "Racket Users" group.
> > To unsubscribe from this group and stop receiving emails from it, send an 
> > email to racket-users+unsubscr...@googlegroups.com.
> > To view this discussion on the web visit 
> > https://groups.google.com/d/msgid/racket-users/CAE8gKofQXNm%2Bsfkk-07NYZw0drQmw92oqJBZkyq5fQrGBWA9TQ%40mail.gmail.com.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CAE8gKoehaCTbR9iurUBRrGbRE%3DcsRsVpnApDJy8zzZ87dDdQbw%40mail.gmail.com.


Re: [racket-users] How to make a sandboxed evaluator in Scribble

2021-04-01 Thread Sam Tobin-Hochstadt
You might use `(list 'value-evt)` if that's the require you want.

Sam

On Thu, Apr 1, 2021 at 3:41 PM David Storrs  wrote:
>
> I cargo-culted this chunk of code and, predictably, it is now failing
> for reasons I don't understand.  This is in the value-evt scribble
> file; it works fine when I build the file manually but it's failing in
> the package server build:
>
> @(define eval
>(call-with-trusted-sandbox-configuration
> (lambda ()
>   (parameterize ([sandbox-output 'string]
>  [sandbox-error-output 'string]
>  [sandbox-memory-limit 50])
> [make-evaluator #:requires (list "main.rkt") 'racket]
>
> Clearly the issue is with 'main.rkt' as opposed to '../main.rkt'.  I
> had that originally and it worked when I did 'scribble
> value-evt.scrbl' while in the scribblings directory but it failed or
> misgenerated the files when I was in a different directory or I used
> raco setup.
>
> Weirdly, this is being reported as a failing test, which surprised me.
> Why is that?
>
> What should I do instead?
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to racket-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/racket-users/CAE8gKofQXNm%2Bsfkk-07NYZw0drQmw92oqJBZkyq5fQrGBWA9TQ%40mail.gmail.com.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CAK%3DHD%2BYSAdv%3Dv6n1msyrPQaovt7u%2BdzgmoB2HMo-GUMoXG8MOQ%40mail.gmail.com.


[racket-users] How to make a sandboxed evaluator in Scribble

2021-04-01 Thread David Storrs
I cargo-culted this chunk of code and, predictably, it is now failing
for reasons I don't understand.  This is in the value-evt scribble
file; it works fine when I build the file manually but it's failing in
the package server build:

@(define eval
   (call-with-trusted-sandbox-configuration
(lambda ()
  (parameterize ([sandbox-output 'string]
 [sandbox-error-output 'string]
 [sandbox-memory-limit 50])
[make-evaluator #:requires (list "main.rkt") 'racket]

Clearly the issue is with 'main.rkt' as opposed to '../main.rkt'.  I
had that originally and it worked when I did 'scribble
value-evt.scrbl' while in the scribblings directory but it failed or
misgenerated the files when I was in a different directory or I used
raco setup.

Weirdly, this is being reported as a failing test, which surprised me.
Why is that?

What should I do instead?

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CAE8gKofQXNm%2Bsfkk-07NYZw0drQmw92oqJBZkyq5fQrGBWA9TQ%40mail.gmail.com.