:tada: Gradle 8.11-rc-1 is out! <https://docs.grad...
# releases
c
party gradlephant 12
šŸŽ‰ 6
j
i tested the nightlies and parallel configuration cache store/load makes configuration about 40% faster if you have the dependencies downloaded locally, or about 25% faster if not already downloaded
party gradlephant 6
šŸ™Œ 2
šŸ’Æ 2
s
After the 8.11-rc-1, the project started throwing this error ( a multi module kotlin project)
Copy code
Could not determine the dependencies of task ':check'.
> Could not create task ':test'.
   > Could not create task of type 'Test'.
      > Could not create an instance of type org.gradle.api.internal.tasks.testing.DefaultTestTaskReports.
         > Could not create an instance of type org.gradle.api.reporting.internal.DefaultReportContainer.
            > Type T not present

...------------------------
Caused by: org.gradle.api.reflect.ObjectInstantiationException: Could not create an instance of type org.gradle.api.internal.tasks.testing.DefaultTestTaskReports.
        at org.gradle.internal.instantiation.generator.DependencyInjectingInstantiator.doCreate(DependencyInjectingInstantiator.java:70)
        at org.gradle.internal.instantiation.generator.DependencyInjectingInstantiator.newInstance(DependencyInjectingInstantiator.java:56)
        at org.gradle.api.internal.model.DefaultObjectFactory.newInstance(DefaultObjectFactory.java:92)
        at org.gradle.api.tasks.testing.AbstractTestTask.<init>(AbstractTestTask.java:186)
        at org.gradle.api.tasks.testing.Test.<init>(Test.java:185)
        at org.gradle.api.tasks.testing.Test_Decorated.<init>(Unknown Source)
        at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62)
        at org.gradle.internal.instantiation.generator.AsmBackedClassGenerator$InvokeConstructorStrategy.newInstance(AsmBackedClassGenerator.java:2107)
        at org.gradle.internal.instantiation.generator.AbstractClassGenerator$GeneratedClassImpl$GeneratedConstructorImpl.newInstance(AbstractClassGenerator.java:544)
        at org.gradle.internal.instantiation.generator.DependencyInjectingInstantiator.doCreate(DependencyInjectingInstantiator.java:65)
        at org.gradle.internal.instantiation.generator.DependencyInjectingInstantiator.newInstanceWithDisplayName(DependencyInjectingInstantiator.java:51)
        at org.gradle.api.internal.project.taskfactory.TaskFactory$1.call(TaskFactory.java:88)
        ... 170 more
Caused by: org.gradle.api.reflect.ObjectInstantiationException: Could not create an instance of type org.gradle.api.reporting.internal.DefaultReportContainer.
        at org.gradle.internal.instantiation.generator.DependencyInjectingInstantiator.doCreate(DependencyInjectingInstantiator.java:70)
        at org.gradle.internal.instantiation.generator.DependencyInjectingInstantiator.newInstance(DependencyInjectingInstantiator.java:56)
        at org.gradle.api.internal.model.DefaultObjectFactory.newInstance(DefaultObjectFactory.java:92)
        at org.gradle.api.reporting.internal.DefaultReportContainer.create(DefaultReportContainer.java:68)
        at org.gradle.api.internal.tasks.testing.DefaultTestTaskReports.<init>(DefaultTestTaskReports.java:37)
        at org.gradle.api.internal.tasks.testing.DefaultTestTaskReports_Decorated.<init>(Unknown Source)
        at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62)
        at org.gradle.internal.instantiation.generator.AsmBackedClassGenerator$InvokeConstructorStrategy.newInstance(AsmBackedClassGenerator.java:2107)
        at org.gradle.internal.instantiation.generator.AbstractClassGenerator$GeneratedClassImpl$GeneratedConstructorImpl.newInstance(AbstractClassGenerator.java:544)
        at org.gradle.internal.instantiation.generator.DependencyInjectingInstantiator.doCreate(DependencyInjectingInstantiator.java:65)
        ... 181 more
Caused by: java.lang.TypeNotPresentException: Type T not present
        at org.gradle.internal.instantiation.generator.AbstractClassGenerator$GeneratedClassImpl$GeneratedConstructorImpl.getGenericParameterTypes(AbstractClassGenerator.java:574)
        at org.gradle.internal.instantiation.generator.DependencyInjectingInstantiator.addServicesToParameters(DependencyInjectingInstantiator.java:163)
        at org.gradle.internal.instantiation.generator.DependencyInjectingInstantiator.convertParameters(DependencyInjectingInstantiator.java:122)
        at org.gradle.internal.instantiation.generator.DependencyInjectingInstantiator.doCreate(DependencyInjectingInstantiator.java:63)
        ... 190 more
šŸ‘€ 1
Any idea whats happening here? Things are working fine if i rollback to
8.10.2
m
Hey team. I see this in the release notes:
Configuration Cache enabled by default when using the Build Init plugin
I would personally disable this. Configuration cache is a very disruptive feature, which forces to rewrite plugins in a compatible manner, e.g, rewriting lambdas so that they do not capture state, making them serializable, etc. Despite having reasonable experience with writing plugins, the GraalVM native build tools plugin is in practice not compatible, and we have found no way to make it compatible. It's extremely hard to debug since despite integration tests, a slight change in configuration is likely to break the builds. I honestly don't think it's reasonable to make such a feature the default execution mode. I know the plans, but it puts a lot of pressure on plugin authors, on things which are extremely hard to debug.
i
I'm intermittently getting a hang in the Gradle Daemon when syncing a project in IntelliJ 2024.2.3 right after updating to 8.11-rc-1. I've reproduced it with two different projects on Mac and Windows. I'll file an issue on GitHub this weekend with details, but I wanted to make you all aware.
c
@Ian Brandt we are currently aware of a deadlock where a fix is already in the works, are you encountering the same issue?
i
I saw that one. I'm not sure whether they're the same. I don't have that same stack in a current thread dump on mine. I've also reproduced on Windows.
Windows hang:
If you let me know whether that looks the same or different, I'll update the existing or file a new issue accordingly.
c
@Ian Brandt I think it's fine to just file a second issue, if it ends up being the same we can simply close it as a duplicate
šŸ‘ 1
i
j
@Suresh Do you have a standalone reproducer for your reported regression?
s
@Justin Van Dort The issue was due to jdk 24. My playground project is running on openjdk ea builds and things were working fine until 8.10.2 (even though there is no official gradle support) . I think this change (moving from reflection to asm) caused it. Anyway moving the daemon jvm to 21 fixed the issue.