indeedeng / proctor

Proctor is a Java-based A/B testing framework developed by, and used heavily within, Indeed.
http://opensource.indeedeng.io/proctor
Other
465 stars 123 forks source link

Compatibility with guava 21 #18

Open jiri-pejchal opened 7 years ago

jiri-pejchal commented 7 years ago

Proctor can't be run with guava 21.

java.lang.NoSuchMethodError: com.google.common.base.Objects.firstNonNull(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
    at com.indeed.proctor.common.model.TestType.register(TestType.java:34) ~[proctor-common-1.1.27.jar:na]
    at com.indeed.proctor.common.model.TestType.<clinit>(TestType.java:96) ~[proctor-common-1.1.27.jar:na]
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.8.0_102]
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[na:1.8.0_102]
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.8.0_102]
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[na:1.8.0_102]
    at com.fasterxml.jackson.databind.introspect.AnnotatedConstructor.call1(AnnotatedConstructor.java:129) ~[jackson-databind-2.8.5.jar:2.8.5]
    at com.fasterxml.jackson.databind.deser.std.StdValueInstantiator.createFromString(StdValueInstantiator.java:318) ~[jackson-databind-2.8.5.jar:2.8.5]

In guava 21 method com.google.common.base.Objects.firstNonNull has been moved to com.google.common.base.MoreObjects.

youknowjack commented 7 years ago

Guava 21 requires Java 8. I have a branch building and passing unit tests. To compile:

$ git clone git@github.com:indeedeng/common-parent-pom.git
$ cd common-parent-pom
$ git checkout guava-21
$ mvn install

$ cd ..
$ git clone git@github.com:indeedeng/oss-parent-pom.git
$ cd oss-parent-pom
$ git checkout guava-21
$ mvn install

$ cd ..
$ git clone git@github.com:indeedeng/proctor.git
$ cd proctor
$ git checkout guava-21
$ mvn install package

That should build Proctor jars with version 2.0.0. Note that we've done no integration testing of these branches at all yet.

We should be able to publish 2.0 to Maven in the next month or so.

tkruse commented 5 years ago

seems a cleanup of guave methods has been done in the meantime, something holding us back are guava usages in varexport dependency.