Imagine  your favorite statically compiled language's compiler treated
certain classes of statically determinable semantic errors differently
than normal. Instead of erroring out with a useful message, the
compiler simply injects code in the offending location that will cause
an error at runtime. The runtime error will not provide a useful stack
trace, nor will it provide any information to the cause of the error.
Now imagine that your compiler take several minutes to compile your
program, so that when you encounter the error at runtime you have to
guess what went wrong at compile time, modify your code, recompile,
and after several minutes re-run your application to see if the error
is still present.

Such a compiler would be ludicrous, yet this appears to be exactly
what the GWT compiler does. It knows that I as a user marked a
particular class as IsSerializable. It knows that I am using this
class as part of an RPC interface. It knows that it will not or cannot
actually compile code to serialize the object at runtime. And yet, the
compiler moves on and compiles the code in such a way that a useless
error message will display at runtime when the RPC is invoked. Even if
I set the log level to ALL, I get no information from the compiler's
output that I couldn't get by inspecting the produced gwt.rpc
whitelist file manually.

Why does the gwt 2.0 compiler not error out automatically with a
useful message in this scenario? I can't think of any situation where
the current behavior is desirable. Also, why is no useful diagnostic
information ever given when the scenario occurs even with full logging
enabled?

I have searched the Internet for a long time for an answer to this and
have not found an answer. I have also wasted a significant number of
hours playing a guessing game when my classes aren't serializable. I
feel like every time I create a new RPC, after potentially hours of
painful debugging I find a new reason for the gwt compiler to fail
silently.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to