Gradle 3.0-rc-2 is now available for testing


(Lari Hotari) #1

Gradle 3.0-rc-2 is now available for testing

This release fixes a few issues reported against 3.0-rc-1.

  • Some deprecations were reverted related to methods accepting closures
  • Fix to incremental Java compilation
  • Allow access to Settings DSL from buildscript block to ensure backwards compatibility

Check the 3.0-rc-2 release notes for more information. If no regressions are reported, a final release will typically follow in the next week.

Upgrade Instructions

Switch your build to use Gradle 3.0-rc-2 quickly by updating your wrapper properties:

./gradlew wrapper --gradle-version=3.0-rc-2

Standalone downloads are available at https://gradle.org/release-candidate.

Reporting Problems

If you find a problem with Gradle 3.0-rc-2, please post a reply to this topic or create a new topic in Bugs. Be sure to include which operating system you are using, the version of Gradle you upgraded from and any steps you have found that reproduces your problem.


(Lari Hotari) #2

This topic is now a banner. It will appear at the top of every page until it is dismissed by the user.


(Jörn Huxhorn) #3

Everything fine with the usual three projects. Actually five projects by now.

I have one question, though…

Executing gradle --status after gradle --stop prints something like this:

No Gradle daemons are running.
   PID STATUS   INFO
 92262 STOPPED  (stop command received)
 95139 STOPPED  (stop command received)

Only Daemons for the current Gradle version are displayed. See https://docs.gradle.org/3.0-rc-2/userguide/gradle_daemon.html#sec:status

I suppose it’s expected behavior that stopped daemons are still listed. Is there a way to get rid of them - or this “history”, to be more precise?


(Eric Wendelin) #4

gradle --status will only show stopped Daemons from the last hour. As you know, these Daemons are no longer running, and we display why they stopped under INFO.

We don’t currently have a mechanism for excluding STOPPED Daemons from the output. Is that something that would be important to you?


(Jörn Huxhorn) #5

No no, everything is fine. Showing them for one hour is actually perfect. Thanks for the info. :slight_smile:


(Jochen Berger) #6

There seems to be an issue with daemon instances being left running after they enter an invalid state. One of my Gradle plugins starts to cause classpath issues in Gradle 3 (e.e. java.lang.IllegalAccessError: a.lang.IllegalAccessError: tried to access class com.google.common.collect.MapMaker$RemovalCause from class com.google.common.collect.MapMakerInternalMap$Segment).
The exceptions apparenty hit the deamon instance as well because after they occur, the daemon instance becomes unusable, every other build (also of different projects) fails with IllegalAccessErrors too until I manually kill the daemon instance.


(Pepper Lebeck-Jobe) #7

Could you provide us with some more details? In particular:

Operating System and Version:

JDK Version:

When you say, “One of my Gradle plugins …” are you referring to a publicly available Gradle plugin? If so, which version of which plugin? If not, can you share your plugin with us for debugging?

Is it possible for you to create a small gradle build which reliably reproduces this failure condition?


(Jochen Berger) #8

I run Debian testing/unstable, openjdk version "1.8.0_102"
The plugin is https://plugins.gradle.org/plugin/com.github.jochenberger.lein (https://github.com/jochenberger/gradle-lein). It’s probably a classpath conflict between Gradle and Leiningen. I plan to debug this myself but couldn’t get a simple TestKit test to run, but that’s another issue.
The stacktrace looks like this:

* Exception is:
java.lang.IllegalAccessError: tried to access class com.google.common.collect.SortedLists from class com.google.common.collect.RegularImmutableSortedSet
        at com.google.common.collect.RegularImmutableSortedSet.indexOf(RegularImmutableSortedSet.java:274)
        at com.google.common.collect.RegularImmutableSortedMap.get(RegularImmutableSortedMap.java:96)
        at org.gradle.api.internal.changedetection.rules.OutputFilesTaskStateChanges.getSnapshotAfterPreviousExecution(OutputFilesTaskStateChanges.java:71)
        at org.gradle.api.internal.changedetection.rules.OutputFilesTaskStateChanges.saveCurrent(OutputFilesTaskStateChanges.java:59)
        at org.gradle.api.internal.changedetection.rules.AbstractNamedFileSnapshotTaskStateChanges.snapshotAfterTask(AbstractNamedFileSnapshotTaskStateChanges.java:146)
        at org.gradle.api.internal.changedetection.rules.OutputFilesTaskStateChanges.snapshotAfterTask(OutputFilesTaskStateChanges.java:32)
        at org.gradle.api.internal.changedetection.rules.CachingTaskStateChanges.snapshotAfterTask(CachingTaskStateChanges.java:84)
        at org.gradle.api.internal.changedetection.rules.SummaryTaskStateChanges.snapshotAfterTask(SummaryTaskStateChanges.java:73)
        at org.gradle.api.internal.changedetection.changes.DefaultTaskArtifactStateRepository$TaskArtifactStateImpl.afterTask(DefaultTaskArtifactStateRepository.java:152)
        at org.gradle.api.internal.changedetection.changes.ShortCircuitTaskArtifactStateRepository$RerunTaskArtifactState.afterTask(ShortCircuitTaskArtifactStateRepository.java:97)
        at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:66)
        at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
        at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:52)
        at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
        at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)
        at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
        at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:203)
        at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:185)
        at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:74)
        at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:55)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:32)
        at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:110)
        at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:37)
        at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
        at org.gradle.execution.DefaultBuildExecuter.access$000(DefaultBuildExecuter.java:23)
        at org.gradle.execution.DefaultBuildExecuter$1.proceed(DefaultBuildExecuter.java:43)
        at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
        at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
        at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:30)
        at org.gradle.initialization.DefaultGradleLauncher$4.run(DefaultGradleLauncher.java:153)
        at org.gradle.internal.Factories$1.create(Factories.java:22)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:91)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:53)
        at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:150)
        at org.gradle.initialization.DefaultGradleLauncher.access$200(DefaultGradleLauncher.java:32)
        at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:98)
        at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:92)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:91)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:63)
        at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:92)
        at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:83)
        at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:94)
        at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:28)
        at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
        at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:43)
        at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:28)
        at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:82)
        at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:49)
        at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:59)
        at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
        at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:49)
        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
        at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:26)
        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
        at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:34)
        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
        at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:74)
        at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:72)
        at org.gradle.util.Swapper.swap(Swapper.java:38)
        at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:72)
        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
        at org.gradle.launcher.daemon.server.exec.LogAndCheckHealth.execute(LogAndCheckHealth.java:55)
        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
        at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:60)
        at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
        at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:72)
        at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
        at org.gradle.launcher.daemon.server.exec.HintGCAfterBuild.execute(HintGCAfterBuild.java:44)
        at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
        at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:50)
        at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:240)
        at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54)
        at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)

But regardless of any bugs in the plugin, I think the deamon instance should be thrown away after a java.lang.Error occurs.


(Jochen Berger) #9

As for the plugin errors themselves: I suspect that something changed in the plugin initialization/classloading procedure between 3.0-milestone-2 and -rc-1. That would also explain why https://github.com/jochenberger/gradle-lein/blob/master/src/test/groovy/com/github/jochenberger/gradlelein/LeinPluginSpec.groovy succeeds with the 3.0 RC builds only.


(Pepper Lebeck-Jobe) #10

This topic is no longer a banner. It will no longer appear at the top of every page.


(Jochen Berger) #11

FWIW, this also happens with Gradle 3.0.