Announcing Guava 13.0-rc1

3,833 views
Skip to first unread message

Kurt Alfred Kluever

unread,
Jun 27, 2012, 3:41:05 PM6/27/12
to guava-discuss
[bcc:guava-announce]

I just uploaded Guava 13.0-rc1 to Maven. You can install it using maven as com.google.guava:guava:13.0-rc1 and com.google.guava:guava-gwt:13.0-rc1, or you can download it by hand from:


Please try upgrading and let us know how it goes. If no upgrade problems are reported then we'll do the final 13.0 release next week.

Release notes can be found here:


We strongly encourage you to install and test this release candidate; please report any issues you encounter doing so. And enjoy the new functionality. :-)

Cheers,
-Kurt Alfred Kluever

David Nouls

unread,
Jun 28, 2012, 4:48:06 AM6/28/12
to guava-...@googlegroups.com
Hi,
 
I tried to see if the previously reported GWT compilation issues with R12 was fixed in the R12 rc1... but I now get even more errors. and this time they actually make the compiler abort. In R12 there was something wrong when generating a CustomFieldSerializer for one Immutable class, but it did not stop the gwt compiler. In R13 RC1 I get a huge list of other errors:
 

     [java]    Validating newly compiled units

     [java]       [ERROR] Errors in 'jar:file:/scm/vobs/rlsCOTS5/guava/JAVA/lib/guava-gwt.jar!/com/google/common/collect/testing/google/super/com/google/common/collect/testing/google/SetGenerators.java'

     [java]          [ERROR] Line 17: The declared package "com.google.common.collect.testing.google" does not match the expected package "com.google.common.collect.testing.google.super.com.google.common.collect.testing.

google"

     [java]          [ERROR] Line 22: The import com.google.common.collect.testing.SampleElements cannot be resolved

     [java]          [ERROR] Line 23: The import com.google.common.collect.testing.SampleElements cannot be resolved

     [java]          [ERROR] Line 24: The import com.google.common.collect.testing.SampleElements cannot be resolved

     [java]          [ERROR] Line 25: The import com.google.common.collect.testing.SampleElements cannot be resolved

     [java]          [ERROR] Line 26: The import junit cannot be resolved

     [java]          [ERROR] Line 38: The import com.google.common.collect.testing.TestCollectionGenerator cannot be resolved

     [java]          [ERROR] Line 39: The import com.google.common.collect.testing.TestCollidingSetGenerator cannot be resolved

     [java]          [ERROR] Line 40: The import com.google.common.collect.testing.TestIntegerSortedSetGenerator cannot be resolved

     [java]          [ERROR] Line 41: The import com.google.common.collect.testing.TestSetGenerator cannot be resolved

     [java]          [ERROR] Line 42: The import com.google.common.collect.testing.TestStringListGenerator cannot be resolved

     [java]          [ERROR] Line 43: The import com.google.common.collect.testing.TestStringSetGenerator cannot be resolved

     [java]          [ERROR] Line 44: The import com.google.common.collect.testing.TestStringSortedSetGenerator cannot be resolved

     [java]          [ERROR] Line 45: The import com.google.common.collect.testing.TestUnhashableCollectionGenerator cannot be resolved

     [java]          [ERROR] Line 46: The import com.google.common.collect.testing.UnhashableObject cannot be resolved

     [java]          [ERROR] Line 65: TestStringSetGenerator cannot be resolved to a type

     [java]          [ERROR] Line 66: The method create(String[]) of type SetGenerators.ImmutableSetCopyOfGenerator must override or implement a supertype method

     [java]          [ERROR] Line 72: TestCollidingSetGenerator cannot be resolved to a type

     [java]          [ERROR] Line 76: TestCollectionGenerator cannot be resolved to a type

     [java]          [ERROR] Line 78: The method create(Object...) of type SetGenerators.ImmutableSetWithBadHashesGenerator must override or implement a supertype method

     [java]          [ERROR] Line 84: TestStringSetGenerator cannot be resolved to a type

     [java]          [ERROR] Line 88: The method create(String[]) of type SetGenerators.DegeneratedImmutableSetGenerator must override or implement a supertype method

     [java]          [ERROR] Line 95: TestStringSortedSetGenerator cannot be resolved to a type

     [java]          [ERROR] Line 96: The method create(String[]) of type SetGenerators.ImmutableSortedSetCopyOfGenerator must override or implement a supertype method

     [java]          [ERROR] Line 102: TestStringSortedSetGenerator cannot be resolved to a type

     [java]          [ERROR] Line 103: The method create(String[]) of type SetGenerators.ImmutableSortedSetHeadsetGenerator must override or implement a supertype method

     [java]          [ERROR] Line 112: TestStringSortedSetGenerator cannot be resolved to a type

     [java]          [ERROR] Line 113: The method create(String[]) of type SetGenerators.ImmutableSortedSetTailsetGenerator must override or implement a supertype method

     [java]          [ERROR] Line 122: TestStringSortedSetGenerator cannot be resolved to a type

     [java]          [ERROR] Line 123: The method create(String[]) of type SetGenerators.ImmutableSortedSetSubsetGenerator must override or implement a supertype method

     [java]          [ERROR] Line 133: TestStringSetGenerator cannot be resolved to a type

     [java]          [ERROR] Line 138: The method create(String[]) of type SetGenerators.ImmutableSortedSetExplicitComparator must override or implement a supertype method

     [java]          [ERROR] Line 144: The method order(List<String>) of type SetGenerators.ImmutableSortedSetExplicitComparator must override or implement a supertype method

     [java]          [ERROR] Line 151: TestStringSetGenerator cannot be resolved to a type

     [java]          [ERROR] Line 156: The method create(String[]) of type SetGenerators.ImmutableSortedSetExplicitSuperclassComparatorGenerator must override or implement a supertype method

     [java]          [ERROR] Line 162: The method order(List<String>) of type SetGenerators.ImmutableSortedSetExplicitSuperclassComparatorGenerator must override or implement a supertype method

     [java]          [ERROR] Line 169: TestStringSetGenerator cannot be resolved to a type

     [java]          [ERROR] Line 171: The method create(String[]) of type SetGenerators.ImmutableSortedSetReversedOrderGenerator must override or implement a supertype method

     [java]          [ERROR] Line 177: The method order(List<String>) of type SetGenerators.ImmutableSortedSetReversedOrderGenerator must override or implement a supertype method

     [java]          [ERROR] Line 183: The hierarchy of the type ImmutableSortedSetUnhashableGenerator is inconsistent

     [java]          [ERROR] Line 185: UnhashableObject cannot be resolved to a type

     [java]          [ERROR] Line 185: The method create(UnhashableObject[]) of type SetGenerators.ImmutableSortedSetUnhashableGenerator must override or implement a supertype method

     [java]          [ERROR] Line 186: UnhashableObject cannot be resolved to a type

     [java]          [ERROR] Line 192: TestStringListGenerator cannot be resolved to a type

     [java]          [ERROR] Line 193: The method create(String[]) of type SetGenerators.ImmutableSetAsListGenerator must override or implement a supertype method

     [java]          [ERROR] Line 199: TestStringListGenerator cannot be resolved to a type

     [java]          [ERROR] Line 200: The method create(String[]) of type SetGenerators.ImmutableSortedSetAsListGenerator must override or implement a supertype method

     [java]          [ERROR] Line 209: TestStringListGenerator cannot be resolved to a type

     [java]          [ERROR] Line 210: The method create(String[]) of type SetGenerators.ImmutableSortedSetSubsetAsListGenerator must override or implement a supertype method

     [java]          [ERROR] Line 214: BEFORE_FIRST cannot be resolved

     [java]          [ERROR] Line 216: AFTER_LAST cannot be resolved

     [java]          [ERROR] Line 217: BEFORE_FIRST_2 cannot be resolved

     [java]          [ERROR] Line 218: AFTER_LAST cannot be resolved

     [java]          [ERROR] Line 223: TestStringListGenerator cannot be resolved to a type

     [java]          [ERROR] Line 224: The method create(String[]) of type SetGenerators.ImmutableSortedSetAsListSubListGenerator must override or implement a supertype method

     [java]          [ERROR] Line 228: BEFORE_FIRST cannot be resolved

     [java]          [ERROR] Line 230: AFTER_LAST cannot be resolved

     [java]          [ERROR] Line 236: TestStringListGenerator cannot be resolved to a type

     [java]          [ERROR] Line 237: The method create(String[]) of type SetGenerators.ImmutableSortedsetSubsetAsListSubListGenerator must override or implement a supertype method

     [java]          [ERROR] Line 241: BEFORE_FIRST cannot be resolved

     [java]          [ERROR] Line 242: BEFORE_FIRST_2 cannot be resolved

     [java]          [ERROR] Line 244: AFTER_LAST cannot be resolved

     [java]          [ERROR] Line 245: AFTER_LAST_2 cannot be resolved

     [java]          [ERROR] Line 246: BEFORE_FIRST_2 cannot be resolved

     [java]          [ERROR] Line 247: AFTER_LAST_2 cannot be resolved

     [java]          [ERROR] Line 253: TestUnhashableCollectionGenerator cannot be resolved to a type

     [java]          [ERROR] Line 253: UnhashableObject cannot be resolved to a type

     [java]          [ERROR] Line 254: TestSetGenerator cannot be resolved to a type

     [java]          [ERROR] Line 254: UnhashableObject cannot be resolved to a type

     [java]          [ERROR] Line 262: BEFORE_FIRST cannot be resolved

     [java]          [ERROR] Line 263: BEFORE_FIRST_2 cannot be resolved

     [java]          [ERROR] Line 265: AFTER_LAST cannot be resolved

     [java]          [ERROR] Line 266: AFTER_LAST_2 cannot be resolved

     [java]          [ERROR] Line 291: The hierarchy of the type ContiguousSetGenerator is inconsistent

     [java]          [ERROR] Line 292: The method create(Integer[]) of type SetGenerators.ContiguousSetGenerator must override or implement a supertype method

     [java]          [ERROR] Line 297: The hierarchy of the type ContiguousSetHeadsetGenerator is inconsistent

     [java]          [ERROR] Line 298: The method create(Integer[]) of type SetGenerators.ContiguousSetHeadsetGenerator must override or implement a supertype method

     [java]          [ERROR] Line 306: The hierarchy of the type ContiguousSetTailsetGenerator is inconsistent

     [java]          [ERROR] Line 307: The method create(Integer[]) of type SetGenerators.ContiguousSetTailsetGenerator must override or implement a supertype method

     [java]          [ERROR] Line 315: The hierarchy of the type ContiguousSetSubsetGenerator is inconsistent

     [java]          [ERROR] Line 316: The method create(Integer[]) of type SetGenerators.ContiguousSetSubsetGenerator must override or implement a supertype method

     [java]          [ERROR] Line 334: TestIntegerSortedSetGenerator cannot be resolved to a type

     [java]          [ERROR] Line 342: The method assertEquals(int, int) is undefined for the type SetGenerators.AbstractContiguousSetGenerator

