Wednesday, September 14, 2016

Re: Strange (BAD?) code generated

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 types.

if not
The library exported also as Java and My application has a access to types exported by -generateJsInteropExports since the library must also be exported as pure JS.

So I don't get it. What am I missing?


.







On Wed, Sep 14, 2016 at 11:44 PM, Jens <jens.nehlmeier@gmail.com> wrote:

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 -generateJsInteropExports and isNative = false classes.

Now when you use that library inside your own GWT app you don't want -generateJsInteropExports because all classes marked for export to JS are considered entry points into your application and they (and code that use them) can not be pruned or optimized by the compiler. So the end result would be potential code bloat in your app.


-- J.

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



--
Vassilis Virvilis

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

No comments:

Post a Comment