You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And given that this has been proposed for Ninja back in 2011 ( ninja-build/ninja#60 ) without any further action it might even be a nice "selling point" for people to try samurai.
I think this should be easy to implement by using a priority queue for the pending work instead of a stack.
However, I'm not sure exactly how to decide which build actions should be run first. The example in the linked bug suggests that if a header and source file are changed, the unique object that depends on the source file should be built before the many objects that depend on the header. As far as ninja/samurai is concerned, both are inputs to the action.
If we simply used the metric that actions who have a newer input get built first, then if the header was modified later than the source file, we'd still build those 299 objects first. Perhaps we should prioritize first the actions with newest explicit dependencies (perhaps followed by newest implicit dependencies)?
See ninja-build/ninja#1570.
For example, with
and
touch a c; sleep 1; touch b
, samu would buildb -> c -> a
instead ofc -> b -> a
.The text was updated successfully, but these errors were encountered: