guava should be updated to a version (22?) that properly supports CompatibleWith#value
OpenPublic

Description

Currently (on version 21) we get these sorts of warnings in build:

INFO: From Building kythe/javatests/com/google/devtools/kythe/extractors/java/java_extractor_test.jar (1 source file):
bazel-out/local-fastbuild/genfiles/external/com_google_guava_guava/jar/_ijar/jar/external/com_google_guava_guava/jar/guava-21.0-ijar.jar(/com/google/common/collect/Multimap.class): warning: Cannot find annotation method 'value()' in type 'CompatibleWith': class file for com.google.errorprone.annotations.CompatibleWith not found
bazel-out/local-fastbuild/genfiles/external/com_google_guava_guava/jar/_ijar/jar/external/com_google_guava_guava/jar/guava-21.0-ijar.jar(/com/google/common/collect/Multimap.class): warning: Cannot find annotation method 'value()' in type 'CompatibleWith'

According to cpovrik here, this is fixed in guava 22.

danielmoy-google created this task.Via WebThu, Apr 20, 4:03 PM
danielmoy-google added a subscriber: danielmoy-google.
Herald added a subscriber: Core Team. · View Herald TranscriptVia HeraldThu, Apr 20, 4:03 PM
danielmoy-google added a comment.Via WebThu, Apr 20, 4:05 PM

Worth pointing out that guava 22 is also scheduled to remove the getHostText method that we wanted to replace with getHost from 20/21 in the previous upgrade, so that'll break if not fixed at the same time

jrtom added a subscriber: jrtom.Via WebThu, Apr 20, 4:25 PM

Guava 22.0 is not out yet; there's only a snapshot version currently available. I wouldn't expect 22.0 final to be out for a while yet.

Do we have this same issue in 20.0?

danielmoy-google added a comment.Via WebFri, Apr 21, 9:34 AM

I dunno I just skipped from 19->21, didn't check 20.

Also I would posit that this is mostly a non-issue, unless we have a strict 'must build without warnings' rule.

If we do have such a rule, I think the better solution is to do what one of those other teams in the linked thread does and use a slightly modified guava that hacks around that bug. (at least I think it was that thread, maybe it was a different one I was looking at)

I'd prefer to just do nothing and wait for guava22 and live with the compilation warning for now. Also as far as I can see, we don't even use ErrorProne in kythe anywhere, so it's just the fact that guava as a whole pulls it in that we get the warning.

(Open question as to whether or not we *should* be using error-prone, but that's a separate issue)

danielmoy-google added a comment.Via WebFri, Apr 21, 9:36 AM

Looks like they average ~6 months between releases, and it's already been 3-4 months since 21, so we have probably only another 1-5 months to wait or so...

jrtom added a comment.Via WebFri, Apr 21, 11:28 AM

If this is just a compiler warning, then yeah, I'd not worry about it for now. (I'm not aware that we have such a rule either.)

I would say that it would be a good idea to use error-prone, but agreed, that should be a separate task.

Bottom line, though, is definitely _don't_ upgrade to 22 (for external stuff) until it's actually released. Speaking as someone who's working on stuff that will be released (or modified) in 22, there can be a fair amount of flux in the meantime. :)

danielmoy-google added a comment.Via WebFri, Apr 21, 11:36 AM

Yup, totally agree, we should just wait until it lands in maven and we can do another trivial update

Add Comment