Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Guava library dependency #140

Closed
wonderfly opened this issue Jan 9, 2015 · 13 comments
Closed

Remove Guava library dependency #140

wonderfly opened this issue Jan 9, 2015 · 13 comments
Assignees
Labels
type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@wonderfly
Copy link
Contributor

From yan...@google.com on July 09, 2012 10:04:50

External references, such as a standards document, or specification? http://docs.guava-libraries.googlecode.com/git-history/release/javadoc/com/google/common/annotations/Beta.html http://www.overstocktechblog.com/2012/06/25/announcing-library-detectors/ Java environments (e.g. Java 6, Android 2.3, App Engine, or All)? All Please describe the feature requested. Guava uses the @beta annotation to indicate library API that hasn't yet matured and may change in the future. Currently we are in Beta so all of our library is that way. But supposedly we will want to go out of Beta soon, so the @beta annotation would be very useful to cover the parts of our library that aren't ready to go out of Beta, such as our XML support.

Thanks to Overstock.com there is now even a FindBugs plugin to catch usage of @beta APIs. We can offer that tool for developers that want to enforce use of only @beta APIs, e.g. those that are developing libraries that depend on our library.

Original issue: http://code.google.com/p/google-http-java-client/issues/detail?id=140

@wonderfly wonderfly added type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. imported labels Jan 9, 2015
@wonderfly wonderfly self-assigned this Jan 9, 2015
@wonderfly
Copy link
Contributor Author

From yan...@google.com on November 10, 2012 04:57:10

Owner: ngmic...@google.com
Labels: -Priority-Medium Priority-High Milestone-Version1.15.0

@wonderfly
Copy link
Contributor Author

From yan...@google.com on December 10, 2012 06:52:48

Change of plans: we decided that we are instead going to rename that library into version 2, and branch off the existing library minus the Beta parts into a version 1 library that we will soon take out of Beta. But rather than close this issue, I'm going to reuse it for a new meaning: eliminate use of @beta API from Guava in the version 1 branch.

Summary: Remove out use of @beta API from Guava in version 1 (was: Use @beta for beta API)
Cc: rmis...@google.com
Labels: -Milestone-Version1.15.0 Milestone-Version1.14.0

@wonderfly
Copy link
Contributor Author

From yan...@google.com on December 10, 2012 10:15:30

Here's a diff for catching beta APIs from Guava:

diff -r 60074cd807e9 pom.xml
--- a/pom.xml Wed Nov 28 12:10:14 2012 -0500
+++ b/pom.xml Mon Dec 10 13:09:35 2012 -0500
@@ -292,7 +292,7 @@

org.codehaus.mojo
findbugs-maven-plugin

  •      <version>2.3.2</version>
    
  •      <version>2.5.2</version>
     </plugin>
     <plugin>
       <groupId>org.sonatype.plugins</groupId>
    
    @@ -427,6 +427,13 @@
    findbugs-maven-plugin

    ${basedir}/../findbugs-exclude.xml
  •      <plugins>
    
  •        <plugin>
    
  •          <groupId>com.overstock.findbugs</groupId>
    
  •          <artifactId>library-detectors</artifactId>
    
  •          <version>1.1</version>
    
  •        </plugin>
    
  •      </plugins>
     </configuration>
     <executions>
       <execution>
    

It reports the following @beta APIs problems on google-http-client

[INFO] --- findbugs-maven-plugin:2.5.2:check (default) @ google-http-client ---
[INFO] Use of class com.google.common.io.ByteStreams, which is annotated with @beta. ["com.google.api.client.http.AbstractInputStreamContent", "com.google.common.io.ByteStreams"] At AbstractInputStreamContent.java:[lines 58-199]At ByteStreams.java:[lines 52-866]
[INFO] Use of class com.google.common.io.CharStreams, which is annotated with @beta. ["com.google.api.client.http.UrlEncodedParser", "com.google.common.io.CharStreams"] At UrlEncodedParser.java:[lines 67-207]At CharStreams.java:[lines 57-436]
[INFO] Use of class com.google.common.primitives.UnsignedInteger, which is annotated with @beta. ["com.google.api.client.json.JsonParser", "com.google.common.primitives.UnsignedInteger"] At JsonParser.java:[lines 50-660]At UnsignedInteger.java:[lines 44-244]
[INFO] Use of class com.google.common.primitives.UnsignedLong, which is annotated with @beta. ["com.google.api.client.json.JsonParser", "com.google.common.primitives.UnsignedLong"] At JsonParser.java:[lines 50-660]At UnsignedLong.java:[lines 42-247]
[INFO] Use of class com.google.common.primitives.UnsignedInteger, which is annotated with @beta. ["com.google.api.client.util.Data", "com.google.common.primitives.UnsignedInteger"] At Data.java:[lines 46-550]At UnsignedInteger.java:[lines 44-244]
[INFO] Use of class com.google.common.primitives.UnsignedLong, which is annotated with @beta. ["com.google.api.client.util.Data", "com.google.common.primitives.UnsignedLong"] At Data.java:[lines 46-550]At UnsignedLong.java:[lines 42-247]
[INFO] Use of class com.google.common.primitives.UnsignedInteger, which is annotated with @beta. ["com.google.api.client.util.Data", "com.google.common.primitives.UnsignedInteger"] At Data.java:[lines 46-550]At UnsignedInteger.java:[lines 44-244]
[INFO] Use of class com.google.common.primitives.UnsignedLong, which is annotated with @beta. ["com.google.api.client.util.Data", "com.google.common.primitives.UnsignedLong"] At Data.java:[lines 46-550]At UnsignedLong.java:[lines 42-247]
[INFO] Use of class com.google.common.primitives.UnsignedInteger, which is annotated with @beta. ["com.google.api.client.util.Data", "com.google.common.primitives.UnsignedInteger"] At Data.java:[lines 46-550]At UnsignedInteger.java:[lines 44-244]
[INFO] Use of class com.google.common.primitives.UnsignedLong, which is annotated with @beta. ["com.google.api.client.util.Data", "com.google.common.primitives.UnsignedLong"] At Data.java:[lines 46-550]At UnsignedLong.java:[lines 42-247]
[INFO] Use of class com.google.common.primitives.UnsignedInteger, which is annotated with @beta. ["com.google.api.client.util.Data", "com.google.common.primitives.UnsignedInteger"] At Data.java:[lines 46-550]At UnsignedInteger.java:[lines 44-244]
[INFO] Use of class com.google.common.primitives.UnsignedInteger, which is annotated with @beta. ["com.google.api.client.util.Data", "com.google.common.primitives.UnsignedInteger"] At Data.java:[lines 46-550]At UnsignedInteger.java:[lines 44-244]
[INFO] Use of class com.google.common.primitives.UnsignedLong, which is annotated with @beta. ["com.google.api.client.util.Data", "com.google.common.primitives.UnsignedLong"] At Data.java:[lines 46-550]At UnsignedLong.java:[lines 42-247]
[INFO] Use of class com.google.common.primitives.UnsignedLong, which is annotated with @beta. ["com.google.api.client.util.Data", "com.google.common.primitives.UnsignedLong"] At Data.java:[lines 46-550]At UnsignedLong.java:[lines 42-247]

Summary: Remove use of @beta API from Guava in version 1 (was: Remove out use of @beta API from Guava in version 1)

@wonderfly
Copy link
Contributor Author

From yan...@google.com on January 09, 2013 06:45:38

Owner: yan...@google.com
Cc: ngmic...@google.com

@wonderfly
Copy link
Contributor Author

From yan...@google.com on January 26, 2013 05:37:47

We've decide to go even further: not only are we going to eliminate the use of all @beta Gauva APIs, we are also going to jarjar Guava into our library so developers won't need to add Guava to their classpath. We will fully accomplish this in 1.15. For 1.14, we will accomplish the following:

  1. Make proxy classes of Guava API we use into the com.google.api.client.util package for the following classes: , Joiner, Lists, Maps, Objects, Preconditions, Strings, & Throwables
  2. Deprecate the use of the following classes: UnsignedInteger & UnsignedLong
  3. Make a copy (not a proxy) of the following Guava APIs we use into the com.google.api.client.util package for the following classes: Charsets, ByteStreams (includes LimitInputStream), CharStreams
  4. Stop using ListMultimap & ArrayListMultimap in MockLowLevelHttpRequest
  5. Not sure yet what to do about SettableFuture in HttpRequest

Cc: pele...@google.com

@wonderfly
Copy link
Contributor Author

From yan...@google.com on January 26, 2013 05:38:16

Summary: Limit use of Guava library (was: Remove use of @beta API from Guava in version 1)

@wonderfly
Copy link
Contributor Author

From ca...@carey.geek.nz on January 28, 2013 14:28:53

As far as I can tell, java.util.concurrent.FutureTask will work just as well in HttpRequest as the Guava SettableFuture.

@wonderfly
Copy link
Contributor Author

From yan...@google.com on January 28, 2013 17:01:15

Thanks for the tip! Removing use of SettableFuture sent for review here: https://codereview.appspot.com/7235054/

Status: Started

@wonderfly
Copy link
Contributor Author

From yan...@google.com on January 29, 2013 07:06:08

More changesets sent for review: https://codereview.appspot.com/7230044/ (proxy for some classes from Guava: Charsets, Joiner,
Lists, Maps, Objects, Preconditions, Strings, Throwables) https://codereview.appspot.com/7231053/ (eliminate use of Guava's ListMultimap in MockLowLevelHttpRequest) https://codereview.appspot.com/7225058/ (eliminate use of Guava's UnsignedLong & UnsignedInteger) https://codereview.appspot.com/7237052/ (eliminate use of Guava's CharStreams)

@wonderfly
Copy link
Contributor Author

From yan...@google.com on January 31, 2013 17:27:40

another one: https://codereview.appspot.com/7231074/ (jarjar guava & change scope to test/provided)

@wonderfly
Copy link
Contributor Author

From yan...@google.com on February 06, 2013 12:58:46

Last one and then we can mark this as fixed: https://codereview.appspot.com/7303054/

@wonderfly
Copy link
Contributor Author

From yan...@google.com on February 06, 2013 12:59:28

Summary: Remove Guava library dependency (was: Limit use of Guava library)

@wonderfly
Copy link
Contributor Author

From yan...@google.com on February 06, 2013 13:00:28

Status: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

1 participant