Monday, March 7, 2016

Re: Compiling only what is needed to run?

Annoting the second method with @GwtIncompatible fixed the problem indeed, good to know, thank you. And I noticed it could work at different levels (class, method and field).

But this was a trivial example, my initial question was about third-party java libraries and I can't modify the code in this case...

The java (bytecode) to javascript transpiler I used could remove dead code even on code it couldn't compile, this allowed me to use some third-party libraries even if some parts (that I didn't use) couldn't compile.

But I get better performance with GWT (on both javascript code size and execution speed) so I would like to continue with GWT.

It would be great if we had an option to tell GWT to not fail on compilation errors but automatically mark non compiling code as @GwtIncompatible.
Is it a possible enhancement I can submit?

So for now, the only way to use thrid-party libraries that don't compile as is with GWT (even if the problem is in a part that I don't use) is to copy the sources and then patch them with @GwtIncompatible annotations?

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment