Taking a closer look, the protobuf library doesn’t have this method until version 3.15. Using the debugger and reflection I was able to figure out where it was getting this class from to see why it was pulling an older one and I found it was:
So it seems like com.google.protobuf.Value is included within that jar which I was able to verify locally and on maven as well. Is there something wrong with the way that I am depending on this? I want to use a newer version of protobuf since it is required for google cloud. I found the temporal-shaded SDK but that says not to use it unless a older version of these libraries is required. Thanks so much!
Additionally, just for science I tried out the temporal-shaded dependency instead. While it shades the problematic com.google.protobuf dependencies it adds classes that are not in temporal-sdk. I am not sure why the class list is not the exact same with some shaded. Specifically, it is adding:
class com.google.longrunning.GetOperationRequest
Which is incompatible with google SDK clients that use protobuf lite.
Also, then I took a closer look at the Java SDK. And the protoVersion chosen in the build.gradle is set to 3.22, but I don’t see the expected methods on the classes that should be there in the exported client JAR. The exported JAR seems to expose a version older than that.
Hi again, wanted to point out one more thing I discovered. While building the temporal-sdk locally, I realized that between version 1.23.1 and 1.23.2, the problematic com.google.api export was added. The build.gradle within the temporal-serviceclient package had no changes so I am not sure if it was intentional. 1.23.2 was released only a few months ago and I didn’t see anything in the release notes so it might have been inadvertent.
Yes this is because these google proto APIs were added to the main Temporal API
Until these are removed the Java SDK will need to manually filter them out. That is tracked by this issue and should be included in the next Java SDK release