build icon indicating copy to clipboard operation
build copied to clipboard

Fix bug where outputs of outputs wouldn't get deleted

Open jakemac53 opened this issue 10 months ago • 4 comments

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.

jakemac53 avatar Feb 24 '25 22:02 jakemac53

PR Health

github-actions[bot] avatar Feb 24 '25 22:02 github-actions[bot]

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.

jakemac53 avatar Feb 24 '25 22:02 jakemac53

The timeouts on Windows should be addressed now https://github.com/dart-lang/build/issues/3880 is that the failure you meant? Thanks.

davidmorgan avatar Feb 25 '25 10:02 davidmorgan

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.

jakemac53 avatar Feb 25 '25 15:02 jakemac53

Closing as this is fixed post-refactor in https://github.com/dart-lang/build/pull/4130 :)

davidmorgan avatar Aug 13 '25 12:08 davidmorgan