I don't think APT is good enough. Java8 has a compiler plugin API for
code-gen that might work. APT has limitations that make it problematic to
replace generators. Stephen Haberman brought this up at the GWT meetup.


On Fri, Aug 9, 2013 at 4:16 PM, Goktug Gokdogan <[email protected]> wrote:

I think in the long-run we should separate the two concepts that is being
tackled by GWT.create today.

First purpose is the class replacement, especially used by permutations. I
think this one should not have anything to do with GWT.create. We can do
any class replacement in compiler without requiring a call to GWT.create.
This is similar to super-sourcing and can be solved similar and perhaps
together.

Second purpose is for triggering generators and what most of the proposal
are about.

As Roberto and perhaps others have been bringing up, it is best to follow
regular java code generation practices in GWT.

That means for the long-term we can mostly rely on AnnotationProcessors.
There are many advantages of that:
  1. Not GWT only - continue sharing code with server (JRE), client(GWT)
and mobile(Android).
  2. IDE support: IDE can trigger codegen (esp. for debugging)
  3. Parallelizing the compilation and ease moving from JDT into java 8
compiler plugin.
  4. Reusing knowledge from java world and lower the barrier for entry to
generators.


With that move, deferred binding definition for code generator can be just
about providing the naming conventions such as "<class_name>
-> <class_name>$Generated".
Based on the rule, when the compiler sees GWT.create(A.class), it can be
turned into "new A$Generated()" and expect the generated code to be there.

The reason I'm bringing this up is; for any proposal I think it is best to
keep it feasible w.r.t this aspect and not push us into a corner for the
long run.


On Fri, Aug 9, 2013 at 1:24 PM, Brian Slesinsky <[email protected]> wrote:

Hi, I've published a document [1] with my thoughts on some of the
GWT.create() proposals. This doesn't cover everything we've discussed but I
think it's a start. If you're on this mailing list you should be able to
comment.

- Brian

[1]
https://docs.google.com/document/d/1MDqiBEMl7dylYliAceLBBxGFAlSvkQB9b-kSlnKmZBk/edit?disco=AAAAAGXMcRI#

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors
---
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


 --
http://groups.google.com/group/Google-Web-Toolkit-Contributors
---
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to