Wednesday, September 3, 2014

Strange error while compiling with 2.7.0 snapshot

Hi there,

I thought I could give GWT 2.7.0 a try and downloaded the latest snapshot builds.

When I try to compile my project (which uses GWT-RPC) with the new jars strange compile errors come up.

In essence I have an abstract baseclass (TransferEvent) and some subclasses of that class (ATransferEvent, BTransferEvent...). My remoteservice accepts a list (wrapped within another object) of those events as a parameter. All of the mentioned classes have a standard constructor and are Serializable. All of them are directly within my project. TransferEvent has 2 primitive fields, 1 static enum and 1 transient field.

Upon compiling the first subclass (let's say ATransferEvent) the compiler complains about not finding the TransferEvent baseclass ("The type TransferEvent cannot be resolved. It is indirectly referenced from required .class files"). And as a consequence he claims he cannot find the serialize(SerializationStreamWriter, ATransferEvent) method within TransferEvent_FieldSerializer. I think that's because of an unknown child relationship between ATransferEvent and TransferEvent. The funny thing is that the compiler generated a TransferEvent_FieldSerializer so he seems to know the baseclass very well. But even for the TransferEvent_FieldSerializer class he complains about not knowing TransferEvent. And that error is printed out considerably later in the log.

I tried to reproduce the problem with a small testcase and similar relationships. That compiled fine. Sadly I'm not able to post the project (If needed I have to strip down the project). The project compiles fine with GWT 2.6.

Is it a question of compile order? Is it possible to print out the exploded compile path to find out why he cannot find the class (-logLevel TRACE and -strict seem to be not enough)?

Best regards
Klemens Schrage

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" 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 http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment