Tuesday, December 5, 2017

Re: Strange elemental 2 behavior and weird workaround

I frequently have these problems too.

One situation where it always pops up is when I am using UiBinder.
I start our with a plain ui.xml file which does not contain a ui:Style tag.
Just access the application in the browser so that it gets compiled to JS.

Then I add an <ui:Style> tag with some custom styling and I reload my browser.
The second incremental compilation is broken.
The only solution is to clear the cache and then it works again.



On Tue, Dec 5, 2017 at 12:03 PM Peter Donald <peter@realityforge.org> wrote:
We have experienced this a bit and have a custom script to clean out
the cache although it seems we could have just used the SDM UI.

However the most frequent place we find this is on inline lambdas.
i.e. Something like "doAction( () -> myfunction() );". The lambda will
often end up null after a recompile. Weirdly extracting this out into
a separate variable ala "final Runnable action = () -> myfunction();
doAction(action);" seems to "fix" this or at least reduce the
frequency of this bug so much that we don't notice. We have never
invested the time to track down the exact cause of this.

HTH

On Tue, Dec 5, 2017 at 9:37 PM, Jens <jens.nehlmeier@gmail.com> wrote:
> GWT SuperDevMode only compiles changes (and its dependencies) but sometimes
> it might miss a change which can result in broken code. As you said the only
> workaround is to force a change to the affected method or clean SDM cache
> and rebuild the whole app (click the small clean button on the SDM UI at
> localhost:9876).
>
> Of course it is a bug but without being able to reproduce it, I guess it is
> tough to find and fix.
>
> -- J.
>
> --
> You received this message because you are subscribed to the Google Groups
> "GWT Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-web-toolkit+unsubscribe@googlegroups.com.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> Visit this group at https://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/d/optout.



--
Cheers,

Peter Donald

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment