java 10 support

12 views
Skip to first unread message

seth/nqzero

unread,
Jul 20, 2018, 11:17:53 PM7/20/18
to kilimt...@googlegroups.com
Kilim-2.0 now supports java 10 using asm 6.2

maven: org.db4j:kilim:2.0.0-16


java 8 is still the primary development environment but java 6, 7, 8, 9 and 10 should be supported

no module-info.java is provided. if the fallback module support isn't sufficient post an issue (ideally with a demo of using modules so i have something to test against) and it will be supported


i'm going to push this to the main repo (ie github.com/kilim/kilim) soon, but i'll announce that in a separate email







sriram srinivasan

unread,
Jul 21, 2018, 11:00:21 AM7/21/18
to kilimt...@googlegroups.com
This is most exciting, Seth. Thank you for all the hard work.

—sriram.


--
You received this message because you are subscribed to the Google Groups "kilimthreads" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kilimthreads...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

seth/nqzero

unread,
Jul 25, 2018, 10:37:38 PM7/25/18
to kilimt...@googlegroups.com
my initial deployment was grossly untested (i conflated building with an older version with testing with the older version). java 9 support appears to be ok for AOT weaving (though my testing is still not quite apples to apples), but the weaving class loader fails with `IllegalAccessError`. i'm guessing that this can be worked around using `--permit-illegal-access`, but i haven't tested that yet

java 10 support is in much worse shape - at least some woven lambdas won't load. and java 10 will have the same access issues (and more complicated flags)

sorry for the overly optimistic initial claims. i've been working on the java 10 weaving issue full time and hope to have a fix by the end of the month. i may have to wait till august 15 to begin working on the access issue



To unsubscribe from this group and stop receiving emails from it, send an email to kilimthreads+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "kilimthreads" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kilimthreads+unsubscribe@googlegroups.com.

seth/nqzero

unread,
Aug 5, 2018, 12:36:37 AM8/5/18
to kilimt...@googlegroups.com
i published another pre-release to maven central and github, fixing all known issues with both java 9 and 10. no command line flags are required. the artifact is org.db4j:kilim:2.0.0-18

the issue with java 9 illegal access was jdk classes moving to the jdk.internal namespace - kilim now ignores them again

the issue with java 10 is that java 10 refuses to load most pausable lambdas written in the style `() -> ...` due to some form of stricter validation, failing with:
    java.lang.NoClassDefFoundError: Win$$Lambda$3

this means that classes that load and run under java 8 and 9 will fail to load with java 10. to use lambdas with java 10, they must be written in a new style: `fiber -> ...`, ie the last parameter must be a `Fiber`, and a default method without the fiber parameter should be defined. this style is now supported for java 8, 9 and 10. the fiber parameter shouldn't be accessed in the lambda body, and to call such a lambda, call the default method instead

for kilim-provided functional interfaces, this should be mostly transparent other than adding the fiber param to the lambda. eg, if you're using `Task.fork(() -> ...)` the only change is `Task.fork(dummy -> ...)`

kilim now builds and tests green with java 8, 9 and 10

these changes are somewhat experimental - i haven't tried any of my larger projects with them yet. this also changes treatment of pausable methods that have a fiber argument. previously, these weren't woven. it's possible that someone used this feature to hand-weave a pausable method

if so, there's a `<classifier>jdk9</classifier>` jar (maven -- org.db4j:kilim:2.0.0-18:jdk9) that includes the jdk.internal fix but not the change to weaving






seth/nqzero

unread,
Aug 14, 2018, 3:21:02 PM8/14/18
to kilimt...@googlegroups.com
i reported the issue with java 10 validation to oracle: https://bugs.java.com/bugdatabase/view_bug.do?bug_id=JDK-8209112

they acknowledge it and  have fixed it in java 11, and i'm optimistic that it will be fixed in the next java 10 release (oct 16). as a result, i've reverted the workaround in the primary kilim artifact and moved it to a jdk10 specific artifact. use this to weave and run all classes for java 10 (lambdas must include the fiber argument as in the previous email)

my previous classifier-based approach doesn't work for AOT weaving as maven ignores the classifier for plugins. either install locally specific to your java version or use the new jdk-specific version scheme

the latest java 10 artifact is:
org.db4j:kilim:2.0.0-20-jdk10








sriram srinivasan

unread,
Aug 14, 2018, 3:26:20 PM8/14/18
to kilimt...@googlegroups.com
I am relieved to hear it. I have not been able to spend any time on it, and have been feeling very guilty leaving you saddled with the problem alone. 

—s

To unsubscribe from this group and stop receiving emails from it, send an email to kilimthreads...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages