usethesource/vallang

Illegal reflective access by FileChannelDirectInputStream

PaulKlint opened this issue · 4 comments

This happens during a a build of rascal:

[INFO] WARNING: An illegal reflective access operation has occurred
[INFO] WARNING: Illegal reflective access by io.usethesource.vallang.io.binary.util.FileChannelDirectInputStream (file:/Users/paulklint/.m2/repository/org/rascalmpl/rascal/0.19.4-RC1/rascal-0.19.4-RC1.jar) to method java.nio.DirectByteBuffer.cleaner()
[INFO] WARNING: Please consider reporting this to the maintainers of io.usethesource.vallang.io.binary.util.FileChannelDirectInputStream
[INFO] WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
[INFO] WARNING: All illegal access operations will be denied in a future release

It means you are running a java version newer than 8.

Which we should be dealing with at some point, but just a heads up, you are running a newer jvm 😉

Confirmed: I've had similar issues when java11 or java15 was used.

To solve this, we need to turn vallang into an actual java 9+ module, and add jdk.unsupported as a module we depend on.

I've not done this since that would also mean we have to figure out how to combine the module system with the shaded jar we publish for rascal.

Closing this as the message is gone, if we move to a version higher than java 11, we'll have to reconsider again.