ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gintautas Grigelionis <g.grigelio...@gmail.com>
Subject Re: GraalVM JavaScript Again
Date Mon, 10 Aug 2020 16:13:58 GMT
On Mon, 10 Aug 2020 at 17:52, Stefan Bodewig <bodewig@apache.org> wrote:

> Hi
>
> right now master sets polyglot.js.allowAllAccess to true when it detects
> the script engine is a GraalVM engine. This is necessary if the script
> wants to use any of the Ant objects.
>
> Jaikiran suggests to enable full Nashorn compatibility mode, which I
> tend to agree with. Unfortunately you cannot do that via the
> ScriptEngine API, only via a system property or by creating the
> GraalJSScriptEngine directly - see
> https://github.com/graalvm/graaljs/blob/master/docs/user/ScriptEngine.md
>
> I see the following options:
>
> (1) leave things as they are right now and tell people to set system
>     properties before starting Ant if they need more.
>
> (2) Set the "Nashorn compatibility mode" via the system property based
>     on another magic property - and enable it by default
>
> (3) add graaljs as an alternative javax as script engine and add new
>     magic properties to control it.
>
> (4) find all the places that might create script engines (script and
>     scriptdef tasks as well as the script filter, at least) and add
>     explicit options.
>
> Personally I'd prefer one of the first two options and would like option
> 3 the least.
>
> Stefan
>

Option 2

Gintas

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message