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

Config cache error: dependencies cannot serialize object of type 'org.gradle.api.artifacts.Configuration' #17471

Closed
yogurtearl opened this issue Jun 17, 2021 · 7 comments
Labels
a:bug closed:duplicate Duplicated or superseeded by another issue @configuration-cache

Comments

@yogurtearl
Copy link
Contributor

Run ./gradlew dependencies --configuration-cache

Expected Behavior

No config cache errors

Current Behavior

Got this error:

- Task `:dependencies` of type `org.gradle.api.tasks.diagnostics.DependencyReportTask`: cannot serialize object of type 'org.gradle.api.artifacts.Configuration' as these are not supported with the configuration cache.
  See https://docs.gradle.org/7.1/userguide/configuration_cache.html#config_cache:requirements:disallowed_types
⌄⚠️cannot serialize object of type org.gradle.api.artifacts.Configuration📋 as these are not supported with the configuration cache. ?
⌄fieldconfiguration📋 of org.gradle.api.tasks.diagnostics.internal.dependencies.AsciiDependencyReportRenderer$ConfigurationAction📋
⌄bean of type org.gradle.api.tasks.diagnostics.internal.dependencies.AsciiDependencyReportRenderer$ConfigurationAction📋
⌄fieldconfigurationAction📋 of org.gradle.api.tasks.diagnostics.internal.dependencies.AsciiDependencyReportRenderer📋
⌄bean of type org.gradle.api.tasks.diagnostics.internal.dependencies.AsciiDependencyReportRenderer📋
⌄fieldrenderer📋 of org.gradle.api.tasks.diagnostics.DependencyReportTask📋
■task:dependencies📋 of type org.gradle.api.tasks.diagnostics.DependencyReportTask📋

Your Environment

Gradle 7.1

@mlopatkin
Copy link
Member

@gradle/configuration-cache is it a duplicate of #12871?

@eskatos
Copy link
Member

eskatos commented Jun 23, 2021

The dependencies task is not supported yet with the configuration cache enabled. Both issues are different failures that can happen with that task. It would be better to have a single issue about supporting the dependencies task.

@mlopatkin
Copy link
Member

Duplicate of #12871

@mlopatkin mlopatkin marked this as a duplicate of #12871 Jun 23, 2021
@mlopatkin mlopatkin added closed:duplicate Duplicated or superseeded by another issue and removed to-triage labels Jun 23, 2021
@jhansche
Copy link

Should this be reopened?

#12871 was resolved as of Gradle 7.5, but in 7.5.1 the DependencyReportTask still does not use the new APIs, and still reports configuration cache problems, due to use of getProject() and trying to serialize Configuration.

So now this issue seems to be relevant again, because the dependencies report now has to be updated to use the new APIs.

@Mary-a67
Copy link

This issue happens with Gradle 7.5.1, should this be opened or create a new bug report?
this is a blocker to upgrading Gradle enterprise V 3.11.4
@mlopatkin

@mlopatkin mlopatkin marked this as not a duplicate of #12871 Nov 16, 2022
@mlopatkin
Copy link
Member

This issue happens with Gradle 7.5.1, should this be opened or create a new bug report? this is a blocker to upgrading Gradle enterprise V 3.11.4 @mlopatkin

Apparently, I chose the duplicated issue poorly. The correct one is #17470, and it was fixed only in 7.6.

@mlopatkin mlopatkin reopened this Nov 16, 2022
@mlopatkin
Copy link
Member

Duplicate of #17470

@mlopatkin mlopatkin marked this as a duplicate of #17470 Nov 16, 2022
@mlopatkin mlopatkin closed this as not planned Won't fix, can't repro, duplicate, stale Nov 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:bug closed:duplicate Duplicated or superseeded by another issue @configuration-cache
Projects
None yet
Development

No branches or pull requests

5 participants