Closed radeusgd closed 1 year ago
I'm not sure how to get the java on truffle
label onto this issue.
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
.
A fix for this issue has been integrated into master.
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
``` Running Host: printDateTime: 2022-09-22T12:00+02:00[Europe/Warsaw] @ 1663840800 Running Espresso: java.lang.IllegalArgumentException: Invalid argument when invoking 'printDateTime' on 'Klass