Current Situation
If the build fails, no new state is written for any target. The reason is mainly performance as to not write the state file for each updated target.
For example in a sequence of targets updated A->B->C, if C fails, the next time the build is run, the commands to create A and B be run again, even if they were perfectly constructed in the failed build. This is particularly ugly if build A or B is in some way expensive, either time consuming or due to accessing the Internet.
Workaround
Run the build for the working targets separately, then debug the failing target C.
Requirement
Provide one of:
- To avoid the need for the workaround, provide a simple way to request writing the state file immediately after building each target.
- Write the state file even if the build fails, making sure, of course that the failed target does not get a fresh state. Consider providing an option
state=onsuccess which provides the current behavior. What could be a reason to do so?
# Current Situation
If the build fails, no new state is written for any target. The reason is mainly performance as to not write the state file for each updated target.
For example in a sequence of targets updated A->B->C, if C fails, the next time the build is run, the commands to create A and B be run again, even if they were perfectly constructed in the failed build. This is particularly ugly if build A or B is in some way expensive, either time consuming or due to accessing the Internet.
# Workaround
Run the build for the working targets separately, then debug the failing target C.
# Requirement
Provide one of:
- To avoid the need for the workaround, provide a simple way to request writing the state file immediately after building each target.
- Write the state file even if the build fails, making sure, of course that the failed target does not get a fresh state. Consider providing an option `state=onsuccess` which provides the current behavior. What could be a reason to do so?