Thank you I will try that -strict option.

My suggestion is that exported @JsType (when the -generateJsExport option 
is turned on) should be considered as entrypoints and generate compilation 
errors, what do you think ?

Le vendredi 9 septembre 2016 17:42:16 UTC+2, Roberto Lublinerman a écrit :
>
> Arnaud, have you tried using -strict? GWT ignores compilation units with 
> errors if they are not explicitly reachable from the entry point. I assume 
> your Toto class is only referenced from JS. So if this class has any 
> compile error (like missing references) then GWT does not see the class, 
> much less know it is a JsType. Strict mode should give you an error in this 
> case.
>
> On Fri, Sep 9, 2016 at 6:09 AM, Arnaud TOURNIER <lte...@gmail.com 
> <javascript:>> wrote:
>
>> I have one problem which is recurring, related to JsInterop.
>>
>> Sometimes the JsInterop JS stub is not generated because of (seemingly) 
>> an internal error in SuperDevMode (and GWTC it seems), but nothing is 
>> logged, so it's difficult to diagnose.
>>
>> For example, in an application (which does not inherits the User module), 
>> when i write a class like this, the JS stub is generated correctly :
>>
>> @JsInterop
>> public class Toto
>> {
>>     public void doSomething()
>>     {
>>         // really nothing here...
>>     }
>> }
>>
>> But if i change it to :
>>
>> @JsInterop
>> public class Toto
>> {
>>     public void doSomething()
>>     {
>>         Window.alert( "yeah" );
>>     }
>> }
>>
>> Then the JS stub is not generated (i mean the Toto constructor function 
>> is not made available to JS scope).
>>
>> I understand that Window.alert(...) is implemented in the User module and 
>> since i don't inherit from it, the thing cannot be generated. But no 
>> message is generated (neither by SDM nor by the GWTC if i remember well), 
>> which is then difficult to diagnose...
>>
>> Note : i should be able to produce a minimal repro case for this thing.
>>
>>
>> Then sometimes, a @JsInterop class would not be exported to JS, but if i 
>> change its name then it's generated, which is... weird.
>>
>> For this one i am not sure i can give a minimal repro case because it 
>> happens on quite large projects (angular2 with gwt 2.8)...
>>
>>
>> I saw another error:
>>
>> It was in a @JsInterop class, which called a template method (i mean with 
>> <T> in the signature of the method). I had to specify the <T> type to call 
>> it to have the SDM generating the class. If i didn't, the javac would infer 
>> correctly the <T> type (so no error appears in the IDE, which is Eclipse in 
>> my case), but it seemed that SDM did not manage to infer the type correctly 
>> because then the class would not be accessible from javascript... I can 
>> give you a sample file if you need.
>>
>>
>> A last one : i tried migrating a big app from 2.7 to 2.8-rc2 (same 
>> problem with previous sub versions of the 2.8). The compiler goes on 
>> compiling then does the linking, but it suddenly crashes without saying 
>> anything (i tried TRACE and DEBUG log levels with no more useful 
>> information) and results in a maven build failure. The build is happening 
>> in maven. Since the app is quite big, i guess the problem comes from a 
>> dependency i use which is not 2.8 friendly (did not have enough time to 
>> investigate that deeply). But again, the problem is not that the compile 
>> does not work, but that no useful message is generated to understand the 
>> error.
>>
>> For this one, i can give you the code, but privately since it is a 
>> business app that is not open source...
>>
>> Thanks !
>>
>> Arnaud Tournier
>> LTE Consulting
>>
>>
>> Le jeudi 8 septembre 2016 16:27:36 UTC+2, Daniel Kurka a écrit :
>>>
>>> Hi all,
>>>
>>> I will be cutting rc3 tomorrow 1pm CEST, please respond to this email 
>>> with any outstanding reviews that you want to see included.
>>>
>>> -Daniel
>>>
>> -- 
>> 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 google-web-toolkit-contributors+unsubscr...@googlegroups.com 
>> <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/google-web-toolkit-contributors/5e5b6585-aba1-48ce-a5d6-6f9a702e801b%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/google-web-toolkit-contributors/5e5b6585-aba1-48ce-a5d6-6f9a702e801b%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
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 google-web-toolkit-contributors+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit-contributors/3ce46f97-b8c3-4774-9e25-5223acd5f93d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to