You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
x = {{ The function {printLine} is pretty cool. }}
Then display x results in:
Attempted to use disallowed builtin in sandboxed environment: IO.stdHandle
Strangely, I tried it again and it worked, and now I can't repro anymore. Not sure what is going on.
Originally, I was thinking the issue is that the sandbox check isn't very smart. It's just checking if the transitive dependencies of x contain any forbidden functions. But why does it sometimes work then?
If it were that simple, some ideas for fixes:
Make the sandbox check smarter, distinguishing between transitive dependencies that are actually called as part of evaluation, vs dependencies which are unused / guarded. This seems like a static analysis that can be done accurately, though it makes me a bit nervous since we rely on these sandbox checks for Unison Cloud. Potentially this could be a separate function, used only for doc evaluation.
Have a way to run evaluation with all unsafe operations interpreted as calls to bug or throwing an exception.
Workaround for now is to use regular markdown style hyperlinks (relative paths should work) for linking to these
The text was updated successfully, but these errors were encountered:
Then
display x
results in:Strangely, I tried it again and it worked, and now I can't repro anymore. Not sure what is going on.
Originally, I was thinking the issue is that the sandbox check isn't very smart. It's just checking if the transitive dependencies of
x
contain any forbidden functions. But why does it sometimes work then?If it were that simple, some ideas for fixes:
bug
or throwing an exception.Workaround for now is to use regular markdown style hyperlinks (relative paths should work) for linking to these
The text was updated successfully, but these errors were encountered: