Fix bug where outputs of outputs wouldn't get deleted
Fixes https://github.com/dart-lang/build/issues/3875
This turned out to be a tricky one to track down, basically we wouldn't even attempt to re-run any asset whose primary inputs didn't exist - but we might actually need to re-run them just to reset their state to deleted.
Updated the _runForInput function to work when the primary input does not exist, and just skip the actual build step.
This could probably be refactored to avoid a bunch of the unnecessary work in _runForInput, and just more eagerly delete all the transitive primary outputs once we decide to not output a file, but this seemed like the easiest fix for now.
PR Health
Hmm, a previous regression test is failing here for another scenario. Not sure I will have the time to continue diagnosing this soon, so @davidmorgan if you want to pick it up from here that might be good.
Otherwise, I can come back to it again when I have some free time at the end of a day.
The timeouts on Windows should be addressed now https://github.com/dart-lang/build/issues/3880 is that the failure you meant? Thanks.
The timeouts on Windows should be addressed now #3880 is that the failure you meant? Thanks.
There is a different test which is testing something related to failed actions, and the transitive outputs of those.
Closing as this is fixed post-refactor in https://github.com/dart-lang/build/pull/4130 :)