Make unsuccessful tasks always run the subsequent time when --watch is active
#6263
+326
−276
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #6258. We keep track of the unsuccessful tasks in
SelectiveExecution.Metadata#forceRunTasksduring--watchand force those to re-run next evaluationThis ensures that if a user does
--watchand makes edits to code and config, they do not see a successful run until all the tasks selected by the--watchare successful. Previously, a user editing a single file will result in only a subset of tasks running, potentially resulting in previously-skipped tasks now being selected out and ending up never being runAlso tested manually by setting up a
--watch __.compileand then doing a find-and-replacecnew ([a-zA-Z]+)\(to$1(with IntelliJ. Without this PR, after fixing the first few failures, the--watchappears to succeed, but if I press Enter to re-run everything I seem more failures. With this PR, the--watchfails consistently until I fix all failures, and then pressingEnterto re-run does not show any new failures