-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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 serializable lambdas for up-to-date checks #17327
Comments
See #10751 for the deprecation of Java lambdas as task actions. |
Can we use |
We can't use the current class, though I suppose we can create a subclass which has the necessary information and adds it accordingly to the hasher. We can create this new class in For fixing the problem for nested inputs we need to create the right snapshot when we attach the class object as an input property, since the class object won't be enough anymore for the snapshotter to determine the implementation snapshot. |
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. |
unstale |
Gradle currently doesn't support Java lambdas (aka invoke dynamic implementations of classes) since it is unable to track the implementation for the classes the JVM generates at runtime. For serializable lambdas, Gradle could extract enough information to track the implementation and therefore support those as task actions. This is especially interesting, since Kotlin 1.5 by default generates invoke dynamic calls when a lambda implements a SAM type.
As a next step we could automatically make the lambdas we use for doLast etc. serializable.
Design spec
cc: @gradle/execution
The text was updated successfully, but these errors were encountered: