[GRADLE-2879] SkipEmptySourceFilesTaskExecuter skips valid tasks for some CopySpecs. Created: 05/Sep/13 Updated: 10/Feb/17 Resolved: 10/Feb/17
AbstractCopyTask has @SkipWhenEmpty on it's getSource call, so the Copy task gets registered a sourceFile. Then SkipEmptySourceFilesTaskExecuter will check for inputs.hasSourceFiles and inputs.sourceFiles. The first is true and then the inputs.sourceFiles is resolved (it's a FileCollection) and it turns up empty, which then causes the task to be skipped. So, the problem is the FileCollection that AbstractCopyTask provides isn't including all the CopySpecs. Trying to debug the resolving of a FileCollection is proving to be difficult.
I believe CopyActionImpl.getAllSource() is only looking one level deep from the root spec, and hence second level deep specs are not being considered as part of the allSource FileTree. Or CopySpecImpl$WrapperCopy isn't contributing sources from it's wrapped spec. It's mostly like CopySpecImpl.getSource() needs to contribute sourcePaths from its child. This is most likely since I can see CopySpecImpl.with(CopySpec...) doesn't add anything to sourcePaths, like CopySpecImpl.from does, and hence there's no other way for a "with"'d copy spec to be included in getSource(). I'm not sure which it is, but I'm sure I'm close. If this makes sense, can a defect be created?
|Comment by Benjamin Muschko [ 15/Nov/16 ]|
As announced on the Gradle blog we are planning to completely migrate issues from JIRA to GitHub.
We intend to prioritize issues that are actionable and impactful while working more closely with the community. Many of our JIRA issues are inactionable or irrelevant. We would like to request your help to ensure we can appropriately prioritize JIRA issues you’ve contributed to.
Please confirm that you still advocate for your JIRA issue before December 10th, 2016 by:
We look forward to collaborating with you more closely on GitHub. Thank you for your contribution to Gradle!
|Comment by Benjamin Muschko [ 10/Feb/17 ]|
Thanks again for reporting this issue. We haven't heard back from you after our inquiry from November 15th. We are closing this issue now. Please create an issue on GitHub if you still feel passionate about getting it resolved.