Wednesday, June 22, 2016

Re: GWT 2.8 and Guava 20

Thanks for the reply, ye I think it is very weird that GWT complains. But the workaround of just placing the com.google.errorprone.annotations GWT module file in our own jar seems to work find, thanks for the fast reply!



On Tuesday, June 21, 2016 at 4:06:49 PM UTC+2, Thomas Broyer wrote:


On Tuesday, June 21, 2016 at 3:59:51 PM UTC+2, Johan Falk wrote:
While not only a GWT question, I thought this was the best place to ask. I've got an GWT 2.7 application which is being upgraded to 2.8. I'm using one of the latest snapshot (2.8.0-269) together with Guava (20.0.220-SNAPSHOT).

The problem is I get the same type of error that is mentioned in this issue: https://github.com/gwtproject/gwt/issues/9323, but just adding both error_prone_annotations and j2objc-annotations jars to the classpath when running the CodeServer doesn't seem to work for me.

I did get it working by manually adding a GWT module file (Annotations.gwt.xml) to both jars, which just sets the source path:
<module>
    <inherits name="com.google.gwt.core.Core" />

    <source path=""/>
    <source path="concurrent"/>
    <super-source path="super" />
</module>

And then add then reference this in my main Module file:
<inherits name="com.google.errorprone.annotations.Annotations" />
<inherits name="com.google.j2objc.annotations.Annotations" />

But I would like to avoid manually modifying those jars (as that makes each upgrade more of a pain, and I need to upload the modified jars to our maven repository instead of just mirroring the existing ones). Anyone have any idea what I'm missing?

No idea why GWT complains, but just a note in passing that you don't have to "patch" the JARs: GWT works from the classpath, so it only matters that the Annotations.gwt.xml files exist in the com.google.errorprone.annotations and com.google.j2objc.annotations packages, whichever the exact location "on disk"; so they can just live in your app sources, or for example in small JARs deployed to your Maven repo, that would depend on the error_prone_annotations and j2objc-annotations source JARs. 

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