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
GraalVM version or commit id if built from source: 22.3.0-dev
CE or EE: CE
JDK version: JDK11
OS and OS Version: Ubuntu 22.04.1 LTS
Architecture: amd64
The output of java -Xinternalversion:
OpenJDK 64-Bit Server VM (11.0.17+3-jvmci-22.3-b04) for linux-amd64 JRE (11.0.17+3-jvmci-22.3-b04), built on Sep 1 2022 00:00:31 by "buildslave" with gcc 7.3.0
Have you verified this issue still happens when using the latest snapshot?
Yes
Describe the issue
When trying to create a nice repro for another issue, I've got blocked by the fact that I cannot even pass a Java date from host to the Espresso side through interop.
I minimized the example to the following:
Create the two following files (taking into consideration correct directory structure to match the package declarations): Foo.java:
Instead, the Espresso invocations fail with IllegalArgumentException, see the traces below.
Additional context
See the full output of the run below.
Details
Running Host:
printDateTime: 2022-09-22T12:00+02:00[Europe/Warsaw] @ 1663840800
Running Espresso:
java.lang.IllegalArgumentException: Invalid argument when invoking 'printDateTime' on 'Klass<Lorg/enso/base/repro/Foo;>'(language: Java, type: com.oracle.truffle.polyglot.PolyglotMapAndFunction). Could not cast foreign object to java/time/ZonedDateTime: due to: Missing field: dateTimeProvided arguments: ['2022-09-22T12:00+02:00[Europe/Warsaw]'(language: Java, type: java.time.ZonedDateTime)].
at org.graalvm.truffle/com.oracle.truffle.polyglot.PolyglotEngineException.illegalArgument(PolyglotEngineException.java:131)
at org.graalvm.truffle/com.oracle.truffle.polyglot.PolyglotValueDispatch.invalidInvokeArgumentType(PolyglotValueDispatch.java:1432)
at org.graalvm.truffle/com.oracle.truffle.polyglot.PolyglotValueDispatch$InteropValue$AbstractInvokeNode.executeShared(PolyglotValueDispatch.java:4455)
at org.graalvm.truffle/com.oracle.truffle.polyglot.PolyglotValueDispatch$InteropValue$InvokeNode.executeImpl(PolyglotValueDispatch.java:4486)
at org.graalvm.truffle/com.oracle.truffle.polyglot.HostToGuestRootNode.execute(HostToGuestRootNode.java:124)
at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.executeRootNode(OptimizedCallTarget.java:709)
at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.profiledPERoot(OptimizedCallTarget.java:632)
at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.callBoundary(OptimizedCallTarget.java:565)
at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.doInvoke(OptimizedCallTarget.java:549)
at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.GraalRuntimeSupport.callProfiled(GraalRuntimeSupport.java:256)
at org.graalvm.truffle/com.oracle.truffle.polyglot.PolyglotValueDispatch$InteropValue.invoke(PolyglotValueDispatch.java:2421)
at org.graalvm.sdk/org.graalvm.polyglot.Value.invokeMember(Value.java:973)
at org.enso.base.repro.Espressotest.runZDTTest(Espressotest.java:49)
at org.enso.base.repro.Espressotest.compareDateTimeHandling(Espressotest.java:27)
at org.enso.base.repro.Espressotest.main(Espressotest.java:16)
Caused by: Attached Guest Language Frames (1)
Running Host:
printDate: 2022-09-22
Running Espresso:
java.lang.IllegalArgumentException: Invalid argument when invoking 'printDate' on 'Klass<Lorg/enso/base/repro/Foo;>'(language: Java, type: com.oracle.truffle.polyglot.PolyglotMapAndFunction). Could not cast foreign object to java/time/LocalDate: due to: Missing field: yearProvided arguments: ['2022-09-22'(language: Java, type: java.time.LocalDate)].
at org.graalvm.truffle/com.oracle.truffle.polyglot.PolyglotEngineException.illegalArgument(PolyglotEngineException.java:131)
at org.graalvm.truffle/com.oracle.truffle.polyglot.PolyglotValueDispatch.invalidInvokeArgumentType(PolyglotValueDispatch.java:1432)
at org.graalvm.truffle/com.oracle.truffle.polyglot.PolyglotValueDispatch$InteropValue$AbstractInvokeNode.executeShared(PolyglotValueDispatch.java:4455)
at org.graalvm.truffle/com.oracle.truffle.polyglot.PolyglotValueDispatch$InteropValue$InvokeNode.executeImpl(PolyglotValueDispatch.java:4486)
at org.graalvm.truffle/com.oracle.truffle.polyglot.HostToGuestRootNode.execute(HostToGuestRootNode.java:124)
at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.executeRootNode(OptimizedCallTarget.java:709)
at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.profiledPERoot(OptimizedCallTarget.java:632)
at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.callBoundary(OptimizedCallTarget.java:565)
at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.doInvoke(OptimizedCallTarget.java:549)
at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.GraalRuntimeSupport.callProfiled(GraalRuntimeSupport.java:256)
at org.graalvm.truffle/com.oracle.truffle.polyglot.PolyglotValueDispatch$InteropValue.invoke(PolyglotValueDispatch.java:2421)
at org.graalvm.sdk/org.graalvm.polyglot.Value.invokeMember(Value.java:973)
at org.enso.base.repro.Espressotest.runLDTest(Espressotest.java:55)
at org.enso.base.repro.Espressotest.compareDateHandling(Espressotest.java:40)
at org.enso.base.repro.Espressotest.main(Espressotest.java:17)
Caused by: Attached Guest Language Frames (1)
The text was updated successfully, but these errors were encountered:
Thanks for the report! I have added the label. @javeleon, i suppose it's about supporting foreign objects that answer to isDate and isInstant in ToEspressoNode.
Describe GraalVM and your environment :
java -Xinternalversion
:Have you verified this issue still happens when using the latest snapshot?
Yes
Describe the issue
When trying to create a nice repro for another issue, I've got blocked by the fact that I cannot even pass a Java date from host to the Espresso side through interop.
I minimized the example to the following:
Create the two following files (taking into consideration correct directory structure to match the
package
declarations):Foo.java
:and
Espressotest.java
:Steps to reproduce the issue
Build the two files using
javac
and runjava org.enso.base.repro.Espressotest
.My exact commands are:
Expected behavior
I'd expect both to work, instead host invocations work ok, but Espresso ones fail to convert the Host Java date to Espresso.
The output I'd expect would be:
Instead, the Espresso invocations fail with
IllegalArgumentException
, see the traces below.Additional context
See the full output of the run below.
Details
The text was updated successfully, but these errors were encountered: