Re: Strange (BAD?) code generated

2016-09-15 Thread Thomas Broyer
With GWT 2.8 yes. It's been suggested that there could be some regexp (or other kind of pattern) matching added later to whitelist/blacklist some @JsType(isNative=false) that you would/wouldn't want to see exported. In the mean time, don't over-use @JsType without isNative=true (in libraries), b

Re: Strange (BAD?) code generated

2016-09-15 Thread Vassilis Virvilis
So What you say is: It is not possible to have a page with: *** gwtapp + gwtlib + js_export + optimization *** What is possible to have is either or 1) gwtapp + gwtlib + optimization or (xor actually) 2) gwtapp + gwtlib + js_export right? a) We assume gwtlib has @JsType(isNative=false) t

Re: Strange (BAD?) code generated

2016-09-15 Thread Thomas Broyer
Let me try: without -generateJsInteropExports, GWT acts as if @JsType(isNative=false) wasn't there at all. Why'd you want this? - when @JsType(isNative=false) is applied to types you didn't write yourself (third-party). For example, java.util.Collection, java.util.List, java.util.Map,

Re: Strange (BAD?) code generated

2016-09-15 Thread Vassilis Virvilis
Jens sorry - one more round if you please > The library exists as GWT library (*.jar file with *.gwt.xml)... This GWT library is source right? That means it is compiled by the compilation session of MyApplication right? Unless (light bulb goes on) In some cases you want the library to act a

Re: Strange (BAD?) code generated

2016-09-14 Thread Jens
> Is this GWT library exported as JS only? ... > So I don't get it. What am I missing? > The library exists as GWT library (*.jar file with *.gwt.xml) so you can use it right away in your GWT app, but the library is also exported by the library maintainer to JavaScript so that JavaScript peop

Re: Strange (BAD?) code generated

2016-09-14 Thread Vassilis Virvilis
I am not sure I follow. Is this GWT library exported as JS only? if yes My application sees the js only and knows nothing about the types (only from documentation) and has to redefine them in jsinterop so it will use @JsType(isNative=true) since we are talking about a pure JS library with native

Re: Strange (BAD?) code generated

2016-09-14 Thread Jens
> Could you elaborate on the use case @jstype(isNative=false) and > -generateJsInteropExports > is __not__ specified in the command line. > > Is there any valid use for such a combination? > Sure. Pick any GWT library that might provide itself as pure JS library as well by using -generateJsIn

Re: Strange (BAD?) code generated

2016-09-14 Thread Vassilis Virvilis
Hi Could you elaborate on the use case @jstype(isNative=false) and -generateJsInteropExports is __not__ specified in the command line. Is there any valid use for such a combination? On Tue, Sep 13, 2016 at 6:41 PM, Thomas Broyer wrote: > > On Tuesday, September 13, 2016 at 5:27:50 PM UTC+2, Ki

Re: Strange (BAD?) code generated

2016-09-13 Thread Thomas Broyer
On Tuesday, September 13, 2016 at 5:27:50 PM UTC+2, Kirill Prazdnikov wrote: > > This means that the compiler must throw an error: > > If a type is not isNative=true > and the type is never instantiated > and the type is returned form JSNI\JsInterop > > right ? > No, just like the compiler do

Re: Strange (BAD?) code generated

2016-09-13 Thread Kirill Prazdnikov
This means that the compiler must throw an error: If a type is not isNative=true and the type is never instantiated and the type is returned form JSNI\JsInterop right ? -- You received this message because you are subscribed to the Google Groups "GWT Users" group. To unsubscribe from

Re: Strange (BAD?) code generated

2016-09-13 Thread Thomas Broyer
On Tuesday, September 13, 2016 at 4:08:38 PM UTC+2, Kirill Prazdnikov wrote: > > >> See https://github.com/gwtproject/gwt/issues/9330 >> You must be missing an isNative=true on ClientRect >> > > Ok, but what does it mean when a type has a @JsProperty but it is not > "isNative=true" ? > > Must ea

Re: Strange (BAD?) code generated

2016-09-13 Thread Kirill Prazdnikov
> > > See https://github.com/gwtproject/gwt/issues/9330 > You must be missing an isNative=true on ClientRect > Ok, but what does it mean when a type has a @JsProperty but it is not "isNative=true" ? Must each class with JsProperties be "isNative=true" ? -- You received this message because

Re: Strange (BAD?) code generated

2016-09-13 Thread Thomas Broyer
On Tuesday, September 13, 2016 at 3:35:46 PM UTC+2, Kirill Prazdnikov wrote: > > I was trying to build with the latest master version, but it fails with > > Execution default of goal > org.codehaus.mojo:gwt-maven-plugin:2.8.0-SNAPSHOT:resources failed: > Plugin org.codehaus.mojo:gwt-maven-plugi

Re: Strange (BAD?) code generated

2016-09-13 Thread Thomas Broyer
On Tuesday, September 13, 2016 at 3:30:49 PM UTC+2, Kirill Prazdnikov wrote: > > Hi, I have the following code: > > public static Vec2i elementSizeToDeviceSize(Element element) { >> float devicePixelRatio = devicePixelRatio(); >> ClientRect rect = GwtNativeUtil.getBoundingClientRect(element);

Re: Strange (BAD?) code generated

2016-09-13 Thread Kirill Prazdnikov
> > > I`m using -Dgwt.style=PRETTY > > > Sorry, typo here. This Bug exists without gwt.style=PRETTY. -- 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-t

Re: Strange (BAD?) code generated

2016-09-13 Thread Kirill Prazdnikov
I was trying to build with the latest master version, but it fails with Execution default of goal org.codehaus.mojo:gwt-maven-plugin:2.8.0-SNAPSHOT:resources failed: Plugin org.codehaus.mojo:gwt-maven-plugin:2.8.0-SNAPSHOT or one of its dependencies could not be resolved: Could not find artifa