Preparing for GWT 2.12 release

650 views
Skip to first unread message

Colin Alworth

unread,
Aug 11, 2024, 12:31:29 PM8/11/24
to GWT Contributors
The 2.12 release seems to be almost ready - we're trying to do releases a little more frequently when we have changes to be made, and this is going to end up being about nine months after the 2.11 release.

Considerations for this release:
 * Java 8 support is formally dropped for running the compiler and dev mode. It may continue to work for the server, but our testing here is light - if it is important to you, please help with testing the early release to be sure.
 * Java 17 language support has been added - everything except switch-expression is merged, consider reviewing/testing https://github.com/gwtproject/gwt/pull/9981 to finalize that PR so we can finish this aspect of the release.
 * Several deprecated classes have been removed, and more still are now marked deprecated and will be removed in a future release. These are likely not used by your project, as most are unusable today anyway, but the change can be reviewed here https://github.com/gwtproject/gwt/pull/9925
 * Browsers have deprecated the unload event, and GWT has been interfering with some applications that don't directly use it. A PR is up to resolve this, but could use testing from anyone who might be affected by this: https://github.com/gwtproject/gwt/pull/9984
 * Sourcemap support has been updated - no major impact here aside from dropping the need to use (a very old version of) protobufs in the server, and supporting writing all source files as part of the sourcemap JSON file rather than needing all source files copied to a server to be useful.

