Module property and deferred binding not evaluated correctly after recompile in super dev mode (SDM)

129 views
Skip to first unread message

Robert Hoffmann

unread,
Mar 1, 2015, 6:48:02 AM3/1/15
to google-we...@googlegroups.com
I am using super dev mode (SDM) with GWT 2.7.0.

I use the following module code to create a new property (user.agent.ie8) based on the user.agent property:
>>
    <!-- !!! define a pure ie8 variable (no fallback from ie9) -->

    <define-property name="user.agent.ie8" values="true,false"/>

    <set-property name="user.agent.ie8" value="false"/>

    <set-property name="user.agent.ie8" value="true">
        <any>
            <when-property-is name="user.agent" value="ie8" />
        </any>
    </set-property>
<<

Testing this from IE8:

When I clean and compile the entire module the following deferred binding (based on the new property) works:
>>
    <replace-with class="com.example.SelectionFactoryImplIElt9">
        <when-type-is class="com.example.SelectionFactory"/>
        <any>
            <when-property-is name="user.agent" value="ie6" />
            <when-property-is name="user.agent.ie8" value="true" />
        </any>
    </replace-with>
<<

However, when I then start SDM and recompile. The above deferred binding fails (SelectionFactory is not replaced with the IE8 version). 

In both situations I made sure that user.agent is indeed ie8. Also the SDM log states "binding: user.agent=ie8".

I would be thankful for your input. 
Best regards, Robert


Jens

unread,
Mar 1, 2015, 7:47:48 AM3/1/15
to google-we...@googlegroups.com
Please try GWT 2.8-SNAPSHOT. 

If I remember correctly there were some commits regarding permutation properties and SDM recompiles after 2.7 has been released.

-- J.

Robert Hoffmann

unread,
Mar 2, 2015, 10:09:08 AM3/2/15
to google-we...@googlegroups.com
Yes. GWT 2.8.0-SNAPSHOT fixes this problem!

However under 2.7.0 I was using com.google.gwt.dev.codeserver.CodeServer with the -src attribute. Is there a way to include external source paths with the new SDM ?

Thank you 
Robert

Thomas Broyer

unread,
Mar 2, 2015, 10:51:06 AM3/2/15
to google-we...@googlegroups.com


On Monday, March 2, 2015 at 4:09:08 PM UTC+1, Robert Hoffmann wrote:
Yes. GWT 2.8.0-SNAPSHOT fixes this problem!

However under 2.7.0 I was using com.google.gwt.dev.codeserver.CodeServer with the -src attribute. Is there a way to include external source paths with the new SDM ?

What do you mean by "new SDM"? Isn't it basically the same between 2.7 and 2.8? (I don't remember seeing any major change land in the codebase)
In other words, CodeServer with -src should work just as well; just remember to also use -launcherDir (as in 2.7 BTW).
There's no equivalent to -src with DevMode though, everything has to be put in the classpath.

Robert Hoffmann

unread,
Mar 2, 2015, 11:14:41 AM3/2/15
to google-we...@googlegroups.com
This is the output I get when launching SDM from IntelliJ IDEA (14):

>>
Unknown argument: -launcherDir

Google Web Toolkit 2.8.0-SNAPSHOT
DevMode [-[no]startServer] [-port port-number | "auto"] [-logdir directory] [-logLevel (ERROR|WARN|INFO|TRACE|DEBUG|SPAM|ALL)] [-gen dir] [-bindAddress host-name-or-address] [-codeServerPort port-number | "auto"] [-[no]superDevMode] [-server servletContainerLauncher[:args]] [-startupUrl url] [-war dir] [-deploy dir] [-extra dir] [-modulePathPrefix ] [-workDir dir] [-XmethodNameDisplayMode (NONE|ONLY_METHOD_NAME|ABBREVIATED|FULL)] [-sourceLevel [auto, 1.7, 1.8]] [-XjsInteropMode (NONE|JS)] [-[no]incremental] [-setProperty name=value,value...] module[s]

where
  -[no]startServer         Starts a servlet container serving the directory specified by the -war flag. (defaults to ON)
  -port                    Specifies the TCP port for the embedded web server (defaults to 8888)
  -logdir                  Logs to a file in the given directory, as well as graphically
  -logLevel                The level of logging detail: ERROR, WARN, INFO, TRACE, DEBUG, SPAM or ALL (defaults to INFO)
  -gen                     Debugging: causes normally-transient generated types to be saved in the specified directory
  -bindAddress             Specifies the bind address for the code server and web server (defaults to 127.0.0.1)
  -codeServerPort          Specifies the TCP port for the code server (defaults to 9997 for classic Dev Mode or 9876 for Super Dev Mode)
  -[no]superDevMode        Runs Super Dev Mode instead of classic Development Mode. (defaults to ON)
  -server                  Specify a different embedded web server to run (must implement ServletContainerLauncher)
  -startupUrl              Automatically launches the specified URL
  -war                     The directory into which deployable output files will be written (defaults to 'war')
  -deploy                  The directory into which deployable but not servable output files will be written (defaults to 'WEB-INF/deploy' under the -war directory/jar, and may be the same as the -extra directory/jar)
  -extra                   The directory into which extra files, not intended for deployment, will be written
  -modulePathPrefix        The subdirectory inside the war dir where DevMode will create module directories. (defaults empty for top level)
  -workDir                 The compiler's working directory for internal use (must be writeable; defaults to a system temp dir)
  -XmethodNameDisplayMode  EXPERIMENTAL: Specifies method display name mode for chrome devtools: NONE, ONLY_METHOD_NAME, ABBREVIATED or FULL (defaults to NONE)
  -sourceLevel             Specifies Java source level (defaults to 1.7)
  -XjsInteropMode          EXPERIMENTAL: Specifies JsInterop mode: NONE or JS (defaults to NONE)
  -[no]incremental         Compiles faster by reusing data from the previous compile. (defaults to ON)
  -setProperty             Set the values of a property in the form of propertyName=value1[,value2...].
and
  module[s]                Specifies the name(s) of the module(s) to host
<<


To add to the confusion, the documentation at http://www.gwtproject.org/articles/superdevmode.html mentions for exmple the allowMissingSrc attribute which is not listed above either.

Thank you,
Robert
--
You received this message because you are subscribed to a topic in the Google Groups "Google Web Toolkit" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-web-toolkit/52jV7ORx3UI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-web-tool...@googlegroups.com.
To post to this group, send email to google-we...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Thomas Broyer

unread,
Mar 2, 2015, 11:20:19 AM3/2/15
to google-we...@googlegroups.com
DevMode vs. CodeServer.
To unsubscribe from this group and all its topics, send an email to google-web-toolkit+unsub...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Message has been deleted

Robert Hoffmann

unread,
Mar 2, 2015, 5:21:07 PM3/2/15
to google-we...@googlegroups.com
Ok. Just for the record. 

The GWT plugin that comes with IntelliJ 14 does not use CodeServer. It does have a "Super Dev Mode" option, but then does not allow any extra parameters like launchDir or src. http://stackoverflow.com/a/27571401/1417396

Most importantly however the deferred binding bug described in this topic, is solved in GWT 2.8.0-SNAPSHOT. 
Reply all
Reply to author
Forward
0 new messages