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

Support Gradle configuration cache #96

Open
eugene-krivobokov opened this issue Nov 1, 2021 · 6 comments
Open

Support Gradle configuration cache #96

eugene-krivobokov opened this issue Nov 1, 2021 · 6 comments

Comments

@eugene-krivobokov
Copy link

Configuration cache is not working due to usage of unsupported operations

Gradle.addListener ...
at Mirakle$apply$3$1.execute(Mirakle.kt:320)
at Mirakle$apply$3$1.execute(Mirakle.kt:75)
Gradle.buildFinished ...
at Mirakle$apply$3$1.execute(Mirakle.kt:321)
at Mirakle$apply$3$1.execute(Mirakle.kt:75)

https://docs.gradle.org/current/userguide/configuration_cache.html#config_cache:requirements:build_listeners

Environment

Mirkle: 1.4.3
Gradle: 7.3 rc3

@skrugly
Copy link
Owner

skrugly commented Nov 6, 2021

Could you provide the steps to reproduce this please.
I've enabled configuration cache, but it is not getting triggered on the local machine and Involved only on remote machine as intended.

@samoylenkodmitry
Copy link

Same problem in our project :(

➜  ivi git:(develop) ./gradlew assemblemobiledebug --stacktrace 
Configuration cache is an incubating feature.
Configuration on demand is an incubating feature.
Reusing configuration cache.
> Task :executeOnRemote FAILED

6 problems were found reusing the configuration cache, 5 of which seem unique.
- Task `:downloadFromRemote` of type `org.gradle.api.tasks.Exec`: cannot deserialize object of type 'org.gradle.api.Task' as these are not supported with the configuration cache.
  See https://docs.gradle.org/7.4/userguide/configuration_cache.html#config_cache:requirements:task_access
- Task `:executeOnRemote` of type `org.gradle.api.tasks.Exec`: cannot deserialize object of type 'java.io.OutputStream' as these are not supported with the configuration cache.
  See https://docs.gradle.org/7.4/userguide/configuration_cache.html#config_cache:requirements:disallowed_types
- Task `:executeOnRemote` of type `org.gradle.api.tasks.Exec`: cannot deserialize object of type 'org.gradle.api.Task' as these are not supported with the configuration cache.
  See https://docs.gradle.org/7.4/userguide/configuration_cache.html#config_cache:requirements:task_access
- Task `:mirakle` of type `org.gradle.api.DefaultTask`: cannot deserialize object of type 'org.gradle.api.Task' as these are not supported with the configuration cache.
  See https://docs.gradle.org/7.4/userguide/configuration_cache.html#config_cache:requirements:task_access
- Task `:mirakle` of type `org.gradle.api.DefaultTask`: cannot deserialize object of type 'org.gradle.api.invocation.Gradle' as these are not supported with the configuration cache.
  See https://docs.gradle.org/7.4/userguide/configuration_cache.html#config_cache:requirements:disallowed_types

See the complete report at file:///home/s/develop/projects/ivi4/zengalt-android-ivi/ivi/build/reports/configuration-cache/axbhssf67tv5424kvt0aq6si0/dk7r4mfeugn6kcugprpgdrjq3/configuration-cache-report.html

FAILURE: Build failed with an exception.

* What went wrong:
Could not evaluate onlyIf predicate for task ':executeOnRemote'.
> java.lang.NullPointerException (no error message)

* Try:
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Exception is:
org.gradle.api.GradleException: Could not evaluate onlyIf predicate for task ':executeOnRemote'.
        at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:46)
        at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:77)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:55)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:199)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:73)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:52)
        at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:74)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:333)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:320)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:313)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:299)
        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.lambda$run$0(DefaultPlanExecutor.java:143)
        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:227)
        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.executeNextNode(DefaultPlanExecutor.java:218)
        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:140)
        at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
        at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
Caused by: java.lang.NullPointerException
        at Mirakle.apply$lambda-37$lambda-36$lambda-13(Mirakle.kt:233)
        at org.gradle.api.specs.AndSpec.isSatisfiedBy(AndSpec.java:50)
        at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:44)
        ... 24 more


* Get more help at https://help.gradle.org

BUILD FAILED in 1s
2 actionable tasks: 2 executed

Gradle version: https://services.gradle.org/distributions/gradle-7.4-all.zip
android gradle plugin version: "com.android.tools.build:gradle:7.1.2"

@skrugly
Copy link
Owner

skrugly commented Jul 3, 2022

Hey, could you provide a repository where I can reproduce this issue.

@eugene-krivobokov
Copy link
Author

Hi!
Unfortunately, I can't. It was in an old project and now I don't have projects with mirakle.

@samoylenkodmitry
Copy link

Could you provide the steps to reproduce this please. I've enabled configuration cache, but it is not getting triggered on the local machine and Involved only on remote machine as intended.

Steps to reproduce:

  1. Create a new project with stable Android Studio (Android Studio Dolphin | 2021.3.1 Patch 1 right now)
  2. Enable mirakle
  3. Run project, ensure it is building correctly on the remote PC
  4. Add the following to the gradle.properties in the root of the project dir:
org.gradle.unsafe.configuration-cache=true
org.gradle.unsafe.configuration-cache-problems=warn
  1. Sync project with Android Studio, run, ensure it build successfully on the first run
  2. Run the second time, there is a NullPointerException:
* Exception is:
org.gradle.api.GradleException: Could not evaluate onlyIf predicate for task ':executeOnRemote'.
	at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:46)
	at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36)
	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:77)
	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:55)
	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:199)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:73)
	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:52)
	at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:74)
	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:333)
	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:320)
	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:313)
	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:299)
	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.lambda$run$0(DefaultPlanExecutor.java:143)
	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:227)
	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.executeNextNode(DefaultPlanExecutor.java:218)
	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:140)
	at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
	at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
Caused by: java.lang.NullPointerException
	at Mirakle.apply$lambda-39$lambda-38$lambda-15(Mirakle.kt:234)
	at org.gradle.api.specs.AndSpec.isSatisfiedBy(AndSpec.java:50)
	at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:44)
	... 24 more

@be1ski
Copy link

be1ski commented Feb 15, 2023

Hello, is there any news here?

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

No branches or pull requests

4 participants