Next steps:
 * Help review, finalize the pending PRs.
 * Let us know if there are other pending reviews or fixes that need to be targeted to the 2.12 milestone.
 * Test HEAD-SNAPSHOT builds to confirm no regressions in your own projects (either download from the Sonatype snapshot repo, or download the SDK zips from one of the builds at https://github.com/gwtproject/gwt/actions/workflows/full-check.yml).
 * In a week or so, volunteer for testing when a release is prepared.
 * If you need to run only on Java 8 and you need some of these changes, help us start a separate release process for GWT 2.11.x. Many of these changes can be backported, but we need assistance to make that work happen.

Juan Pablo Gardella

unread,
Aug 11, 2024, 4:48:57 PM8/11/24
to google-web-tool...@googlegroups.com
I will help with testing Colin! Thanks a lot for all your effort


--
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit-contributors/155bce20-d224-4b9f-8eea-98071d4547ccn%40googlegroups.com.

Juan Pablo Gardella

unread,
Aug 21, 2024, 7:47:21 AM8/21/24
to google-web-tool...@googlegroups.com
Where is the gwt head snapshot? I cannot find it at https://s01.oss.sonatype.org/content/repositories/snapshots/org/.

Colin Alworth

unread,
Aug 21, 2024, 9:06:41 AM8/21/24
to GWT Contributors
The org.gwtproject groupId uses the oss.sonatype.org server, rather than s01. So, check https://oss.sonatype.org/content/repositories/snapshots/org/gwtproject/ for the gwt-dev, gwt-user, etc artifacts.

Juan Pablo Gardella

unread,
Sep 5, 2024, 3:57:38 AM9/5/24
to google-web-tool...@googlegroups.com
FYI it worked fine with HEAD-SNAPSHOT

Colin Alworth

unread,
Sep 28, 2024, 9:19:15 AM9/28/24
to GWT Contributors
We're down to two PRs left to merge, one deprecating unused code and deleting already deprecated types, and one phasing out use of a browser event that Chrome has removed. I'm leaving both up for another day and then I'll land them and we should be on our way.

This is the part of the release where we need some testers, running a variety of operating systems, browsers, and Java versions. If you're interested, please email me off-list with the various setups you can test, and I'll make sure we have good coverage as we give the release a shakedown.

Quick summary of the release:
 * Java 8 is no longer supported for running tests, dev mode, or the compiler, and while it should still work for RPC/RequestFactory server components, it is untested in this release - if this is important to you, please make sure you take a close look here.
 * Java 17 language features are supported - records, switch expressions, text blocks, sealed classes, pattern matching instanceof
 * SDM can be restarted more easily without waiting for the 9876 port to be freed up
 * JRE improvements, Java 10 changes for Collections, BigInteger constructors
 * CSP improvements for RPC, linkers, SDM
 * Sourcemap improvements, better cross browser support, ability to generate a single map file rather than copy all sources as individual files

Once we have a few volunteers covering Java 11-23, Windows/MacOS/Linux, Edge/Chrome/Firefox, and the last two PRs are landed, I'll make a staging release and share the details so we can all get started.

Thanks in advance, and thanks for all of your help in getting to this point!

-Colin

Filipe Sousa

unread,
Sep 28, 2024, 3:03:39 PM9/28/24
to GWT Contributors
Hi,

Regarding switched expressions, is this supposed to work?

public class Basic implements EntryPoint {
  @Override
  public void onModuleLoad() {
    getKind(Kind.A);
  }

  private static String getKind(Kind kind) {
    return switch (kind) {
      case A -> "1";
      case B -> "2";
      case C -> "3";
      case D -> "4";
      case E -> "5";
      case F -> "6";
      case G -> "7";
      case H -> "8";
      case I -> "9";
      case J -> "10";
      case K -> "11";
      case L -> "12";
      case M -> "13";
      case N -> "14";
      case O -> "15";
     };
  }
}

Because I'm getting an error that says:

Compiling module it.pkg.Basic
   Compiling 2 permutations
      Compiling permutation 0...
      [ERROR] An internal compiler exception occurred
com.google.gwt.dev.jjs.InternalCompilerException: Unexpected error during visit.
at com.google.gwt.dev.jjs.ast.JVisitor.translateException(JVisitor.java:111)
at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:130)
at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:122)
at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:118)
at com.google.gwt.dev.jjs.impl.CloneExpressionVisitor.cloneExpression(CloneExpressionVisitor.java:78)
at com.google.gwt.dev.jjs.impl.MethodInliner$InliningVisitor.extractExpressionsFromBody(MethodInliner.java:265)
at com.google.gwt.dev.jjs.impl.MethodInliner$InliningVisitor.tryInlineMethodCall(MethodInliner.java:147)
at com.google.gwt.dev.jjs.impl.MethodInliner$InliningVisitor.endVisit(MethodInliner.java:112)
at com.google.gwt.dev.jjs.ast.JMethodCall.traverse(JMethodCall.java:268)
at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:118)
at com.google.gwt.dev.jjs.ast.JExpressionStatement.traverse(JExpressionStatement.java:42)
at com.google.gwt.dev.jjs.ast.JModVisitor$ListContext.traverse(JModVisitor.java:88)
at com.google.gwt.dev.jjs.ast.JModVisitor.acceptWithInsertRemove(JModVisitor.java:331)
at com.google.gwt.dev.jjs.ast.JBlock.traverse(JBlock.java:94)
at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:139)
at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:135)
at com.google.gwt.dev.jjs.ast.JMethodBody.traverse(JMethodBody.java:83)
at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
at com.google.gwt.dev.jjs.ast.JMethod.visitChildren(JMethod.java:786)
at com.google.gwt.dev.jjs.ast.JMethod.traverse(JMethod.java:778)
at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
at com.google.gwt.dev.jjs.impl.FullOptimizerContext.traverse(FullOptimizerContext.java:224)
at com.google.gwt.dev.jjs.impl.MethodInliner.execImpl(MethodInliner.java:611)
at com.google.gwt.dev.jjs.impl.MethodInliner.exec(MethodInliner.java:588)
at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.optimizeJavaOneTime(JavaToJavaScriptCompiler.java:1514)
at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.optimizeJavaToFixedPoint(JavaToJavaScriptCompiler.java:1443)
at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.optimizeJava(JavaToJavaScriptCompiler.java:525)
at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.compilePermutation(JavaToJavaScriptCompiler.java:362)
at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.compilePermutation(JavaToJavaScriptCompiler.java:274)
at com.google.gwt.dev.CompilePerms.compile(CompilePerms.java:198)
at com.google.gwt.dev.ThreadedPermutationWorkerFactory$ThreadedPermutationWorker.compile(ThreadedPermutationWorkerFactory.java:50)
at com.google.gwt.dev.PermutationWorkerFactory$Manager$WorkerThread.run(PermutationWorkerFactory.java:74)
at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: java.lang.UnsupportedOperationException: switch expression cannot be cloned
at com.google.gwt.dev.jjs.impl.CloneExpressionVisitor.visit(CloneExpressionVisitor.java:261)
at com.google.gwt.dev.jjs.ast.JSwitchExpression.traverse(JSwitchExpression.java:50)
at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:127)
... 40 more
         [ERROR] at Basic.java(12): switch (Enum.$ordinal(kind))  {
  case Enum.$ordinal(Kind.A):
  yield  "1";
  case Enum.$ordinal(Kind.B):
  yield  "2";
  case Enum.$ordinal(Kind.C):
  yield  "3";
  case Enum.$ordinal(Kind.D):
  yield  "4";
  case Enum.$ordinal(Kind.E):
  yield  "5";
  case Enum.$ordinal(Kind.F):
  yield  "6";
  case Enum.$ordinal(Kind.G):
  yield  "7";
  case Enum.$ordinal(Kind.H):
  yield  "8";
  case Enum.$ordinal(Kind.I):
  yield  "9";
  case Enum.$ordinal(Kind.J):
  yield  "10";
  case Enum.$ordinal(Kind.K):
  yield  "11";
  case Enum.$ordinal(Kind.L):
  yield  "12";
  case Enum.$ordinal(Kind.M):
  yield  "13";
  case Enum.$ordinal(Kind.N):
  yield  "14";
  case Enum.$ordinal(Kind.O):
  yield  "15";
}
            com.google.gwt.dev.jjs.ast.JSwitchExpression
         [ERROR] at Basic.java(8): Basic.getKind(Kind.A)
            com.google.gwt.dev.jjs.ast.JMethodCall
         [ERROR] at Basic.java(8): Basic.getKind(Kind.A)
            com.google.gwt.dev.jjs.ast.JExpressionStatement
         [ERROR] at Basic.java(7): {
  Basic.getKind(Kind.A);
}
            com.google.gwt.dev.jjs.ast.JBlock
         [ERROR] at Basic.java(7): {
  Basic.getKind(Kind.A);
}
            com.google.gwt.dev.jjs.ast.JMethodBody
         [ERROR] at Basic.java(7): it.pkg.client.Basic.onModuleLoad()V
            com.google.gwt.dev.jjs.ast.JMethod
      [ERROR] Unrecoverable exception, shutting down
