Skip to content

Fixes to improve Java 11 testing#6296

Merged
headius merged 9 commits intojruby:masterfrom
headius:java11
Jun 25, 2020
Merged

Fixes to improve Java 11 testing#6296
headius merged 9 commits intojruby:masterfrom
headius:java11

Conversation

@headius
Copy link
Member

@headius headius commented Jun 24, 2020

This PR will fix issues preventing some of our test suites from passing on Java 11, in order to help move toward full compatibility in the presence of Java modules.

This PR is based on 9.3 but most fixes should be mergeable to 9.2, and we may want to consider some or all of them for 9.2.12.

headius added 3 commits June 23, 2020 11:50
Similar to non-public classes, we don't want to bind the
reflected methods from no-exported classes, since dispatching to
those method objects will fail with an IllegalAccessException. We
avoid setting up methods on those proxies and allow public
supertypes to provide them.

Fixes jruby#6287
The skipped test will fail on Java 9+ because we are calling from
a named module into a java.base package that's not open. In order
to keep the basic spirit of the test running, I added a similar
test against the JI fixtures we load via classpath.

These APIs (JavaClass etc) are deprecaed, but we do not yet have
a clean path to replacing and removing them. Therefore we should
at least keep basic tests working.
@headius headius added this to the JRuby 9.3.0.0 milestone Jun 24, 2020
@headius
Copy link
Member Author

headius commented Jun 25, 2020

How boring. I only got to make one fix!

With this change, the following test suites are green and running on JDK11 in CI:

  • JRuby core (test:jruby)
  • JRuby IR and bytecode compilation w/ invokedynamic (spec:compiler)
  • Java integration (spec:ji)
  • ruby/spec core (spec:ruby:fast)
  • CRuby core (test:mri:core:jit)

The only fix here was to avoid binding non-exported classes' methods, which fixes #6287. It's simple, so I'll cherry-pick it for 9.2.12.

@headius headius marked this pull request as ready for review June 25, 2020 08:25
@headius
Copy link
Member Author

headius commented Jun 25, 2020

I tossed FFI in as well since that rounds out the set of features being tested.

@headius headius merged commit 8cf2992 into jruby:master Jun 25, 2020
@headius headius deleted the java11 branch June 25, 2020 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant