Closed JaroslavTulach closed 6 years ago
Good luck! I've tried to make that happen but have unfortunately failed.
It needed a lot of debugging of the Maven surefire plugin. There is special handling for module-info
in main source directory. Alas, I don't see special handling of module-info
in test sources. As such I had to add truffle-api
into compile
scope. That isn't ideal, but it works.
Its not ideal that we need to put it on compile. Is that a bug of Maven surefire that it does not respect transitive dependencies? Because js refers to truffle already?
So far I managed to convince surefire to run in "module mode" for the main project sources and "classpath mode" for the tests. In this setup the truffle-api
module has to be shared between the compiler and the JavaScript engine. Using compile
scope does the trick. So far other attempts failed.
At the end it was not that complex. No need to play with module-info.java
at all. Just download SDK, Truffle API and compiler into a subdirectory and enable them as modules.
Very cool! Thanks a lot!
I'd like to make sure that the unit tests are executed at "Graal-speed". First step is to measure how fast the engines are. Next step is to configure the plugin to use the Graal compiler.