com.google.gwt.core.ext.UnableToCompleteException: (see previous log entries)
at com.google.gwt.dev.javac.CompilationProblemReporter.logAndTranslateException(CompilationProblemReporter.java:106)
at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.compilePermutation(JavaToJavaScriptCompiler.java:461)
at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.compilePermutation(JavaToJavaScriptCompiler.java:274)
at com.google.gwt.dev.CompilePerms.compile(CompilePerms.java:198)
at com.google.gwt.dev.ThreadedPermutationWorkerFactory$ThreadedPermutationWorker.compile(ThreadedPermutationWorkerFactory.java:50)
at com.google.gwt.dev.PermutationWorkerFactory$Manager$WorkerThread.run(PermutationWorkerFactory.java:74)
at java.base/java.lang.Thread.run(Thread.java:840)
      [ERROR] Not all permutation were compiled , completed (0/2)

I'm using java 17 with gwt HEAD

Colin Alworth

unread,
Sep 28, 2024, 3:05:53 PM9/28/24
to GWT Contributors
Thanks, can you file that? Optimizations (in this case method inlining) that need to clone a switch-expr _should_ be disabled, but clearly we missed preventing that in at least this case.

Filipe Sousa

unread,
Sep 28, 2024, 3:20:55 PM9/28/24
to GWT Contributors

George Paret

unread,
Oct 15, 2024, 8:22:36 PM10/15/24
to GWT Contributors
I can help with the testing. I have verified that two issues that we are looking forward to having fixed are working as expected with the latest HEAD-SNAPSHOT

P.S. I don't have the permission to email you directly.

Colin Alworth

unread,
Oct 15, 2024, 8:25:54 PM10/15/24
to GWT Contributors
Thanks George - my email is co...@vertispan.com for you and anyone else interested here.

We don't have enough Windows testers at this time - if anyone else is able to test for Windows (or other platform), I'd appreciate an hour or two of your time.

There is still one more switch-expression bug that needs fixing, we have a few contributors who will test after I make that fix, then we'll start the release process.

-Colin

George Paret

unread,
Oct 15, 2024, 11:23:50 PM10/15/24
to GWT Contributors
While testing with our application I have noticed that the mousewheel events are not being fired. The mousewheel handler is added to a FocusPanel using the addMouseWheelHandler method. Other events such as mouse up/down, mouse move etc. are being fired correctly from the same panel.

Daniel Portmann

unread,
Oct 16, 2024, 3:45:38 AM10/16/24
to GWT Contributors
Hi, we can assist with testing GWT 2.12.

Actually, we did some successful testing with our app (RPC based) using a snapshot a few weeks ago:
No compilation issues, app worked as expected. Well done!

We build our application on Windows (Dev) and Linux (CI/Prod) and run it on Windows using Edge/Chrome.

But I guess it makes sense to re-test at some point with the latest merges to master.

Regards, Danil

George Paret

unread,
Oct 16, 2024, 7:19:01 PM10/16/24
to GWT Contributors
The mousewheel event handler issue we were seeing is related to our application code. We were overriding the DOMImpl class and registering the mousewheel handler under "mousewheel" instead of "wheel". The GWT 2.12 code itself is fine.
Reply all
Reply to author
Forward
0 new messages