Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
pull request: compile with java 11 #245
When I try to compile relaxng/jing-trang branch master with java 11, I get the following error:
My pull request fixes the problem by:
In addition I tackled the following:
I would be very glad if you could consider integration into the master branch.
Yes, I do have concerns.
For one, this breaks the build, because it renames the current ant build targets — specifically, the part of the patch that adds the gradle stuff.
So at a minimum, I think the gradle stuff needs to be removed and split out into a different PR. (Even if it weren’t breaking the build, it’s not so great to have single PR that’s doing multiple disparate things).
But even outside of the gradle stuff, it’s not clear to me that the “compile with java 11” changes here are necessary — or even that they don’t potentially regress anything.
The thing is, we’re already compiling with Java 11 fine in our Travis CI environment, without this patch. And I also compile with Java 11 locally in my (MacOS) environment without this patch.
The change in this patch essentially just completely removes the saxon.jar file from the build and from the repo. It’s not clear to me that’s something we really want to do — I don’t know if something actually could be depending on the saxon.jar file which would regress if it isn’t there any longer.
But certainly I can say that it’s not necessary to remove the saxon.jar file in order to build successfully on Java 11 — because as I noted above, we’re already building under Java 11 with saxon.jar in place.
Well, thank you for feedback.
For me it's rather strange that you never encountered a ClassNotFoundException on builds - because it happens to me every time. As an informed guess, I would throw suspect on a classpath issue.
What I actually did is to remove the (very old) saxon.jar and use the (already present) saxon9.jar as replacement. For me it looks like that saxon.jar was only used for building the project.
I now thinks that is not true: there is the
So it boils down to (a) if there is still any need to support the aged saxon and (b) find a convincing argument why having both saxon on classpath could lead to ClassNotFoundException with java 11.
I completly agree that the PR needs separation of the gradle stuff.
What OS distro are on testing on? Yesterday at validator/validator#744 (comment) I got a report of a ClassNotFoundException that seems to happen only on Fedora with the openjdk11 package.
Do you have multiple OS distros you’re able to test on? And if so can you reproduce the ClassNotFoundException on those?
We currently have data to indicate the ClassNotFoundException problem reported here isn’t reproducible in the default Java environment on MacOS with openjdk11, nor on Ubuntu with openjdk11, oraclejdk11, openjdk10, oraclejdk9, or openjdk-ea (=12) — because those are what our Travis CI tests.
Yes I can vaguely understand that it must be related somehow to the Modules feature introduced in Java 9 — and thus maybe the underlying issue reported at #246 — but I personally don’t have any experience so far in trying to troubleshoot and fix any problems related to that.
And regardless, I would expect that whatever difference were caused by the Modules feature, we’d consistently run into those problems no matter what OS distro we ran the build on.
So the only wild guess I can personally come up with at this point is that maybe in some environments (e.g., Fedora) the OS distro packagers/maintainers have the openjdk11 package configured (and maybe the openjdk10 and openjdk9 packages) to flip on some non-default Java environment setting related to Modules that breaks backward compatibility.
Well, my main system is indeed a Fedora 29:
On this system, I tested 3 Java 11: (1) the Fedora RPM package, (2) the Oracle TGZ, (3) the OpenJDK TGZ. Result: always
Then I switched to a Ubuntu 18.10:
On this system, I tested the Ubuntu DEB Java 11 JDK: