Re: GWT CustomFieldSerializer Recursivity

2013-01-07 Thread Brandon Donnelson
Sounds good. Once I saw where the white list .gwt.rpc was getting built 
this made more sense. Its probably splitting hairs optimizing for that 
recursion :)

On Sunday, January 6, 2013 4:30:32 AM UTC-8, Thomas Broyer wrote:



 On Wednesday, January 2, 2013 6:39:47 PM UTC+1, Thomas Broyer wrote:



 On Wednesday, January 2, 2013 6:16:36 PM UTC+1, Brandon Donnelson wrote:

 Good point, but I don't think that's it. I walked the code several 
 finding the loop on it self here: 
 http://code.google.com/searchframe#T04cSGC7sWI/trunk/user/src/com/google/gwt/user/server/rpc/impl/SerializabilityUtil.javaq=SerializabilityUtil%20package:google-web-toolkit%5C.googlecode%5C.coml=870


 That indeed looks strange (I haven't looked closely at the code though).


 I looked a bit more at it and there's actually nothing that strange here. 
 One could say the code could be better optimized but that's it.
 This method is used to generate a signature for a type that will change 
 whenever its serialization changes. When a type has no 
 CustomFieldSerializer, its fields are used; otherwise, because we cannot 
 tell which fields will be serialized, the signature for the type is the 
 signature for its CustomFieldSerializer. That's the reason for the 
 recursive call. It's not expected then that the CustomFieldSerializer 
 itself has a CustomFieldSerializer. If you want to make it better, then add 
 a boolean argument to the method to tell whether a CustomFieldSerializer 
 should be used or not (or maybe split the method in two), so that when 
 computing the signature for the CustomFieldSerializer we don't look for the 
 CustomFieldSerializer's CustomFieldSerializer.


-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/qWnY84yIuRUJ.
To post to this group, send email to google-web-toolkit@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.



Re: GWT CustomFieldSerializer Recursivity

2013-01-06 Thread Thomas Broyer


On Wednesday, January 2, 2013 6:39:47 PM UTC+1, Thomas Broyer wrote:



 On Wednesday, January 2, 2013 6:16:36 PM UTC+1, Brandon Donnelson wrote:

 Good point, but I don't think that's it. I walked the code several 
 finding the loop on it self here: 
 http://code.google.com/searchframe#T04cSGC7sWI/trunk/user/src/com/google/gwt/user/server/rpc/impl/SerializabilityUtil.javaq=SerializabilityUtil%20package:google-web-toolkit%5C.googlecode%5C.coml=870


 That indeed looks strange (I haven't looked closely at the code though).


I looked a bit more at it and there's actually nothing that strange here. 
One could say the code could be better optimized but that's it.
This method is used to generate a signature for a type that will change 
whenever its serialization changes. When a type has no 
CustomFieldSerializer, its fields are used; otherwise, because we cannot 
tell which fields will be serialized, the signature for the type is the 
signature for its CustomFieldSerializer. That's the reason for the 
recursive call. It's not expected then that the CustomFieldSerializer 
itself has a CustomFieldSerializer. If you want to make it better, then add 
a boolean argument to the method to tell whether a CustomFieldSerializer 
should be used or not (or maybe split the method in two), so that when 
computing the signature for the CustomFieldSerializer we don't look for the 
CustomFieldSerializer's CustomFieldSerializer.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/5PvdRqtiRvkJ.
To post to this group, send email to google-web-toolkit@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.



Re: GWT CustomFieldSerializer Recursivity

2013-01-02 Thread Colin Alworth
It looks like it thinks you are sending the CustomFieldSerializer itself 
over the wire, so wants to find a serializer serializer... The extra 
prefixed package name com.google.gwt.user.client.rpc.core indicates that 
it wasn't able to find your field serializer in the normal package where it 
should be - consider knocking off that part and just make a com.googlecode.
objectify.impl.ref.StdRef_CustomFieldSerializer with the appropriate static 
methods.

In my brief re-read, I'm not seeing anywhere where the serializer gets 
passed in as a class to find another serializer for it - this fits with my 
previous experience where you just create a serializer and let RPC invoke 
it, no questions asked.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/tJjbxzgYxeUJ.
To post to this group, send email to google-web-toolkit@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.



Re: GWT CustomFieldSerializer Recursivity

2013-01-02 Thread Brandon Donnelson
Good point, but I don't think that's it. I walked the code several finding 
the loop on it self 
here: 
http://code.google.com/searchframe#T04cSGC7sWI/trunk/user/src/com/google/gwt/user/server/rpc/impl/SerializabilityUtil.javaq=SerializabilityUtil%20package:google-web-toolkit%5C.googlecode%5C.coml=870
 
and the second time around it gets reset 
here: 
http://code.google.com/searchframe#T04cSGC7sWI/trunk/user/src/com/google/gwt/user/server/rpc/impl/SerializabilityUtil.javaq=SerializabilityUtil%20package:google-web-toolkit%5C.googlecode%5C.coml=376

I don't have the *_CustomFieldSerializer in the translatable path either so 
it wouldn't be able to sent over the wire. But this I've found is only half 
of the recipe and  just checking the signature. So I'm looking at the 
generator or serialization oracle. 

Brandon

On Wednesday, January 2, 2013 7:38:36 AM UTC-8, Colin Alworth wrote:

 It looks like it thinks you are sending the CustomFieldSerializer itself 
 over the wire, so wants to find a serializer serializer... The extra 
 prefixed package name com.google.gwt.user.client.rpc.core indicates that 
 it wasn't able to find your field serializer in the normal package where it 
 should be - consider knocking off that part and just make a com.googlecode.
 objectify.impl.ref.StdRef_CustomFieldSerializer with the appropriate 
 static methods.

 In my brief re-read, I'm not seeing anywhere where the serializer gets 
 passed in as a class to find another serializer for it - this fits with my 
 previous experience where you just create a serializer and let RPC invoke 
 it, no questions asked.


-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/vo66cUkmZZwJ.
To post to this group, send email to google-web-toolkit@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.



Re: GWT CustomFieldSerializer Recursivity

2013-01-02 Thread Thomas Broyer


On Wednesday, January 2, 2013 6:16:36 PM UTC+1, Brandon Donnelson wrote:

 Good point, but I don't think that's it. I walked the code several finding 
 the loop on it self here: 
 http://code.google.com/searchframe#T04cSGC7sWI/trunk/user/src/com/google/gwt/user/server/rpc/impl/SerializabilityUtil.javaq=SerializabilityUtil%20package:google-web-toolkit%5C.googlecode%5C.coml=870


That indeed looks strange (I haven't looked closely at the code though).
 

 and the second time around it gets reset here: 
 http://code.google.com/searchframe#T04cSGC7sWI/trunk/user/src/com/google/gwt/user/server/rpc/impl/SerializabilityUtil.javaq=SerializabilityUtil%20package:google-web-toolkit%5C.googlecode%5C.coml=376


I don't see anything strange or wrong here.
 

 I don't have the *_CustomFieldSerializer in the translatable path either


That's a mistake: the *_CustomFieldSerializer is used both on client and 
server side.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/JuPMSInqSrkJ.
To post to this group, send email to google-web-toolkit@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.