-
Notifications
You must be signed in to change notification settings - Fork 1.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
depfiles should be handled more intelligently during dependency cycle computation #664
Comments
Maybe for edges with .d files, the .d file shouldn't be loaded if the node is already dirty due to its timestamp? |
This behavior will be tough to explain the manual. :) auto.h -> codegen -> codegen.c -> codegen.h -> auto.h After removing include to auto.h from codegen.h you would wish the build to
On Fri, Oct 11, 2013 at 7:04 PM, Nico Weber [email protected]:
Maxim |
Oh, that's a good point! |
Another idea would be to detect this right after the .d file is written and abort the build at that point (".d file would cause dependency cycle"). |
One issue with that idea might be that it could maybe lead to false positives if the dependency order between cc files flips, and the old .d file information still points the other way, and the new upstream target is built first, which adds a cycle that'd be cleaned up once the now-downstream cc is rebuilt which would remove the .d edge. Hmm, I suppose that build order can't happen since the old .d edge prevents that. Maybe it'll work if it can be made fast enough. Another idea would be to only warn on cycles that contain edges from .d files, and remove these edges before starting the build. |
I think the "only warn on cycles that contain edges from .d files, and On cycle detection when building the graph ninja may:
That would be equivalent to user deleting stale .d files manually, except P.S> I must admit that handling dependency cycles when depslog is used On Thu, Aug 28, 2014 at 6:48 PM, Nico Weber [email protected]
Maxim |
(looks like you replied by email, and github's email parser got confused. Here's what I think the dots should expand to, copy-pasted from "view source" """
P.S I must admit that handling dependency cycles when depslog is used becomes painful, it could be nice to have this logic in. |
I think a similar issue happens when the outputs of depfiles isn't right:
In this case, there's no other way to recover other than removing that dep file (or, harder, that dep entry) either. |
On IRC, someone reported that they had a cycle that was caused by an edge from a .d file. They fixed their code, but since deps are loaded before .d files are rebuilt, the cycle was still there. Here's a repro:
The text was updated successfully, but these errors were encountered: