On Wednesday, June 24, 2015 at 3:42:47 PM UTC-5, Jens wrote:
>
>
>
>>    - Why are the post-linkers fed misleading content for the 
>>    <module>.nocache.js file Artifact that doesn't represent what will be the 
>>    file system content of that file?
>>
>> A production compile and SuperDevMode work different because SDM needs to 
> load up-to-date code from the CodeServer and also tells the CodeServer to 
> recompile the app when you reload the page. To do so SDM creates a special 
> <module>.nocache.js file and stores it in our war/launcherDir folder so it 
> will be deployed. There is no linking involved here, its a helper file that 
> just has the same name as the file produced by GWT compilation later. When 
> you reload the page that file will call the URL
>
> http://localhost:9876/recompile-requester/<modulename>
>

The problem is that when the original (non-hacked) <module>.nocache.js is 
loaded by the project's HTML, it executes synchronously before any 
additional <script> tags in that HTML page.  However, the special 
<module>.nocache.js provided by the server installs a listener that 
injects:that URL (recompiler-requestor) only after the page has finished 
loading - so after all the subsequent script tags in the HTML have already 
executed.

For us there are actually two problems:

   - the real <module>.nocache.js is executed too late, after the HTML page 
   has already finished loading
   - when it does run, because it's running asynchronously, the hook we 
   inject which uses document.write() encounters the error "Failed to execute 
   'write' on 'Document': It isn't possible to write into a document from an 
   asynchronously-loaded external script unless it is explicitly opened."

 
>
>>
>>    - How do I control the order of my post linker within the set of 
>>    other post linkers?  I set it as a post linker with a pragma, but say I 
>>    want it to be the* last* post linker?
>>
>>
> According to http://www.gwtproject.org/doc/latest/DevGuideLinkers.html 
> they are executed in reverse lexical order based on their name. 
>

Yeah, I saw that, but looking in Eclipse at various stack frame variables 
while in our custom linker, the post linkers don't appear to be ordered by 
either fully qualified or unqualified class name.

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit-contributors/3e4c7831-da43-42f0-b7b8-80f7009a85df%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to