google / TestParameterInjector

A simple yet powerful parameterized test runner for Java.
Apache License 2.0
397 stars 34 forks source link

Wrong transitive dependency protobuf #23

Closed SimonMarquis closed 2 years ago

SimonMarquis commented 2 years ago

👋 Hi, In the 1.4 release, you mentionned

Replaced dependency on protobuf-java by a dependency on protobuf-javalite

But in fact, this is not what has been done in https://github.com/google/TestParameterInjector/commit/acb188b5e8c37e749c872dafa8007bc36f02920d#diff-9c5fb3d1b7e3b0f54bc5c4182965c4fe1f9023d449017cece3005d3f90e8e4d8L137-R138

-      <artifactId>protobuf-java</artifactId>
-      <version>3.14.0</version>
+      <artifactId>protobuf-lite</artifactId>
+      <version>3.0.1</version>

The switch is from protobuf-java to protobuf-lite. And this is still causing errors when using with firebase-perfs (where GeneratedMessageLite is coming from your transitive dependency instead of firebase's):

java.lang.NoSuchMethodError: 'void com.google.protobuf.GeneratedMessageLite.registerDefaultInstance(java.lang.Class, com.google.protobuf.GeneratedMessageLite)' 
at com.google.firebase.perf.v1.TraceMetric.<clinit>(TraceMetric.java:1945)  
at com.google.firebase.perf.metrics.TraceMetricBuilder.build(TraceMetricBuilder.java:39)    
at com.google.firebase.perf.metrics.Trace.stop(Trace.java:258)

It's only "recently" that the correct dependency has been restored: https://github.com/google/TestParameterInjector/commit/4d0fe8852d4eda4e2179ac2e82d988e3588e92b9

-      <artifactId>protobuf-lite</artifactId>
-      <version>3.0.1</version>
+      <artifactId>protobuf-javalite</artifactId>
+      <version>3.20.0</version>

Do you have any plan to release this fix? Regards

nymanjens commented 2 years ago

Thanks for letting me know you're having this issue! I'll start the process for releasing the next version.

nymanjens commented 2 years ago

Looks like @GediminasZukas added this via https://github.com/google/TestParameterInjector/pull/21, but I forgot to trigger a release after this change.

nymanjens commented 2 years ago

I sent a new release v1.9 to the Maven repositories. It usually takes about a day to show up in there.