New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support building on Java 9 #4338
Conversation
@chrisseaton I see the activations for Java 8. This won't change the requirement that we need to be java 8 or higher does it? I know we build our releases using Java 1.8 so truffle can build but we still generate 1.7 bytecode. |
You're right - this doesn't produce code that works on Java 7 or 8. Back to the drawing board. |
so you guys are saying for jdk8 the compiler needs to switch to 1.8 as well - i.e. target/source version needs to done via properties and the activation needs to overwrite the default: Lines 175 to 176 in 07f50dd
beside the compile tasks - how can check/verify that the code is doing the right thing ? some jdk8 test working only with jdk8 or something ! |
We need to check every combination of (7, 8, 9) x (8, 9) - 6x the jobs we have on Travis at the moment. |
maybe pick one or two out of these many to make sure the compile tasks did the right thing. of course a complete test coverage is desirable but looks really huge |
Oh and I should also say that I'd expect there to be test failures on 9 in general. For example Joda does not work well on Java 9 - we've switched in Truffle to Java 8's date/time API because of this. I opened issues with Joda saying that their tests were failing, but they just changed the tests ha ha. |
TDD it is or not :) |
@chrisseaton I tried to rebase to master and had too many conflicts on truffle side of things. I release the mavengem library, the polyglot-maven is still pending. and I am working on the target/source flags for the compiler. is this branch suppose to be in line with master? i.e. are there any special patches for this branch beside the maven related ones ? |
this needs to be addressed first if we want to be able to build with jdk9 and target 1.9 ! @headius just a friendly reminder to the unsafe problem ;) |
@chrisseaton the latest patch will produce core classes with 52.0 version and truffle classes with 53.0 when compiled with jdk9. once core can be build without extra bootclasspath then we can switch to the 53.0 everywhere. hope this is on the right track. |
@mkristian yes this is supposed to go into master. Do you want me to try rebasing myself? |
@chrisseaton no need, I will make a new branch and cherry-pick these 2-3 commits. |
jdk8 uses 1.8 as specification version and jdk9 is using 9. there could be other ways to solve this - just picked one.
@enebo @headius I do not know whether to continue or not. currently it does not compile with jdk9 I downloaded yesterday. the current setup is that if you build with jdk8 it uses target/source 1.8 with jdk9 it uses target.source 1.9. I cleanup the branch and keep it as is until there is indication that the jruby codebase should compile under jdk9 as well. or maybe the current switch in the profile is already nice to have. |
This was blocked by a few minor issues but these have been resolved now.
@mkristian can we get a release of
polyglot-ruby
so we don't need to use aSNAPSHOT
?Then @headius can we consider merging this to master. We can't build on Java 9 without it. I'm not sure if it has any side effects but it seems to work.