Re: Deploying symbolMaps in a production build

2017-11-15 Thread Thomas Broyer
The gwt-site-webapp also has such configuration; it's used for the 
menu/navigation at http://www.gwtproject.org

https://gwt.googlesource.com/gwt-site-webapp (see pom.xml and *.gwt.xml files)

-- 
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+unsubscr...@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.


Re: Deploying symbolMaps in a production build

2017-11-15 Thread Ignacio Baca Moreno-Torres
https://github.com/ibaca/rxcanvas-gwt 

On Thursday, November 16, 2017 at 12:08:44 AM UTC+1, Ignacio Baca 
Moreno-Torres wrote:
>
> FYI this project is a working example of deploying a gwt app with source 
> maps. The pom is configured to included both the source map and the java 
> sources. I use site.sh to deploy as a github page.
>
> On Wednesday, November 15, 2017 at 9:40:26 PM UTC+1, AJ wrote:
>>
>> Thanks Colin.
>> That look like exactly what I need.
>> This will be a 'production' url we use to debug the issue and then 
>> re-deploy the 'real' build once we have stepped the code and found the 
>> offending null point.
>>
>> Nice to know about the stack trace.
>>
>> Thank you very much for the very detailed reply.
>>
>>
>>

-- 
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+unsubscr...@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.


Re: Deploying symbolMaps in a production build

2017-11-15 Thread Ignacio Baca Moreno-Torres
FYI this project is a working example of deploying a gwt app with source 
maps. The pom is configured to included both the source map and the java 
sources. I use site.sh to deploy as a github page.

On Wednesday, November 15, 2017 at 9:40:26 PM UTC+1, AJ wrote:
>
> Thanks Colin.
> That look like exactly what I need.
> This will be a 'production' url we use to debug the issue and then 
> re-deploy the 'real' build once we have stepped the code and found the 
> offending null point.
>
> Nice to know about the stack trace.
>
> Thank you very much for the very detailed reply.
>
>
>

-- 
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+unsubscr...@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.


Re: Deploying symbolMaps in a production build

2017-11-15 Thread AJ
Thanks Colin.
That look like exactly what I need.
This will be a 'production' url we use to debug the issue and then 
re-deploy the 'real' build once we have stepped the code and found the 
offending null point.

Nice to know about the stack trace.

Thank you very much for the very detailed reply.


-- 
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+unsubscr...@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.


Re: Deploying symbolMaps in a production build

2017-11-15 Thread Colin Alworth
Symbol maps are distinct from source maps, the serve different purposes. 
Sourcemaps, when deployed with your actual source, allow the browser to ask 
the server for your Java source, so you can see if when you debug - this 
may not be something most production applications want their customers to 
be able to find.

In contrast, symbol maps are used by the server, so when the client sends 
the server a stack trace, it can figure out what that stack trace should 
have looked like in Java (see 
com.google.gwt.core.server.StackTraceDeobfuscator). This will work without 
enabling sourcemaps.

The "// #sourceURL=" is used to say to the browser "pretend that this 
string you are eval()ing is actually a file with this name and path". If 
used in conjunction with sourcemaps, then *if you have deployed sourcemaps*, 
viewing the source in your browser will show all Java classes.

To turn on production sourcemaps, add this to your .gwt.xml file (assuming 
the CrossSiteIframeLinker, which it appears you are using) if you just want 
them always on (assumes one permutation):

  

If you have more than one permutation, you'll want to set up a pattern in 
here, based on the docs in CrossSiteIframeLinker.gwt.xml:
  

This only adds the missing "// #sourceMappingURL=" to your output, but the 
sourcemaps has to actually be there for you to use it, and in the right 
place - using those custom URL features will help you change where it goes. 

Keep in mind that your webserver will not serve any content in WEB-INF/, so 
you'll need to build those somewhere else for the client to see it (see the 
-deploy flag). You would also need to add all of your java sources, and 
they are also expected to be found in the same directory as the sourcemap 
file, and remember that this may allow your users to see the app's sources.



On Tuesday, November 14, 2017 at 7:34:40 AM UTC-6, AJ wrote:
>
> Hello,
> I have an issue that only manifests in a deployed GWT application and so 
> am trying to enable source maps in the production build.
>
> I have added...
>
> 
> 
>
> ...to the project.ui.xml file and have passed -saveSource to the compiler
>
> In my war I see the WEB-INF/deploy/ProjectName/symbolMaps folder
>  containing 1A2B3C.symbolMap and 1A2B3C_sourceMap0.json
>
> My understanding is that I need to have the following comment at the 
> bottom of the various generated javascript files which are pulled in by the 
> bootstrap code
> //# sourceMappingURL=myUrl
>
> so I should see that at the bottom of 1A2B3C.cache.js found in the project 
> folder of the war (same folder as myProject.nocache.js)
>
> What I see at the end of that file is...
>
> //# sourceURL=Utmc-0.js
>
> ... and this is what is delivered in chrome devtools when I try to find 
> the source
>
> Has anyone else tried this and, if so, what am I missing?
>
>

-- 
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+unsubscr...@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.


Deploying symbolMaps in a production build

2017-11-14 Thread AJ
Hello,
I have an issue that only manifests in a deployed GWT application and so am 
trying to enable source maps in the production build.

I have added...




...to the project.ui.xml file and have passed -saveSource to the compiler

In my war I see the WEB-INF/deploy/ProjectName/symbolMaps folder
 containing 1A2B3C.symbolMap and 1A2B3C_sourceMap0.json

My understanding is that I need to have the following comment at the bottom 
of the various generated javascript files which are pulled in by the 
bootstrap code
//# sourceMappingURL=myUrl

so I should see that at the bottom of 1A2B3C.cache.js found in the project 
folder of the war (same folder as myProject.nocache.js)

What I see at the end of that file is...

//# sourceURL=Utmc-0.js

... and this is what is delivered in chrome devtools when I try to find the 
source

Has anyone else tried this and, if so, what am I missing?

-- 
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+unsubscr...@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.