Skip to content
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

Closed
wants to merge 3 commits into from
Closed

Support building on Java 9 #4338

wants to merge 3 commits into from

Conversation

chrisseaton
Copy link
Contributor

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 a SNAPSHOT?

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.

@enebo
Copy link
Member

enebo commented Nov 28, 2016

@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.

@chrisseaton
Copy link
Contributor Author

You're right - this doesn't produce code that works on Java 7 or 8. Back to the drawing board.

@mkristian
Copy link
Member

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:

jruby/core/pom.rb

Lines 175 to 176 in 07f50dd

'source' => [ '${base.java.version}', '1.7' ],
'target' => [ '${base.javac.version}', '1.7' ],

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 !

@chrisseaton
Copy link
Contributor Author

how can check/verify that the code is doing the right thing

We need to check every combination of (7, 8, 9) x (8, 9) - 6x the jobs we have on Travis at the moment.

@mkristian
Copy link
Member

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

@chrisseaton
Copy link
Contributor Author

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.

@mkristian
Copy link
Member

TDD it is or not :)

@mkristian
Copy link
Member

@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 ?

@mkristian
Copy link
Member

[ERROR] javac: option -Xbootclasspath/p: not allowed with target 1.9

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 ;)

@mkristian
Copy link
Member

@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.

@chrisseaton
Copy link
Contributor Author

@mkristian yes this is supposed to go into master. Do you want me to try rebasing myself?

@mkristian
Copy link
Member

@chrisseaton no need, I will make a new branch and cherry-pick these 2-3 commits.

@mkristian
Copy link
Member

@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.

@chrisseaton chrisseaton deleted the jdk9-build branch March 21, 2017 01:08
@headius headius added this to the Invalid or Duplicate milestone Apr 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants