Hi Ekaterina,

It seems /graal-sdk/ is licensed under UPL license as well (see https://github.com/oracle/graal/tree/master/sdk):
> GraalVM SDK is licensed under the Universal Permissive License.
Also it is marked as UPL in Maven Central (see https://search.maven.org/artifact/org.graalvm.sdk/graal-sdk/21.2.0/jar).

In fact, I checked all required components and they seem to have suitable licenses:

 * https://mvnrepository.com/artifact/org.graalvm.js/js/21.2.0 (UPL)
 * https://mvnrepository.com/artifact/com.ibm.icu/icu4j/69.1
   (Unicode/ICU License)
 * https://mvnrepository.com/artifact/org.graalvm.regex/regex/21.2.0 (UPL)
 * https://mvnrepository.com/artifact/org.graalvm.sdk/graal-sdk/21.2.0
   (UPL)
 * https://mvnrepository.com/artifact/org.graalvm.truffle/truffle-api/21.2.0
   (UPL)
 * https://mvnrepository.com/artifact/org.graalvm.js/js-scriptengine/21.2.0
   (UPL)

I feel GraalVM would be the best option. However, if it is impossible to use it in the project we could consider the well-known old-timer Rhino. Looks like it is still alive and wants to get users back (see https://github.com/mozilla/rhino/blob/master/RELEASE-NOTES.md): > Now that Nashorn has been deprecated, a number of people have asked about using Rhino with the standard Java "ScriptEngine" interface. This release supports that. It is available under MPL 2.0 which seems to be compatible (need to double check this statement) with Apache 2.0.


Thanks,
Aleksei.

On 9/10/21 1:15 AM, Ekaterina Dimitrova wrote:
Hi team,

I started some initial work on the Java 17 support (CASSANDRA-16895).

One of the first observations is that Nashorn, which was already deprecated
in Java 11, is already fully removed. We use it for UDFs and one short
script <https://github.com/apache/cassandra/blob/trunk/build.xml#L147-L155>
in build.xml. The solution to that is to introduce graal as a dependency.
While graaljs is under UPL license, which is accepted by Apache, I believe
we also need the graal-sdk[2] which is under GPL2 which is not compatible
with Apache License, version 2.0. (Thanks Brandon for pointing that out)

For reference:

[1] https://www.graalvm.org/reference-manual/js/NashornMigrationGuide/

[2] https://github.com/oracle/graaljs/blob/master/docs/user/RunOnJDK.md

[3] https://ant.apache.org/manual/Tasks/script.html

[4]  https://www.apache.org/licenses/GPL-compatibility.html

At this point, I haven’t found any other substitution for Nashorn that can
fit our needs and while the build.xml issue can be possibly easily solved(I
guess), I am wondering what would be the right approach for the UDFs.

I am wondering what others think about that. Any
thoughts/experience/suggestions?

Best regards,

Ekaterina

Reply via email to