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

Configuration cache fails if a task uses a java record as a property type #26926

Closed
erdi opened this issue Nov 2, 2023 · 1 comment · Fixed by #28386
Closed

Configuration cache fails if a task uses a java record as a property type #26926

erdi opened this issue Nov 2, 2023 · 1 comment · Fixed by #28386
Assignees
Labels
a:bug in:configuration-cache Configuration Caching
Milestone

Comments

@erdi
Copy link
Contributor

erdi commented Nov 2, 2023

Current Behavior

If a task which uses a java record as a property type is executed with configuration cache enabled it fails with an error along the lines of

* What went wrong:
Could not load the value of field `__inputRecord__` of task `:taskUsingRecordAsInput` of type `com.github.erdi.gradle.configuration.cache.bug.TaskUsingRecordAsInput`.
> Can not set final java.lang.String field com.github.erdi.gradle.configuration.cache.bug.InputRecord.value to java.lang.String

Expected Behavior

Tasks using java records as property types can be used with configuration cache.

Context (optional)

No response

Steps to Reproduce

A reproducer project can be found at https://github.com/erdi/gradle-record-input-configuration-cache-bug. After checking it out run ./gradlew :taskUsingRecordAsInput --configuration-cache to reproduce. Note that running ./gradlew :taskUsingRecordAsInput succeeds.

Gradle version

8.4

Build scan URL (optional)

No response

Your Environment (optional)

No response

@ljacomet
Copy link
Member

ljacomet commented Nov 6, 2023

Thank you for providing a valid report.

The issue is in the backlog of the relevant team and is prioritized by them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:bug in:configuration-cache Configuration Caching
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants