-
Notifications
You must be signed in to change notification settings - Fork 273
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
Protobuf plugin in not Gradle configuration cache compatible starting Gradle 8.1 #687
Comments
That's the point that the stack trace just started getting interesting. What was after that? What was after the |
I dont fully understand what you mean, the relevant lines are:
which means plugin calls getProject on GenerateProtoTask.groovy:109 However, if you want to see the full stacktrace from the configuration cache report it is:
|
The question is more "why is that being called." So I needed more call stack.
Looks like |
This fixes a configuration cache incompatibility seen on Gradle 8.1 and that seemed to requiring other configuration bits as well. I have not reproduced the original issue, but a user has confirmed this fix works and the original stack trace definitely pointed to the annotation: ``` ... at com.google.protobuf.gradle.GenerateProtoTask.getIsTest(GenerateProtoTask.groovy:482) at com.google.protobuf.gradle.GenerateProtoTask_Decorated.getIsTest(Unknown Source) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at org.gradle.internal.reflect.annotations.impl.DefaultPropertyAnnotationMetadata.getPropertyValue(DefaultPropertyAnnotationMetadata.java:97) at org.gradle.internal.properties.annotations.DefaultTypeMetadataStore$DefaultPropertyMetadata.getPropertyValue(DefaultTypeMetadataStore.java:266) at org.gradle.internal.properties.bean.DefaultPropertyWalker$1.lambda$visitLeaf$0(DefaultPropertyWalker.java:88) at org.gradle.internal.deprecation.DeprecationLogger.whileDisabled(DeprecationLogger.java:258) at org.gradle.internal.properties.bean.DefaultPropertyWalker$CachedPropertyValue.lambda$new$0(DefaultPropertyWalker.java:105) at com.google.common.base.Suppliers$NonSerializableMemoizingSupplier.get(Suppliers.java:183) at org.gradle.internal.properties.bean.DefaultPropertyWalker$CachedPropertyValue.call(DefaultPropertyWalker.java:147) at org.gradle.util.internal.GUtil.uncheckedCall(GUtil.java:437) at org.gradle.util.internal.DeferredUtil.unpackNestableDeferred(DeferredUtil.java:83) at org.gradle.util.internal.DeferredUtil.unpack(DeferredUtil.java:57) at org.gradle.util.internal.DeferredUtil.unpackOrNull(DeferredUtil.java:49) at org.gradle.api.internal.tasks.properties.InputParameterUtils.prepareInputParameterValue(InputParameterUtils.java:38) at org.gradle.api.internal.tasks.properties.InputParameterUtils.prepareInputParameterValue(InputParameterUtils.java:30) ... ``` Fixes google#687
This fixes a configuration cache incompatibility seen on Gradle 8.1 and that seemed to requiring other configuration bits as well. I have not reproduced the original issue, but a user has confirmed this fix works and the original stack trace definitely pointed to the annotation: ``` ... at com.google.protobuf.gradle.GenerateProtoTask.getIsTest(GenerateProtoTask.groovy:482) at com.google.protobuf.gradle.GenerateProtoTask_Decorated.getIsTest(Unknown Source) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at org.gradle.internal.reflect.annotations.impl.DefaultPropertyAnnotationMetadata.getPropertyValue(DefaultPropertyAnnotationMetadata.java:97) at org.gradle.internal.properties.annotations.DefaultTypeMetadataStore$DefaultPropertyMetadata.getPropertyValue(DefaultTypeMetadataStore.java:266) at org.gradle.internal.properties.bean.DefaultPropertyWalker$1.lambda$visitLeaf$0(DefaultPropertyWalker.java:88) at org.gradle.internal.deprecation.DeprecationLogger.whileDisabled(DeprecationLogger.java:258) at org.gradle.internal.properties.bean.DefaultPropertyWalker$CachedPropertyValue.lambda$new$0(DefaultPropertyWalker.java:105) at com.google.common.base.Suppliers$NonSerializableMemoizingSupplier.get(Suppliers.java:183) at org.gradle.internal.properties.bean.DefaultPropertyWalker$CachedPropertyValue.call(DefaultPropertyWalker.java:147) at org.gradle.util.internal.GUtil.uncheckedCall(GUtil.java:437) at org.gradle.util.internal.DeferredUtil.unpackNestableDeferred(DeferredUtil.java:83) at org.gradle.util.internal.DeferredUtil.unpack(DeferredUtil.java:57) at org.gradle.util.internal.DeferredUtil.unpackOrNull(DeferredUtil.java:49) at org.gradle.api.internal.tasks.properties.InputParameterUtils.prepareInputParameterValue(InputParameterUtils.java:38) at org.gradle.api.internal.tasks.properties.InputParameterUtils.prepareInputParameterValue(InputParameterUtils.java:30) ... ``` Fixes #687
This fixes a configuration cache incompatibility seen on Gradle 8.1 and that seemed to requiring other configuration bits as well. I have not reproduced the original issue, but a user has confirmed this fix works and the original stack trace definitely pointed to the annotation: ``` ... at com.google.protobuf.gradle.GenerateProtoTask.getIsTest(GenerateProtoTask.groovy:482) at com.google.protobuf.gradle.GenerateProtoTask_Decorated.getIsTest(Unknown Source) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at org.gradle.internal.reflect.annotations.impl.DefaultPropertyAnnotationMetadata.getPropertyValue(DefaultPropertyAnnotationMetadata.java:97) at org.gradle.internal.properties.annotations.DefaultTypeMetadataStore$DefaultPropertyMetadata.getPropertyValue(DefaultTypeMetadataStore.java:266) at org.gradle.internal.properties.bean.DefaultPropertyWalker$1.lambda$visitLeaf$0(DefaultPropertyWalker.java:88) at org.gradle.internal.deprecation.DeprecationLogger.whileDisabled(DeprecationLogger.java:258) at org.gradle.internal.properties.bean.DefaultPropertyWalker$CachedPropertyValue.lambda$new$0(DefaultPropertyWalker.java:105) at com.google.common.base.Suppliers$NonSerializableMemoizingSupplier.get(Suppliers.java:183) at org.gradle.internal.properties.bean.DefaultPropertyWalker$CachedPropertyValue.call(DefaultPropertyWalker.java:147) at org.gradle.util.internal.GUtil.uncheckedCall(GUtil.java:437) at org.gradle.util.internal.DeferredUtil.unpackNestableDeferred(DeferredUtil.java:83) at org.gradle.util.internal.DeferredUtil.unpack(DeferredUtil.java:57) at org.gradle.util.internal.DeferredUtil.unpackOrNull(DeferredUtil.java:49) at org.gradle.api.internal.tasks.properties.InputParameterUtils.prepareInputParameterValue(InputParameterUtils.java:38) at org.gradle.api.internal.tasks.properties.InputParameterUtils.prepareInputParameterValue(InputParameterUtils.java:30) ... ``` Fixes google#687
This fixes a configuration cache incompatibility seen on Gradle 8.1 and that seemed to requiring other configuration bits as well. I have not reproduced the original issue, but a user has confirmed this fix works and the original stack trace definitely pointed to the annotation: ``` ... at com.google.protobuf.gradle.GenerateProtoTask.getIsTest(GenerateProtoTask.groovy:482) at com.google.protobuf.gradle.GenerateProtoTask_Decorated.getIsTest(Unknown Source) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at org.gradle.internal.reflect.annotations.impl.DefaultPropertyAnnotationMetadata.getPropertyValue(DefaultPropertyAnnotationMetadata.java:97) at org.gradle.internal.properties.annotations.DefaultTypeMetadataStore$DefaultPropertyMetadata.getPropertyValue(DefaultTypeMetadataStore.java:266) at org.gradle.internal.properties.bean.DefaultPropertyWalker$1.lambda$visitLeaf$0(DefaultPropertyWalker.java:88) at org.gradle.internal.deprecation.DeprecationLogger.whileDisabled(DeprecationLogger.java:258) at org.gradle.internal.properties.bean.DefaultPropertyWalker$CachedPropertyValue.lambda$new$0(DefaultPropertyWalker.java:105) at com.google.common.base.Suppliers$NonSerializableMemoizingSupplier.get(Suppliers.java:183) at org.gradle.internal.properties.bean.DefaultPropertyWalker$CachedPropertyValue.call(DefaultPropertyWalker.java:147) at org.gradle.util.internal.GUtil.uncheckedCall(GUtil.java:437) at org.gradle.util.internal.DeferredUtil.unpackNestableDeferred(DeferredUtil.java:83) at org.gradle.util.internal.DeferredUtil.unpack(DeferredUtil.java:57) at org.gradle.util.internal.DeferredUtil.unpackOrNull(DeferredUtil.java:49) at org.gradle.api.internal.tasks.properties.InputParameterUtils.prepareInputParameterValue(InputParameterUtils.java:38) at org.gradle.api.internal.tasks.properties.InputParameterUtils.prepareInputParameterValue(InputParameterUtils.java:30) ... ``` Fixes #687
@ejona86 Thanks for the fix. When can we expect a new release? We've disabled configuration-cache after upgrading to gradle 8.1 solely due to this plugin :-/ |
- Add a fix for users of this plugin to call correct sourceSets object as it is now shadowed by protobuf extension getSourceSets https://github.com/google/protobuf-gradle-plugin/blame/master/src/main/groovy/com/google/protobuf/gradle/ProtobufExtension.groovy#L75 - Pulls in a fix for google/protobuf-gradle-plugin#687 Test: ./gradlew bOS --dry-run Change-Id: Id1c0a7e809e7067933be260c51a68140990db78e
When using protobuf gradle plugin 0.9.0 with Gradle 8.1 we see configuration cache violations:
there are two stacktraces for each task.
and
The text was updated successfully, but these errors were encountered: