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
The built in Nashorn JavaScript and GraalVM JavaScript add-on are not compatible. When the GraalVM add-on is installed, anything written in Nashorn will break. Since Blockly ends up resolving to Nashorn, that means anything written using Nashorn will also break.
Your suggestion
Somehow detect when the GraalVM add-on is installed and hide the option to use Blockly.
Additional information
A number of users, including highly advanced users with years of experience have run into this and related problems when the add-on is installed.
The text was updated successfully, but these errors were encountered:
This prepends code that makes the `ctx`, `itemRegistry` & `events`
objects accessible when the scripts are run with GraalVM, as they
are when run with Nashorn.
Closesopenhab#1169.
Signed-off-by: Yannick Schaus <[email protected]>
#1170 seems to make the Blockly code run in GraalVM, following my remark in openhab/openhab-core#2433 (comment).
This supposes the user has a working GraalVM (in particular, this supposes a manual creation of the conf/automation/lib/javascript/personal directory for now, see openhab/openhab-addons#11219).
Then the following works:
But note the "create text with" blocks that were not required in Nashorn (GraalVM is more strict with method resolution and will only accept java.lang.String in these cases, perhaps adding a few .toString() for these blocks wouldn't hurt).
The problem
The built in Nashorn JavaScript and GraalVM JavaScript add-on are not compatible. When the GraalVM add-on is installed, anything written in Nashorn will break. Since Blockly ends up resolving to Nashorn, that means anything written using Nashorn will also break.
Your suggestion
Somehow detect when the GraalVM add-on is installed and hide the option to use Blockly.
Additional information
A number of users, including highly advanced users with years of experience have run into this and related problems when the add-on is installed.
The text was updated successfully, but these errors were encountered: