Thursday, August 6, 2020

Re: GWT permutations / sourceMaps / code splitting

FWIW we tend to have multiple GWT modules that set different settings. So we end up with modules named `com.example.MyAppProd`, `com.example.MyAppDev` and `com.example.MyAppDebug` which all generate to separate paths. It does mean that we move some of the launching logic to html (or more likely just have separate endpoints). We don't have any examples in the wild but you can kinda of imagine it based on modules at https://github.com/react4j/react4j-todomvc/tree/sting/src/main/java/react4j/todomvc

On Thu, Aug 6, 2020 at 4:21 PM Freddy Boucher <freddy.boucher@gmail.com> wrote:
Hi,

I've been compiling my GWT app with both native and emulated stackMode or a long time:
<set-property name="compiler.stackMode" value="native,emulated"/>

I serve by default the native permutations but I can also request the emulated permutations:
<meta name="gwt:property" content="compiler.stackMode=<%=my_var%>">

It's particularly useful to generate stacktrace with exact line number and we use it extensively!

I'd like now to enhance the emulated permutations and embed the sourceMaps something like that:

<set-property name="compiler.stackMode" value="native,emulated"/>
<set-property name="compiler.useSourceMaps" value="true">
<any>
<when-property-is name="compiler.stackMode" value="emulated" />
</any>
</set-property>
<set-configuration-property name="includeSourceMapUrl" value="/extra/ccclight/symbolMaps/__HASH___sourceMap__FRAGMENT__.json"/>

But our GWT app is huge and we use GWT Code splitting.
The issue with the above approach is the sourceMaps not being really useful because most of the code is not mapped properly!



But if I add the collapse-all-properties tag then the sourceMaps works properly and all lines are properly mapped and I can add breakpoint!
But I want to use collapse-all-properties only when compiling the emulated permutations, something like that:

<collapse-all-properties>
<any>
<when-property-is name="compiler.stackMode" value="emulated" />
</any>
</collapse-all-properties>

But GWT does not support it!

[INFO]       [ERROR] Line 69: Child element 'any' is not allowed

So can we either fix the source mapping when using Code Splitting or can we support condition tags on the collapse-all-properties tag?

Thank you

--
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 view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit/e69d5fa3-eb9f-48d4-a4d2-b5331e44de6eo%40googlegroups.com.


--
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 view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit/CACiKNc6-1sNepqHR-HuQx-hX90ZCxZWEuF17%3D77XwP3ynyCoGg%40mail.gmail.com.

No comments:

Post a Comment