I'm working on
updating the help text for GN's depfile variable, and wanted to see if the following guidance makes sense:
1. A depfile should be used only when a target depends on files that are
not already specified by a target's inputs and sources. Likewise,
depfiles should specify only those dependencies not already included
in sources or inputs.
Rationale for not including edges that already exist within ninja files:
- Dependencies can change, and the ones listed in depfiles are always one build out-of-date. So, it's best to keep them to the minimal set (aka, those not already listed in .ninja files)
2. Although depfiles are created by an action, they should not be listed
in the action's outputs unless another target will use the file as an input.