-
Notifications
You must be signed in to change notification settings - Fork 273
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
Avoid eagerly resolving input files in ProtobufExtract #713
Conversation
Rely on FileCollection.getElements() (available in Gradle 5.6+) to ensure no files are accessed eagerly during configuration. This also ensures configuration cache key does not depend on them. Fixes issue google#711. Test: Added "testProjectDependent proto extraction with configuration cache" with Gradle 8.1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It isn't clear how this improves the situation, as in both cases we have a provider and it does does similar things. Best guess I have is that providerFactory.provider
didn't include dependency information which required it to be loaded more eagerly whereas getElements().map
does. It doesn't seem like it could be because s/File/FileSystemLocation/.
In any case, I believe you that this fixes it. That's just my way of saying I'm really happy you made a test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@ejona86 You analysis is correct: during task graph building Gradle had to compute return value of Thanks for a quick review :) |
Rely on FileCollection.getElements() (available in Gradle 5.6+) to ensure no files are accessed eagerly during configuration. This also ensures configuration cache key does not depend on them. Fixes issue google#711. Test: Added "testProjectDependent proto extraction with configuration cache" with Gradle 8.1
Rely on FileCollection.getElements() (available in Gradle 5.6+) to ensure no files are accessed eagerly during configuration. This also ensures configuration cache key does not depend on them. Fixes issue #711. Test: Added "testProjectDependent proto extraction with configuration cache" with Gradle 8.1 Co-authored-by: Ivan Gavrilovic <gavra0@users.noreply.github.com>
Rely on FileCollection.getElements() (available in Gradle 5.6+) to ensure no files are accessed eagerly during configuration. This also ensures configuration cache key does not depend on them.
Fixes issue #711.
Test: Added "testProjectDependent proto extraction with configuration cache" with Gradle 8.1