Louis Wasserman

unread,
Jun 28, 2012, 5:13:44 AM6/28/12
to David Nouls, guava-...@googlegroups.com
Hmmm.  It looks like most of those errors are in the test suite, not the API source...

Christian Edward Gruber

unread,
Jun 28, 2012, 5:48:41 AM6/28/12
to Louis Wasserman, David Nouls, guava-...@googlegroups.com
At this point the test suit is not advertised to be gwt compatible, though that's not the suite, that's the test lib, which should be, I thought.  I'll look at it.

Christian.

tsuna

unread,
Jul 3, 2012, 7:24:45 PM7/3/12
to Kurt Alfred Kluever, guava-discuss
On Wed, Jun 27, 2012 at 12:41 PM, Kurt Alfred Kluever <k...@google.com> wrote:
> I just uploaded Guava 13.0-rc1 to Maven. You can install it using maven as
> com.google.guava:guava:13.0-rc1

There seems to be a new dependency that's missing somewhere. After
putting 13.0-rc1 in my build, my compile suddenly breaks with:
[error] error while loading Cache, Missing dependency 'class
javax.annotation.Nullable', required by
../lib_managed/jars/com.google.guava/guava/guava-13.0-rc1.jar(com/google/common/cache/Cache.class)

--
Benoit "tsuna" Sigoure
Software Engineer @ www.StumbleUpon.com

tsuna

unread,
Jul 3, 2012, 7:32:56 PM7/3/12
to Kurt Alfred Kluever, guava-discuss
On Tue, Jul 3, 2012 at 4:24 PM, tsuna <tsun...@gmail.com> wrote:
> On Wed, Jun 27, 2012 at 12:41 PM, Kurt Alfred Kluever <k...@google.com> wrote:
>> I just uploaded Guava 13.0-rc1 to Maven. You can install it using maven as
>> com.google.guava:guava:13.0-rc1
>
> There seems to be a new dependency that's missing somewhere.  After
> putting 13.0-rc1 in my build, my compile suddenly breaks with:
> [error] error while loading Cache, Missing dependency 'class
> javax.annotation.Nullable', required by
> ../lib_managed/jars/com.google.guava/guava/guava-13.0-rc1.jar(com/google/common/cache/Cache.class)

I was able to work around the problem by adding
"com.google.code.findbugs" % "jsr305" % "1.3.+" in my list of
dependencies, but that should've been pulled as a transitive
dependency from guava, I shouldn't have to add this in my build file
(correct me if I'm wrong).

Kurt Alfred Kluever

unread,
Jul 3, 2012, 7:44:57 PM7/3/12
to tsuna, Chris Povirk, guava-discuss

tsuna

unread,
Jul 6, 2012, 4:35:56 PM7/6/12
to Kurt Alfred Kluever, Chris Povirk, guava-discuss
On Tue, Jul 3, 2012 at 4:44 PM, Kurt Alfred Kluever <k...@google.com> wrote:
> Hmm, sounds related
> to http://code.google.com/p/guava-libraries/issues/detail?id=776

Sounds related but I think it's a different issue. Everything worked
fine for me up to (and including) 12.0, but now with 13.0-rc1 I'm
getting the error, presumably due to a missing dependency in Guava's
published artifact.

The artifact (http://search.maven.org/#artifactdetails%7Ccom.google.guava%7Cguava%7C13.0-rc1%7Cjar)
contains:

<dependencies>
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
<version>1.3.9</version>
<scope>provided</scope>
</dependency>
</dependencies>

I'm going to guess that <scope>provided</scope> is a lie and needs to
be removed. Or Guava's jar needs to be fixed to include jsr305.

Kevin Bourrillion

unread,
Jul 8, 2012, 10:04:08 PM7/8/12
to tsuna, Christian Gruber, Kurt Alfred Kluever, Chris Povirk, guava-discuss
So this is not GWT-related, right?

What exactly is making this claim that Cache.class "requires" javax.annotation.Nullable, anyway?  To my knowledge that claim is completely false. If one were trying to compile Cache.java, yes, but once you've got a class file that annotation should not be required in any way thereafter.



--



--
Kevin Bourrillion @ Google

tsuna

unread,
Jul 8, 2012, 10:24:20 PM7/8/12
to Kevin Bourrillion, Christian Gruber, Kurt Alfred Kluever, Chris Povirk, guava-discuss
On Sun, Jul 8, 2012 at 7:04 PM, Kevin Bourrillion <kev...@google.com> wrote:
> So this is not GWT-related, right?

No, I never mentioned GWT in my email.

> What exactly is making this claim that Cache.class "requires"
> javax.annotation.Nullable, anyway? To my knowledge that claim is completely
> false. If one were trying to compile Cache.java, yes, but once you've got a
> class file that annotation should not be required in any way thereafter.

Maybe annotation leaves a trace behind in the class file that causes
SBT to fail to compile the code with the error "Missing dependency
'class javax.annotation.Nullable'".

Benjamin Manes

unread,
Jul 8, 2012, 10:31:26 PM7/8/12
to tsuna, Kevin Bourrillion, Christian Gruber, Kurt Alfred Kluever, Chris Povirk, guava-discuss
This is due to the Scala compiler, which needs all of the artifacts left in the byte-code. This is similar to an issue with using JodaTime in Scala, where the joda-convert optional dependency must be included. The answer for why was,

The Scala compiler requires that all classes referenced in signatures
of classes that you use are also available on the compile time
classpath.

Kevin Bourrillion

unread,
Jul 8, 2012, 10:43:51 PM7/8/12
to Benjamin Manes, tsuna, Christian Gruber, Kurt Alfred Kluever, Chris Povirk, guava-discuss
Oh. Scala. Well, looks like the workaround mentioned here is basically what the Scala person is recommending on that thread too, so I don't think there's anything for us to fix here...

tsuna

unread,
Jul 8, 2012, 11:21:00 PM7/8/12
to Kevin Bourrillion, Benjamin Manes, Christian Gruber, Kurt Alfred Kluever, Chris Povirk, guava-discuss
On Sun, Jul 8, 2012 at 7:43 PM, Kevin Bourrillion <kev...@google.com> wrote:
> Oh. Scala. Well, looks like the workaround mentioned here is basically what
> the Scala person is recommending on that thread too, so I don't think
> there's anything for us to fix here...

Agreed, I wasn't aware of this Scala quirk. It was working fine until
13.0-rc1, which is why I thought the problem was from Guava. Sorry
for the noise.

Kevin Bourrillion

unread,
Jul 9, 2012, 8:58:22 AM7/9/12
to tsuna, Benjamin Manes, Christian Gruber, Kurt Alfred Kluever, Chris Povirk, guava-discuss
Well, there was a change we made in the way we declare the dependency, which seemed more correct/appropriate. Christian could probably explain. 

Christian Edward Gruber

unread,
Jul 9, 2012, 9:08:02 AM7/9/12
to Kevin Bourrillion, tsuna, Benjamin Manes, Kurt Alfred Kluever, Chris Povirk, guava-discuss
Short version is, we now have made the javax.annotations (jsr305) dependency optional, since find bugs, who published the artifact we depend on, has integrated it into their 2.0 release.  This meant that if you had a strong dep on the original artifact, you'd end up with duplication on the class path if you use FindBugs 2.0.   So now it's optional - needed at compile-time, but not (always) at run-time.

However, because it's optional, it means that maven will not always download it - if you use those annotations in your code, you should be declaring that dependency anyway, per maven best practice, as you should always explicitly declare your immediate (non-transitive) dependencies.  Don't try to "get things for free" because the transitive dependency graph could change between versions.

If Scala needs all the bits, then any scala consumers will need to depend on something that provides those bits (the new find bugs annotations jar, or the older jsr305 jar we use).  No getting around it.

Christian.

Chris Povirk

unread,
Jul 23, 2012, 11:52:43 AM7/23/12
to David Nouls, guava-...@googlegroups.com, Christian Gruber
> I tried to see if the previously reported GWT compilation issues with R12
> was fixed in the R12 rc1... but I now get even more errors. and this time
> they actually make the compiler abort. In R12 there was something wrong when
> generating a CustomFieldSerializer for one Immutable class, but it did not
> stop the gwt compiler. In R13 RC1 I get a huge list of other errors:
>
>
>      [java]    Validating newly compiled units
>
>      [java]       [ERROR] Errors in
> 'jar:file:/scm/vobs/rlsCOTS5/guava/JAVA/lib/guava-gwt.jar!/com/google/common/collect/testing/google/super/com/google/common/collect/testing/google/SetGenerators.java'
>
>      [java]          [ERROR] Line 17: The declared package
> "com.google.common.collect.testing.google" does not match the expected
> package
> "com.google.common.collect.testing.google.super.com.google.common.collect.testing.
>
> google"

...

There are multiple problems here:

- Some .gwt.xml files are in the wrong location:
common.collect.testing and common.collect.testing.google have their
.gwt.xml files under guava-testlib insetad of guava-gwt.
common.testing has its .gwt.xml file under guava-gwt/test instead of
guava-gwt/src.

- guava-gwt does not pull guava-testlib's sources into its jar.

Arguably this is all the same problem, which is that either guava-gwt
must depend on guava-testlib (so that users who don't need it still
depend on it) or must not work with it. Perhaps we should split to
guava-gwt and guava-testlib-gwt? I'll talk to Christian when he
returns. In the meantime, we'll probably release Guava 13 without
support for guava-testlib, as I don't think we've supported it in the
past.

Do things work for you if you use only classes from guava and not from
guava-testlib?

Chris Povirk

unread,
Jul 23, 2012, 2:05:14 PM7/23/12
to David Nouls, guava-...@googlegroups.com, Christian Gruber
Additionally, common.collect.testing and common.collect.testing.google
are missing an inherits entry for com.google.gwt.junit.JUnit, though
they get away with it because common.testing, which they depend on,
gives it to them transitively. Still, we should fix this, regardless
of what happens with the rest of the GWT/testlib question.
Reply all
Reply to author
Forward
0 new messages