Version of ECMAscript in GraalVM for jArchi ?

Started by rchevallier, September 28, 2022, 10:52:03 AM

Previous topic - Next topic

rchevallier

Hello

What version of ECMAScript is defined in GraalVM for jArchi (cf https://www.graalvm.org/dev/reference-manual/js/JavaScriptCompatibility/) ?

I'm asking because the engine doesn't seem to support the # prefix for private members of a class, although it is recognized:

Script Error: javax.script.ScriptException: org.graalvm.polyglot.PolyglotException: SyntaxError: test.ajs:128:11 Unexpected token: private_ident
    static #hexToRGB (hex) {
           ^

Phil Beauvoir

I don't know to be honest. Do you have an example of JS using the #?
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

Phil Beauvoir

I think those are part of ECMAScript 2022

https://blog.saeloun.com/2021/10/14/ecmascript-private-fields.html

That version of GraalVM is from 2000. I'll check latest version.
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

Phil Beauvoir

I tested with the latest version of GraalVM and it does support private member access with #. I'll put together a new build of jArchi with it. Bear in mind that as it's a new version of GraalVM it might have some hidden changes.
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

rchevallier

Thanks for your quick reply

It's not critical to have the latest version, but always interesting to understand on which ECMAscript standard we shall write code for. I can test the beta if you want

I suggest to add the GraalVM ES supported version to the README of JArchi release