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
Do not finalize the value of the properties of a task that is skipped #7440
Comments
We already don't finalize inputs for tasks that are skipped early via Is there another case we need to care about here? |
I think we should just limit this issue to Longer term, we should finalize and validate any properties needed to evaluate |
That's a good point: we should always validate any property that has been finalized. |
I want to look at task property validation as part of #4468, so that validation is triggered in some way by finalizing the value. |
This issue has been automatically marked as stale because it has not had recent activity. Given the limited bandwidth of the team, it will be automatically closed if no further activity occurs. If you're interested in how we try to keep the backlog in a healthy state, please read our blog post on how we refine our backlog. If you feel this is something you could contribute, please have a look at our Contributor Guide. Thank you for your contribution. |
This issue has been automatically closed due to inactivity. If you can reproduce this on a recent version of Gradle or if you have a good use case for this feature, please feel free to reopen the issue with steps to reproduce, a quick explanation of your use case or a high-quality pull request. |
#7371 added support to finalize the value of certain task input and output properties when the task starts execution. However, this finalization can be expensive and is pointless for many properties of a task that is skipped.
For example, finalizing the compile classpath for a compile task may involve a bunch of network access to resolve dependencies, however the value will be ignored if the task has no source files to compile and is skipped.
Expected Behavior
Finalize the value of only those properties of a task that are required to decide whether a task should be skipped. Only if the task will proceed should the remaining properties be finalized.
We should probably do the same with the "get from cache or run task actions" decision, and only finalize properties such as local state properties after we've decided to run the task actions.
The implementation might simply be to set all task properties to "finalize on next query" early in the execution lifecycle, so they are finalized only as required by whatever needs the value.
Current Behavior
Gradle does too much work when skipping tasks.
The text was updated successfully, but these errors were encountered: