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
Gradle 4.10 incorrect ordering between dependencies of dependent tasks #6582
Comments
* Work around to be able to generate eclipse projects gradle/gradle#6582
* Work around to be able to generate eclipse projects gradle/gradle#6582
I agree that this is a change of behavior, but your previous setup worked by accident.
|
|
From the 4.10 userguide:
This does not work currently. Since gradle has recommended this practice for a long time, at the very least I think there ought to be a proactive warning to the user when the user attempts |
@nedtwigg In case it helps, one can enforce that ordering by being explicit about the tasks:
|
I agree this should not be changed in a minor release, no matter if it conceptually makes sense or not, especially if we told users to make use of this approach. |
@atorok Did that work for Gradle 4.9? |
@wolfs yes it did. |
This issue seems to be a duplicate of #2488. The issue seems to be happening more frequently with Gradle 4.10. There have been no changes to task scheduling which I am aware of between 4.9 and 4.10. |
This is actually not related to #2488 (or at least only remotely related). That issue deals with dependencies of the clean task in other projects allowing producer tasks in different projects to execute before the clean task. The issue here is the incomplete modeling of the dependency relationships between the clean and generation tasks. This just happened to work before because of the way the unrelated tasks were scheduled in the task graph (i.e. the clean tasks just happened to end up in there before the generation tasks). There were some changes to the dependency relationships in 4.10, however, that caused that ordering to change, resulting in the To workaround this, we'll bake in the assumption that in the scenario that both clean and generation tasks are in the task graph together, you almost always want clean to run before generation. In the odd case that you might want clean to run after generation, you'll still be able to explicitly model that, but in the absence of anything like that, clean tasks will always run first. |
@ghale Which changes caused this difference? |
@oehme Gary pointed me to 49596cd This is the only production code change: |
The change in question was to ensure that |
The fix for this will be in the 4.10.1 release. |
Thanks for the info and fix guys! |
After upgrading to Gradle 4.10, the eclipse project files are no longer generated when running:
As a work-around we have to run:
We have this in the build script:
Expected Behavior
This used to work because all the dependencies of
cleanEclipse
were ran before all the dependencies ofeclipse
.Implicit dependency should be implied between the task dependencies on each side.
Current Behavior
Tasks such as
eclipseProject
are ran beforecleanEclipseProject
as such the config files are note generated.Context
Import projects to eclipse.
Steps to Reproduce (for bugs)
Your Environment
https://gradle.com/s/ud7wjtlzi4dss
The text was updated successfully, but these errors were encountered: