anne / google-gin

Automatically exported from code.google.com/p/google-gin
Apache License 2.0
0 stars 0 forks source link

Hosted Mode Refresh support #52

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Make any changes to your gin module or rename a module (in hosted mode)
2. Press refresh

What is the expected output? What do you see instead?
Expecting updated gin module. Instead gin picks up the old module or in
case of a rename the TypeOracle crashes when resolving the GinModules
annotation.

What version of the product are you using? On what operating system?
Doesn't matter.

Please provide any additional information below.
It is a ClassLoader related issue discussed
http://groups.google.com/group/Google-Web-Toolkit-Contributors/browse_thread/thr
ead/4a6b9b1d7f0e80a4

I'd like to see this fixed since it will allow me to do rebind time modules.

Original issue reported on code.google.com by alen_vre...@yahoo.com on 2 Aug 2009 at 12:52

GoogleCodeExporter commented 8 years ago
Just to be clear, after the IHM changes(gwt) are committed, will post a patch 
for gwt
and gin.

Original comment by alen_vre...@yahoo.com on 2 Aug 2009 at 8:18

GoogleCodeExporter commented 8 years ago
GWT 2.0 is out with OOPHM. Are there any changes of posting the patch you 
mentioned
in time for 1.0 ?

Original comment by robert.munteanu on 17 Dec 2009 at 1:45

GoogleCodeExporter commented 8 years ago
Been bogged down in unix programming. Anyway:

Afaik IHM isn't complete yet[1]. I will have some free time at the end of this 
week. 
Will take a look and prepare some revised patched then.

I have the following in mind
o) Make a patch for GIN that enables the hosted mode refresh support if 
getTypeOracleClassLoader() exist.
o) Make a patch for GWT that enables to get the type oracle class loader. Will 
open 
an issue on the gwt issue tracker for this and post the patch there.

HTH

[1] http://code.google.com/p/google-web-toolkit/issues/detail?id=847

Original comment by alen_vre...@yahoo.com on 21 Dec 2009 at 4:01

GoogleCodeExporter commented 8 years ago
Finally had some time to spare. Here goes:

o) I've opened an issue for gwt to allow generators to access the freshly 
compiled
class definitions

http://code.google.com/p/google-web-toolkit/issues/detail?id=4433

o) Here is a patch for GIN. It only works with patched GWT. I don't expect any 
of
this to hit the mainstream anytime soon.

Basically there is GinRefreshEnabledClassLoader which merges Gin and your 
client code
to allow for Gin to see the latest code changes.

Besides the special class loader the code changes are minimal to GIN
-the BindingProcessor gets the @GinModules from the special CL
-the KeyUtil uses the special CL instead of the regular one.

I've only tested this on the provided example project. Feel free to take the 
things
from here.

Original comment by alen_vre...@yahoo.com on 3 Jan 2010 at 12:03

Attachments: