Re: [gwt-contrib] Re: JsInterop is pruning non readed properties

2016-04-12 Thread 'Goktug Gokdogan' via GWT Contributors
Changing the default will not solve the SDM vs Prod problem (i.e. what if I
disabled it?). The default is sub-optimal but helps in the grand scheme of
things (There is a comment thread in the Doc discussing why the default is
chosen in the current way).

SDM already doesn't export members to Global object if the flag is not
enabled. IIRC, it will also prune some unused Object instance members but
that's not aggressive for performance reasons but also not enough since you
might have a reference from Java code. I'm open to any suggestions.

On Tue, Apr 12, 2016 at 9:10 AM, Paul Stockley  wrote:

> I think this flag in its current form is evil. If you forget it your code
> will work in SDM and not in production. I would recommend one of the
> following:
>
> 1) Have export on by default and have a flag to turn it off
> 2) or have SDM prune the non-exported classes from the code.
>
>
> On Tuesday, April 12, 2016 at 11:48:11 AM UTC-4, Ignacio Baca
> Moreno-Torres wrote:
>>
>> Compiled using 2.8.0-SNAPSHOT and without -generateJsInteropExports.
>> With -generateJsInteropExport works! (i.e.: Foo.bar field is not pruned)
>>
>> On Tuesday, April 12, 2016 at 3:57:10 PM UTC+2, Ignacio Baca
>> Moreno-Torres wrote:
>>>
>>> This code:
>>> public class Client implements EntryPoint {
>>> Console log = Browser.getWindow().getConsole();
>>>
>>> @Override public void onModuleLoad() {
>>> Foo foo = new Foo();
>>> foo.bar = 666;
>>> log.log(foo);
>>> }
>>>
>>> @JsType public static class Foo {
>>> public int bar;
>>> }
>>> }
>>>
>>>
>>> Generate this js:
>>> function $onModuleLoad(this$static){
>>>   var foo;
>>>   foo = new Client$Foo;
>>>   $log(this$static.log_0, foo);
>>> }
>>>
>>>
>>> I.e.: the Foo.bar var is pruned. This makes this common case (IMHO)
>>> fail silently (an empty object is sent to the server):
>>>
>>> Foo f = new Foo(); f.bar=666; request.send(f);
>>>
>>> This can be fixed using isNative=true, which might be ok, but the
>>> important thing is that this code fails silently which is really annoying.
>>> Thanks.
>>>
>>> --
> 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/a8fed9ee-8137-478d-92e7-1fe5ba1a7409%40googlegroups.com
> 
> .
>
> 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/CAN%3DyUA3LMFcU0LCqJedKpMJMK7%3DK%2BiMsgX54k1CBe6Gxu7B-dA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[gwt-contrib] Re: JsInterop is pruning non readed properties

2016-04-12 Thread Paul Stockley
I think this flag in its current form is evil. If you forget it your code 
will work in SDM and not in production. I would recommend one of the 
following:

1) Have export on by default and have a flag to turn it off
2) or have SDM prune the non-exported classes from the code.


On Tuesday, April 12, 2016 at 11:48:11 AM UTC-4, Ignacio Baca Moreno-Torres 
wrote:
>
> Compiled using 2.8.0-SNAPSHOT and without -generateJsInteropExports.
> With -generateJsInteropExport works! (i.e.: Foo.bar field is not pruned)
>
> On Tuesday, April 12, 2016 at 3:57:10 PM UTC+2, Ignacio Baca Moreno-Torres 
> wrote:
>>
>> This code:
>> public class Client implements EntryPoint {
>> Console log = Browser.getWindow().getConsole();
>>
>> @Override public void onModuleLoad() {
>> Foo foo = new Foo();
>> foo.bar = 666;
>> log.log(foo);
>> }
>> 
>> @JsType public static class Foo {
>> public int bar;
>> }
>> }
>>
>>
>> Generate this js:
>> function $onModuleLoad(this$static){
>>   var foo;
>>   foo = new Client$Foo;
>>   $log(this$static.log_0, foo);
>> }
>>
>>
>> I.e.: the Foo.bar var is pruned. This makes this common case (IMHO) fail 
>> silently (an empty object is sent to the server):
>>
>> Foo f = new Foo(); f.bar=666; request.send(f);
>>
>> This can be fixed using isNative=true, which might be ok, but the 
>> important thing is that this code fails silently which is really annoying. 
>> Thanks.
>>
>>

-- 
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/a8fed9ee-8137-478d-92e7-1fe5ba1a7409%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[gwt-contrib] Re: JsInterop is pruning non readed properties

2016-04-12 Thread Ignacio Baca Moreno-Torres
Compiled using 2.8.0-SNAPSHOT and without -generateJsInteropExports.
With -generateJsInteropExport works! (i.e.: Foo.bar field is not pruned)

On Tuesday, April 12, 2016 at 3:57:10 PM UTC+2, Ignacio Baca Moreno-Torres 
wrote:
>
> This code:
> public class Client implements EntryPoint {
> Console log = Browser.getWindow().getConsole();
>
> @Override public void onModuleLoad() {
> Foo foo = new Foo();
> foo.bar = 666;
> log.log(foo);
> }
> 
> @JsType public static class Foo {
> public int bar;
> }
> }
>
>
> Generate this js:
> function $onModuleLoad(this$static){
>   var foo;
>   foo = new Client$Foo;
>   $log(this$static.log_0, foo);
> }
>
>
> I.e.: the Foo.bar var is pruned. This makes this common case (IMHO) fail 
> silently (an empty object is sent to the server):
>
> Foo f = new Foo(); f.bar=666; request.send(f);
>
> This can be fixed using isNative=true, which might be ok, but the 
> important thing is that this code fails silently which is really annoying. 
> Thanks.
>
>

-- 
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/c9fd1ad7-44b9-44f9-832a-99cd2be48de9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[gwt-contrib] Re: JsInterop is pruning non readed properties

2016-04-12 Thread Ignacio Baca Moreno-Torres
This happens with the last snapshot and not, I'm not using '
-generateJsInteropExports'.  There is a bit longer explanation and 
discussion in the gwt gitter room (https://gitter.im/gwtproject/gwt).

On Tuesday, April 12, 2016 at 5:12:45 PM UTC+2, Paul Stockley wrote:
>
> Also, forgot to mention. I had quite a few issues with the Beta that went 
> away in the latest snapshot build.
>
> On Tuesday, April 12, 2016 at 11:11:17 AM UTC-4, Paul Stockley wrote:
>>
>> Are you compiling with -generateJsInteropExports ?
>>
>> On Tuesday, April 12, 2016 at 9:57:10 AM UTC-4, Ignacio Baca 
>> Moreno-Torres wrote:
>>>
>>> This code:
>>> public class Client implements EntryPoint {
>>> Console log = Browser.getWindow().getConsole();
>>>
>>> @Override public void onModuleLoad() {
>>> Foo foo = new Foo();
>>> foo.bar = 666;
>>> log.log(foo);
>>> }
>>> 
>>> @JsType public static class Foo {
>>> public int bar;
>>> }
>>> }
>>>
>>>
>>> Generate this js:
>>> function $onModuleLoad(this$static){
>>>   var foo;
>>>   foo = new Client$Foo;
>>>   $log(this$static.log_0, foo);
>>> }
>>>
>>>
>>> I.e.: the Foo.bar var is pruned. This makes this common case (IMHO) 
>>> fail silently (an empty object is sent to the server):
>>>
>>> Foo f = new Foo(); f.bar=666; request.send(f);
>>>
>>> This can be fixed using isNative=true, which might be ok, but the 
>>> important thing is that this code fails silently which is really annoying. 
>>> Thanks.
>>>
>>>

-- 
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/d4e3669c-19be-46ab-8310-7fc98fc3a761%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[gwt-contrib] Re: JsInterop is pruning non readed properties

2016-04-12 Thread Paul Stockley
Also, forgot to mention. I had quite a few issues with the Beta that went 
away in the latest snapshot build.

On Tuesday, April 12, 2016 at 11:11:17 AM UTC-4, Paul Stockley wrote:
>
> Are you compiling with -generateJsInteropExports ?
>
> On Tuesday, April 12, 2016 at 9:57:10 AM UTC-4, Ignacio Baca Moreno-Torres 
> wrote:
>>
>> This code:
>> public class Client implements EntryPoint {
>> Console log = Browser.getWindow().getConsole();
>>
>> @Override public void onModuleLoad() {
>> Foo foo = new Foo();
>> foo.bar = 666;
>> log.log(foo);
>> }
>> 
>> @JsType public static class Foo {
>> public int bar;
>> }
>> }
>>
>>
>> Generate this js:
>> function $onModuleLoad(this$static){
>>   var foo;
>>   foo = new Client$Foo;
>>   $log(this$static.log_0, foo);
>> }
>>
>>
>> I.e.: the Foo.bar var is pruned. This makes this common case (IMHO) fail 
>> silently (an empty object is sent to the server):
>>
>> Foo f = new Foo(); f.bar=666; request.send(f);
>>
>> This can be fixed using isNative=true, which might be ok, but the 
>> important thing is that this code fails silently which is really annoying. 
>> Thanks.
>>
>>

-- 
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/3d5609d1-d97e-499f-a8e7-b74555d4af94%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[gwt-contrib] Re: JsInterop is pruning non readed properties

2016-04-12 Thread Paul Stockley
Are you compiling with -generateJsInteropExports ?

On Tuesday, April 12, 2016 at 9:57:10 AM UTC-4, Ignacio Baca Moreno-Torres 
wrote:
>
> This code:
> public class Client implements EntryPoint {
> Console log = Browser.getWindow().getConsole();
>
> @Override public void onModuleLoad() {
> Foo foo = new Foo();
> foo.bar = 666;
> log.log(foo);
> }
> 
> @JsType public static class Foo {
> public int bar;
> }
> }
>
>
> Generate this js:
> function $onModuleLoad(this$static){
>   var foo;
>   foo = new Client$Foo;
>   $log(this$static.log_0, foo);
> }
>
>
> I.e.: the Foo.bar var is pruned. This makes this common case (IMHO) fail 
> silently (an empty object is sent to the server):
>
> Foo f = new Foo(); f.bar=666; request.send(f);
>
> This can be fixed using isNative=true, which might be ok, but the 
> important thing is that this code fails silently which is really annoying. 
> Thanks.
>
>

-- 
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/6cad2b2f-b3d6-46fe-9f65-3831a675017d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[gwt-contrib] JsInterop is pruning non readed properties

2016-04-12 Thread Ignacio Baca Moreno-Torres
This code:
public class Client implements EntryPoint {
Console log = Browser.getWindow().getConsole();

@Override public void onModuleLoad() {
Foo foo = new Foo();
foo.bar = 666;
log.log(foo);
}

@JsType public static class Foo {
public int bar;
}
}


Generate this js:
function $onModuleLoad(this$static){
  var foo;
  foo = new Client$Foo;
  $log(this$static.log_0, foo);
}


I.e.: the Foo.bar var is pruned. This makes this common case (IMHO) fail 
silently (an empty object is sent to the server):

Foo f = new Foo(); f.bar=666; request.send(f);

This can be fixed using isNative=true, which might be ok, but the important 
thing is that this code fails silently which is really annoying. Thanks.

-- 
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/1e737a9f-693b-43e3-9868-e676dccb2f72%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.