Upgrade 2.7 beta1 to rc1 - browser refresh and change detection not working

176 views
Skip to first unread message

Matic Petek

unread,
Oct 30, 2014, 10:43:25 AM10/30/14
to google-web-tool...@googlegroups.com
Hi,
  I have just update to RC1 and now if I click refresh button (Chrome), code change on disk is not detected and recompile (increment compile) is not performed. We also have "compile" link on our start page to perform SDM recompile (base on Brien suggestion from GWT.create) and it still works - recompile is done with increment compile. 
  Any idea how to debug what's wrong? Thank you.
Regards,
  Matic

Jens

unread,
Oct 30, 2014, 11:40:50 AM10/30/14
to google-web-tool...@googlegroups.com
I assume you have deployed an old <module>.nocache.js file. Try a clean start by deleting your /war/<modulename> folder and restart DevMode. A new <module>.nocache.js file should be generated (could take a bit as the CodeServer needs to start before this file gets generated) which automatically recompiles your app each time you refresh the browser.

-- J

Colin Alworth

unread,
Oct 30, 2014, 11:43:14 AM10/30/14
to google-web-tool...@googlegroups.com
It is also possible that there is a stale copy of .java resources on your classpath, such as in target/classes/ for a maven project - we've seen that get in the way as well. Make sure that either target/classes/ isn't on your classpath, or that it doesn't have another (stale) copy of whatever you are trying to compile.
On Thu Oct 30 2014 at 10:40:52 AM Jens <jens.ne...@gmail.com> wrote:
I assume you have deployed an old <module>.nocache.js file. Try a clean start by deleting your /war/<modulename> folder and restart DevMode. A new <module>.nocache.js file should be generated (could take a bit as the CodeServer needs to start before this file gets generated) which automatically recompiles your app each time you refresh the browser.

-- J

--
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 google-web-toolkit-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit-contributors/0254ed3a-fbff-4b8f-b7f3-31997d32c2d4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Message has been deleted

Matic Petek

unread,
Oct 30, 2014, 4:26:21 PM10/30/14
to google-web-tool...@googlegroups.com
Jens & Colin
  Thank you for your help. The problem is really module.nocache.js file (or batter - generated js files), the behaviour is for my a litter strange :
1) my Ant file looks like this :
<target name="superdevmode_main" depends="javac" description="Run Super Dev Mode">
<java failonerror="true" fork="true" classname="com.google.gwt.dev.codeserver.CodeServer">
                    ...........................................
    <arg value="-workDir"/>
    <arg value="./war"/>
    <arg value="com.mycompany.mymodule"/>  
</java>
</target>
Because I set "workDir" parameter, I think at first startup I should get "mymodule" folder inside "war" folder and two basic files (mymodule.nocache.js, mymodule.recompile.nocache.js) for first startup. Unfortunately I still get temporary folder "com.mycompany.mymodule/compile-1/...." with expected files. No /war/mymodule/ folder.
2) OK, I manually copy "com.mycompany.mymodule/compile-1/war/mymodule/*" into /war/mymodule/
3) We are using ImageBundle and we need image sprite files. That is why I copy "com.mycompany.mymodule/compile-2/war/mymodule/*" into /war/mymodule/ and now browser refresh has stop working.

Two thinks in upper description does not compute for me :
(1) why *.js files are not generated in "workDir" folder
(3) if I copy *.js files from after increment compile folder into "/war/mymodule/", whay browser refresh has stop working.

Thank you,
  Regards,
  Matic

On Thursday, October 30, 2014 4:43:14 PM UTC+1, Colin Alworth wrote:
It is also possible that there is a stale copy of .java resources on your classpath, such as in target/classes/ for a maven project - we've seen that get in the way as well. Make sure that either target/classes/ isn't on your classpath, or that it doesn't have another (stale) copy of whatever you are trying to compile.
On Thu Oct 30 2014 at 10:40:52 AM Jens <jens.ne...@gmail.com> wrote:
I assume you have deployed an old <module>.nocache.js file. Try a clean start by deleting your /war/<modulename> folder and restart DevMode. A new <module>.nocache.js file should be generated (could take a bit as the CodeServer needs to start before this file gets generated) which automatically recompiles your app each time you refresh the browser.

-- J

--
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 google-web-toolkit-contributors+unsubscribe@googlegroups.com.

Jens

unread,
Oct 30, 2014, 4:38:02 PM10/30/14
to google-web-tool...@googlegroups.com
Instead of -workDir you should use -launcherDir which contains all public resources (from your public folders) as well as the generated nocache.js file. -workDir is just for temporary files for each recompile.

If you use DevMode class instead of CodeServer then the DevMode class configures -launcherDir to the same value as DevMode -war.


-- J.

Matic Petek

unread,
Oct 31, 2014, 3:00:02 AM10/31/14
to google-web-tool...@googlegroups.com
Jens,
  Thank you. Now it's working. SDM documentation should really be updated - http://www.gwtproject.org/articles/superdevmode.html
Regards,
  Matic

Daniel Kurka

unread,
Oct 31, 2014, 7:25:31 AM10/31/14
to google-web-tool...@googlegroups.com
I added a tracking item for updating SDM docs before 2.7.0

--
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 google-web-toolkit-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit-contributors/4ed14921-e5b5-49e8-9426-ebb22a967b21%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Google Germany GmbH
Dienerstr. 12
80331 München

Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Geschäftsführer: Graham Law, Katherine Stephens

Seamus McMorrow

unread,
Oct 31, 2014, 8:22:38 AM10/31/14
to google-web-tool...@googlegroups.com
With SDM, when using the -noserver argument. 
Do we have to manually run the SDM code server, and continue to use the bookmarklets?

This would be helpful information in the docs also.


On Friday, 31 October 2014 11:25:31 UTC, Daniel Kurka wrote:
I added a tracking item for updating SDM docs before 2.7.0
On Fri, Oct 31, 2014 at 8:00 AM, Matic Petek <matic...@gmail.com> wrote:
Jens,
  Thank you. Now it's working. SDM documentation should really be updated - http://www.gwtproject.org/articles/superdevmode.html
Regards,
  Matic

On Thursday, October 30, 2014 9:38:02 PM UTC+1, Jens wrote:
Instead of -workDir you should use -launcherDir which contains all public resources (from your public folders) as well as the generated nocache.js file. -workDir is just for temporary files for each recompile.

If you use DevMode class instead of CodeServer then the DevMode class configures -launcherDir to the same value as DevMode -war.


-- J.

--
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 google-web-toolkit-contributors+unsubscribe@googlegroups.com.

Jens

unread,
Oct 31, 2014, 10:05:29 AM10/31/14
to google-web-tool...@googlegroups.com
With SDM, when using the -noserver argument. 
Do we have to manually run the SDM code server, and continue to use the bookmarklets?

DevMode -noserver means that no embedded Jetty server will be started to serve your war directory. It will still start the SDM CodeServer and put a special <module>.nocache.js file into your DevMode -war directory which supports recompiles on page refresh. So with -noserver you must deploy your app on your own.

-- J.

Thomas Broyer

unread,
Oct 31, 2014, 10:45:58 AM10/31/14
to google-web-tool...@googlegroups.com
In other words, DevMode with -noserver is the same as CodeServer with -launcherDir (and -noprecompile), with -launcherDir set to the same value as DevMode's -war.
…then CodeServer with -launcherDir means the bookmarklets are no longer needed (provided your browser loads the *.nocache.js that's been generated into the -launcherDir)
Reply all
Reply to author
Forward
0 new messages