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

GenerateProtoTask.getIsTest() is internal, not an input (v0.9.x) #692

Merged
merged 1 commit into from
Apr 20, 2023

Conversation

ejona86
Copy link
Collaborator

@ejona86 ejona86 commented Apr 19, 2023

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

Backport of #691

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
@ejona86 ejona86 merged commit 8c6282b into google:v0.9.x Apr 20, 2023
@ejona86 ejona86 deleted the backport-config-cache-8.1 branch April 20, 2023 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants