Skip to content

Scala 3 ScriptEngine not supporting bindings or attributes #14262

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
subes opened this issue Jan 12, 2022 · 1 comment
Open

Scala 3 ScriptEngine not supporting bindings or attributes #14262

subes opened this issue Jan 12, 2022 · 1 comment

Comments

@subes
Copy link

subes commented Jan 12, 2022

This hello world example works fine in Scala 2:
https://github.com/invesdwin/invesdwin-context/tree/master/invesdwin-context-parent/invesdwin-context-scala/src/test/java/de/invesdwin/context/scala/tests/hello
Which internally uses this wrapper for the ScriptEngine: https://github.com/invesdwin/invesdwin-context/blob/master/invesdwin-context-parent/invesdwin-context-scala/src/main/java/de/invesdwin/context/scala/pool/WrappedScalaScriptEngine.java

But it seems to fail in Scala3 because its ScriptEngine does not use the bindings or context attributes: https://github.com/lampepfl/dotty/blob/8e1054e9fcc91cba8fc3910051377b4a019b9589/compiler/src/dotty/tools/repl/ScriptEngine.scala

@subes
Copy link
Author

subes commented Jan 12, 2022

Support for Bindings would be great, because then ScriptEngines could be resetted & reused by clearing the bindings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants