|
Ninja
|
DependencyScan manages the process of scanning the files in a graph and updating the dirty/outputs_ready state of all the nodes and edges. More...
#include <graph.h>
Public Member Functions | |
| BuildLog * | build_log () const |
| DependencyScan (State *state, BuildLog *build_log, DepsLog *deps_log, DiskInterface *disk_interface, DepfileParserOptions const *depfile_parser_options, Explanations *explanations) | |
| DepsLog * | deps_log () const |
| bool | LoadDyndeps (Node *node, DyndepFile *ddf, std::string *err) const |
| bool | LoadDyndeps (Node *node, std::string *err) const |
| Load a dyndep file from the given node's path and update the build graph with the new information. More... | |
| bool | RecomputeDirty (Node *node, std::vector< Node * > *validation_nodes, std::string *err) |
| Update the |dirty_| state of the given nodes by transitively inspecting their input edges. More... | |
| bool | RecomputeOutputsDirty (Edge *edge, Node *most_recent_input, bool *dirty, std::string *err) |
| Recompute whether any output of the edge is dirty, if so sets |*dirty|. More... | |
| void | set_build_log (BuildLog *log) |
Private Member Functions | |
| bool | RecomputeNodeDirty (Node *node, std::vector< Node * > *stack, std::vector< Node * > *validation_nodes, std::string *err) |
| bool | RecomputeOutputDirty (const Edge *edge, const Node *most_recent_input, const std::string &command, Node *output) |
| Recompute whether a given single output should be marked dirty. More... | |
| void | RecordExplanation (const Node *node, const char *fmt,...) |
| bool | VerifyDAG (Node *node, std::vector< Node * > *stack, std::string *err) |
Private Attributes | |
| BuildLog * | build_log_ |
| ImplicitDepLoader | dep_loader_ |
| DiskInterface * | disk_interface_ |
| DyndepLoader | dyndep_loader_ |
| OptionalExplanations | explanations_ |
DependencyScan manages the process of scanning the files in a graph and updating the dirty/outputs_ready state of all the nodes and edges.
|
inline |
|
inline |
Definition at line 356 of file graph.h.
References build_log_.
Referenced by Builder::Build(), and Builder::FinishCommand().
|
inline |
Definition at line 363 of file graph.h.
References dep_loader_, and ImplicitDepLoader::deps_log().
Referenced by Builder::FinishCommand().
| bool DependencyScan::LoadDyndeps | ( | Node * | node, |
| DyndepFile * | ddf, | ||
| std::string * | err | ||
| ) | const |
| bool DependencyScan::LoadDyndeps | ( | Node * | node, |
| std::string * | err | ||
| ) | const |
Load a dyndep file from the given node's path and update the build graph with the new information.
One overload accepts a caller-owned 'DyndepFile' object in which to store the information loaded from the dyndep file.
Referenced by Builder::LoadDyndeps().
| bool DependencyScan::RecomputeDirty | ( | Node * | node, |
| std::vector< Node * > * | validation_nodes, | ||
| std::string * | err | ||
| ) |
Update the |dirty_| state of the given nodes by transitively inspecting their input edges.
Examine inputs, outputs, and command lines to judge whether an edge needs to be re-run, and update outputs_ready_ and each outputs' |dirty_| state accordingly. Appends any validation nodes found to the nodes parameter. Returns false on failure.
Definition at line 49 of file graph.cc.
Referenced by Plan::RefreshDyndepDependents().
|
private |
Definition at line 82 of file graph.cc.
References Edge::deps_loaded_, Edge::deps_missing_, Edge::dyndep_, Node::dyndep_pending(), Node::exists(), Node::in_edge(), Edge::inputs_, Edge::is_order_only(), Edge::is_phony(), Edge::mark_, Node::MarkDirty(), Node::mtime(), Edge::outputs_, Edge::outputs_ready(), Edge::outputs_ready_, Node::path(), Node::set_dirty(), Node::StatIfNecessary(), Node::status_known(), Edge::validations_, Edge::VisitDone, and Edge::VisitInStack.
|
private |
Recompute whether a given single output should be marked dirty.
Returns true if so.
Definition at line 278 of file graph.cc.
References BuildLog::LogEntry::command_hash, Node::exists(), Edge::GetBindingBool(), BuildLog::LogEntry::HashCommand(), Edge::inputs_, Edge::is_phony(), BuildLog::LogEntry::mtime, Node::mtime(), Node::path(), PRId64, and Node::UpdatePhonyMtime().
| bool DependencyScan::RecomputeOutputsDirty | ( | Edge * | edge, |
| Node * | most_recent_input, | ||
| bool * | dirty, | ||
| std::string * | err | ||
| ) |
Recompute whether any output of the edge is dirty, if so sets |*dirty|.
Returns false on failure.
Definition at line 265 of file graph.cc.
References Edge::EvaluateCommand(), and Edge::outputs_.
Referenced by Plan::CleanNode().
|
private |
|
inline |
Definition at line 359 of file graph.h.
References build_log_.
Referenced by Builder::SetBuildLog().
|
private |
Definition at line 226 of file graph.cc.
References Node::in_edge(), Edge::mark_, Edge::maybe_phonycycle_diagnostic(), and Edge::VisitInStack.
|
private |
Definition at line 386 of file graph.h.
Referenced by build_log(), and set_build_log().
|
private |
Definition at line 388 of file graph.h.
Referenced by deps_log().
|
private |
|
private |
|
private |