-
Notifications
You must be signed in to change notification settings - Fork 370
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
Update gwt build to run under Java 11 #9683
Comments
niloc132@java9+ is a quick and dirty patch that at least makes it possible to build GWT under java9, 11 (have not yet tested 14). Some aspects can be cherry-picked to address the issues discussed above, but some will need more work. |
under Windows (version 1.10.7, JDK 11.0.7, 14.0.1 Windows) I got following error if gwt.javac macro is executed:
Tested with |
Can you share the full log, and confirm that you have my commit running? Looks like I might have missed some |
Sure. Have prepared it and then forget to upload 🤦 |
Can you do it again from clean, and confirm that the whole thing is there? I was expecting to see something like this at the end, note the lines after
|
your "hack and slash commit" produce following:
for sample without your hack commit and use the one from gerrit (+ + gwt master): I try a full rebuild now (first create gwt-user with java8). |
Looks like I might have changed/reverted something else in an attempt to "clean" it up for commit and broken it? Will get back to you. |
Okay, I force pushed a commit to that branch to replace it - this is better in a few ways than what I had intended to push last time:
Sorry about that, let me know if this new commit works any better for you. Be sure to do a clean between builds, I've seen odd issues in the past even when you don't change JDK. Tested the build on both java8 and java11, have not tried running both on java8 projects, only checked the magic number in bytecode in a few files. |
getting same error
used this: https://github.com/niloc132/gwt/tree/java9+ |
Sorry, I pushed the branch to the wrong place - I re-pushed, here's the commit to be sure, with no more |
Now it seems to work thanks for that |
Prior to Java 9, the postOrderEnumeration method returned a raw Enumeration, but to correctly compile in newer JDKs we must return the correctly parameterized type. Bug: gwtproject#9683 Change-Id: I9a21df1bc6473a7e569e0e4d3aa65ba45215167f Bug-Link: gwtproject#9683
Tested with OpenJDK 17 and it worked. |
Javadocs will still not work, and some tests won't either, but at least producing a build (and running it) should all function at this point. Javadoc is still not going to work until we make the decision to drop java 8/9/10 support for producing javadoc, so we'll continue producing official builds using java8 or so for the time being, until someone adopts that migration work. |
This patch does some initial work of adding support for building GWT on Java >8, but until the javadoc wiring is rebuilt (or conditionally disabled) a normal build won't be possible. After Javadoc has been updated or guarded behind a flag, isJava8 can be false when Java >8 JDK is used to build, and tests for those can be guarded as makes sense. Bug: 9683 Bug-Link: gwtproject/gwt#9683 Change-Id: I5ec65e330409802368b2a60148d7ef1ee97c03d1
This patch does some initial work of adding support for building GWT on Java >8, but until the javadoc wiring is rebuilt (or conditionally disabled) a normal build won't be possible. After Javadoc has been updated or guarded behind a flag, isJava8 can be false when Java >8 JDK is used to build, and tests for those can be guarded as makes sense. Bug: 9683 Bug-Link: gwtproject/gwt#9683 Change-Id: I5ec65e330409802368b2a60148d7ef1ee97c03d1
This patch does some initial work of adding support for building GWT on Java >8, but until the javadoc wiring is rebuilt (or conditionally disabled) a normal build won't be possible. After Javadoc has been updated or guarded behind a flag, isJava8 can be false when Java >8 JDK is used to build, and tests for those can be guarded as makes sense. Bug: 9683 Bug-Link: gwtproject/gwt#9683 Change-Id: I5ec65e330409802368b2a60148d7ef1ee97c03d1
This patch does some initial work of adding support for building GWT on Java >8, but until the javadoc wiring is rebuilt (or conditionally disabled) a normal build won't be possible. After Javadoc has been updated or guarded behind a flag, isJava8 can be false when Java >8 JDK is used to build, and tests for those can be guarded as makes sense. The error-prone Java compiler is also temporarily disabled in this commit, and will be restored and updated to latest in a follow-up patch. Bug: 9683 Bug-Link: gwtproject/gwt#9683 Change-Id: I5ec65e330409802368b2a60148d7ef1ee97c03d1
With https://gwt-review.googlesource.com/c/gwt/+/23700 / b6cc5cf merged and https://gwt-review.googlesource.com/c/gwt/+/23740 ready to go (will probably merge later today, just doing a bit more testing first after rebasing), most of the build (and some tests) can work on java8, java11, and java17, as long as the docs part of the build is disabled. If we want to keep Java 8 support for a while longer, we need to decide if docs should continue to be built in Java 8 or assume something newer. Either approach requires that the other build cannot produce javadocs, so any "builds with docs" produced needs to be tested with other Java versions. The time will come when GWT will be held back by supporting the Java 8 runtime at all - Jetty has announced that Jetty 9.4.x will EOL in April 2022 (and 10, 11 require Java 11+), and recent Eclipse JDT versions (which support Java 17 syntax) require a minimum of Java 11 as well. |
AFAICT, there are two tools that are problematic because they're using the old doclet API: the javadoc generation itself, and the JRE emulation reference ("ezt" in the codebase). |
Inlining example is only really problematic because the examples are actual Java classes, getting formatting and linking right (and keeping them up to date when minor changes have to be made) could be irritating, but not hard by any means. My understanding of Ezt is very limited, thanks for the details there. Naively, it seems like it might be straightforward to just find a more compatible way to walk the available super source and generate links. Especially since it seems that this tool keys off of a properties file, which in turn is just printed out disk from the FindPackages main? As you say, Ezt at least can safely wait until after we've dealt with the end of Java 8. |
Update doctool to run on Java 11, thus allowing either Java 8 or 11 to build GWT itself. Because the new javadoc types are not available in Java 8, the ant wiring has been configured to just skip docs when building with Java 8. CI is updated to build with both 8 and 11, but since Java 8 cannot produce documentation, only the Java 11 build is published. Fixes #9683
As of 2.8.2, GWT supports being run under Java7+, but the build itself only works cleanly in Java 7. As of GWT 2.9, this changed to support Java8+ (via https://gwt-review.googlesource.com/c/gwt/+/22320), but Java 9+ still do not work to actually produce the GWT distribution. This issue is a placeholder to track the problems faced.
SwingLoggerPanel.java
uses improper generics for Java 9+. Previously, thepostorderEnumeration()
returned a rawEnumeration
, but that changed in Java 9 https://docs.oracle.com/javase/9/docs/api/javax/swing/tree/DefaultMutableTreeNode.html#postorderEnumeration--CloseableJarHandler.java
uses classes in the java.base module that are not exported. An extra compiler arg can either make that accessible, or it is possible that this class is dead and can be removedcom.sun.javadoc
packagescom.sun.tools.doclets
package, deprecated in java9, gone in 11. Finding a cross-version way to support this could be difficult (having not tried at all yet), it may be easier to find a different way to support the custom documentation present in GWT.The text was updated successfully, but these errors were encountered: