steffenschaefer/gwt-gradle-plugin

GWT Compiler options are outdated

Closed this issue · 2 comments

I try to configure this plug-in to use the below configuration in a GWT 2.7.0 project:
...
compiler {
...
disableCastChecking = true;
}

As per the GWT 2.7.0 docs I expected this plug-in to emit "-XnocheckCasts" to the gwt compiler.
Apparently this is not happening. When I pulled the master branch, I see that the options it supports in AbstractGwtCompile.java are way outdated! Most of the options are not even in GWT 2.6.1! Specifically, it seems that this plugin emits "-XdisableCastChecking", which is not even documented in GWT 2.6.x or GWT 2.7. After I switched to GWT 2.7.0, I started getting some class cast exceptions, which I suspects is because GWT 2.7.0 does not support -XdisableCastChecking and this plugin keeps using this option.

Please explain:

  1. Is this plugin going to support the full set of option in GWT 2.7.0 compiler, superdev, etc any time soon.
  2. Am I looking at the correct place for the compiler options?
  3. How can I make the compiler take -XnocheckCasts with the current version 0.5 of this plugin?

Thanks.

GWT 2.7 supports all old versions of renamed flags. You can look at the GWT 2.7 ArgHandler for -XdisableCastChecking.

By now the plugin only supports (beacuse of compatibility concerns) the old flags which are supported by all GWT 2.x versions.

I plan to implement bigger changes after the next version is released (expect it in the next couple of days) to support properties for all old and new flag names (with the ability to automatically emit the flags depending on the GWT version). To make this possible I have to:

  1. Change the way how the plugin handles Flags and properties (e.g. get rid of ConventionMappings)
  2. enforce that users always set a gwtVersion even if they don't use automatic dependency management
  3. solve more version-dependent stuff

So this isn't trivial. That's why the next version (0.6) will only support properties named equal to the old flags. Version 0.6 only implements new flags added in GWT 2.7 (and 2.6). But as GWT supports the old flags, it shouldn't be a problem.

Thanks