You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2020/07/17 10:55:13 UTC

[GitHub] [netbeans] sdedic opened a new pull request #2261: Improve GraalVM script engines interoperability.

sdedic opened a new pull request #2261:
URL: https://github.com/apache/netbeans/pull/2261


   There are a few types of changes:
   - the exceptions thrown are better reported: the original exception is attached as the `cause` of the `RuntimeException` (actually `PolyglotException`) thrown from eval/invoke methods.
   - better (un)wrapping of `org.graalvm.polyglot.Value` from/to POJOs
   - the `ScriptEngine` returned by `Scripting.createManager()` will support `ScriptContext.ENGINE` scope as the top-level language scope.
   - global attributes are now supported, even before the first `eval` or other `Context`-creating method on the Engine is called.
   
   I also somewhat checked the testu results agains GraalVM 20.1 (now travis runs 19.3.1)


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] JaroslavTulach merged pull request #2261: Improve GraalVM script engines interoperability.

Posted by GitBox <gi...@apache.org>.
JaroslavTulach merged pull request #2261:
URL: https://github.com/apache/netbeans/pull/2261


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] neilcsmith-net commented on pull request #2261: Improve GraalVM script engines interoperability.

Posted by GitBox <gi...@apache.org>.
neilcsmith-net commented on pull request #2261:
URL: https://github.com/apache/netbeans/pull/2261#issuecomment-660914718


   @sdedic go ahead from my perspective. Your choice whether to squash or not first.  Whatever makes sense.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] JaroslavTulach commented on pull request #2261: Improve GraalVM script engines interoperability.

Posted by GitBox <gi...@apache.org>.
JaroslavTulach commented on pull request #2261:
URL: https://github.com/apache/netbeans/pull/2261#issuecomment-660430405


   >     * NbModuleSuite only loads `org.junit.**` from AppClassLoader, not `org.hamcrest.**`
   
   cc43414 seems to be the correct fix.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] JaroslavTulach commented on pull request #2261: Improve GraalVM script engines interoperability.

Posted by GitBox <gi...@apache.org>.
JaroslavTulach commented on pull request #2261:
URL: https://github.com/apache/netbeans/pull/2261#issuecomment-660789906


   Sváťa has gone for a vacation. @neilcsmith-net if it is OK to merge, feel free to do so. I am convinced the change prepared by Sváťa improves the exception handling quite significantly.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] neilcsmith-net commented on pull request #2261: Improve GraalVM script engines interoperability.

Posted by GitBox <gi...@apache.org>.
neilcsmith-net commented on pull request #2261:
URL: https://github.com/apache/netbeans/pull/2261#issuecomment-660183707


   Is the Travis failure in the GraalVM tests a concern or coincidence?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] JaroslavTulach commented on a change in pull request #2261: Improve GraalVM script engines interoperability.

Posted by GitBox <gi...@apache.org>.
JaroslavTulach commented on a change in pull request #2261:
URL: https://github.com/apache/netbeans/pull/2261#discussion_r456386921



##########
File path: ide/libs.graalsdk/src/org/netbeans/libs/graalsdk/impl/GraalEngine.java
##########
@@ -55,20 +57,32 @@ public Object eval(String src, ScriptContext arg1) throws ScriptException {
         Value result = evalImpl(arg1, src);
         return unbox(result);
     }
-
-    private Value evalImpl(ScriptContext arg1, String src) throws ScriptException {
-
+    
+    private static interface ScriptAction {
+        public Value run();
+    }
+    
+    private Value handleException(ScriptAction r) throws ScriptException {
         try {
-            return ((GraalContext) arg1).ctx().eval(id(), src);
+            return r.run();
         } catch (PolyglotException e) {
+            if (e.isHostException()) {
+                e.initCause(e.asHostException());

Review comment:
       OK.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] sdedic commented on pull request #2261: Improve GraalVM script engines interoperability.

Posted by GitBox <gi...@apache.org>.
sdedic commented on pull request #2261:
URL: https://github.com/apache/netbeans/pull/2261#issuecomment-660274123


   > Is the Travis failure in the GraalVM tests a concern or coincidence?
   
   Concern.  Apologies, I've didn't run full tests.
   
   Actually ... it's very interesting. @JaroslavTulach could have more deeper insight in this matter. The failure is actually caused by  **classloader mismatch**. 
   
   `GraalJSTest` - the testcase actually run by `junit` ant task is loaded by AppClassLoader, while hamcrest is being loaded by ModuleSystem$SystemClassLoader. There are two inconsistencies:
   - NbModuleSuite only loads `org.junit.**` from AppClassLoader, not `org.hamcrest.**`
   - the `lib.junit4` module does not list `org.hamcrest.**` as public packages, although it contains the relevant classes.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] sdedic commented on pull request #2261: Improve GraalVM script engines interoperability.

Posted by GitBox <gi...@apache.org>.
sdedic commented on pull request #2261:
URL: https://github.com/apache/netbeans/pull/2261#issuecomment-660806978


   Yes, actually waiting for re-approval after the changes. Sorry, I was out of Internet connection yesterday


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists