Can you get the compiler to list the permutations?

334 views
Skip to first unread message

Martin Hutchinson

unread,
Oct 29, 2009, 2:01:28 PM10/29/09
to Google Web Toolkit
To speed up development I've tried to cut down the number of
permutations that are compiled by fixing the language and user agent.
I'm curious as to why I can't get the number of permutations down to
1, even when fixing the user agent to "gecko" and the language to
"en". I've tried to increase the compiler output from INFO to TRACE,
but the sheer volume of output makes it hard to pick out the important
bits.

This is the .gwt.xml for the module, if this helps shed any light:

<module rename-to="viewer">

<!-- Other modules that we depend on. -->
<inherits name='com.google.gwt.user.User'/> <!-- Core GWT -->
<inherits name="com.google.gwt.i18n.I18N"/> <!--
Internationalization -->
<inherits name='com.gwtext.GwtExt'/> <!-- GWT-Ext -->
<inherits name="com.gwtextux.GwtExtUxNoScript"/> <!-- GWT-Ext Ux --
>

<inherits name="com.allen_sauer.gwt.log.gwt-log" /> <!-- GWT
logging -->

<entry-point class='com.example.MyGWTApplication'/>

<source path="client"/>
<source path="shared"/>
<source path="formatting"/>
<source path="rpc"/>
<source path="serialization"/>
<source path="servlets"/>
<source path="utils"/>

<extend-property name="locale" values="en"/>

<extend-property name="log_level" values="OFF" />

<!-- For dev only: only support FireFox. This speeds up
compilation -->
<set-property name="user.agent" value="gecko" />

</module>

Sripathi Krishnan

unread,
Oct 30, 2009, 10:26:13 PM10/30/09
to google-we...@googlegroups.com
We are using all the modules except the GwtExt ones, and are able to get down to a single permutation - so it is likely that the permutations are caused by something over there.

You could try opening up the .gwt.xml for the GWT EXT modules and see if they have any <replace-with> statements. That would throw light on what properties are driving the permutations.

You could also pass in the -style PRETTY to gwtc, and then look at the generated <module>/<module>.nocache.js file. It usually has a map from  various properties (user agent, language, and your mysterious parameter) to the strong, MD5 file name. By inspecting the table, you should be able to figure out what is causing the extra permutations. This is how the map looks on my machine --

    try {
      unflattenKeylistIntoAnswers(['opera'], '34478C007220DB07F52AB22169457501');
      unflattenKeylistIntoAnswers(['ie6'], '872904FEB2B0C8ABFEEF5D761EE7FEF4');
      unflattenKeylistIntoAnswers(['safari'], 'B30F09E1C9B5B042E928F79F73C1C79B');
      unflattenKeylistIntoAnswers(['gecko1_8'], 'B712029A53D248F96310715A52A54CBA');
      unflattenKeylistIntoAnswers(['gecko'], 'BAAA33CCD5FA4984C7DB8207E830D268');
      unflattenKeylistIntoAnswers(['ie8'], 'C1B0450CB888E93E17495AEDAE49EB45');
      strongName = answers[computePropValue('user.agent')];
      initialHtml = strongName + '.cache.html';
    }
     catch (e) {
      return;
    }


--Sri


2009/10/29 Martin Hutchinson <mhutc...@gmail.com>

Martin Hutchinson

unread,
Nov 3, 2009, 6:20:25 AM11/3/09
to Google Web Toolkit
Thanks for the hint about looking in the .nocache.js file. My
permutations were caused by:

<extend-property name="locale" values="en"/>

This actually tried to compile "default" and "en". Removing this line
works in our application as we only have language bundles in English
at the moment.

Martin

On Oct 31, 2:26 am, Sripathi Krishnan <sripathi.krish...@gmail.com>
wrote:
> 2009/10/29 Martin Hutchinson <mhutchin...@gmail.com>

Thomas Broyer

unread,
Nov 3, 2009, 6:55:00 AM11/3/09
to Google Web Toolkit


On 3 nov, 12:20, Martin Hutchinson <mhutchin...@gmail.com> wrote:
> Thanks for the hint about looking in the .nocache.js file.  My
> permutations were caused by:
>
> <extend-property name="locale" values="en"/>
>
> This actually tried to compile "default" and "en".  Removing this line
> works in our application as we only have language bundles in English
> at the moment.

You could have used <set-property name="locale" value="en" /> too,
just like you used <set-property name="user.agent" value="gecko" />
already (er, gecko is for Firefox pre-1.5, only needed for the linux
hosted mode actually, use gecko1_8 for any real use of Firefox)
Reply all
Reply to author
Forward
0 new messages