From fbf2116d3590222ddcd022b0edffe6e9dcb563b4 Mon Sep 17 00:00:00 2001 From: Geoff Romer Date: Tue, 5 Oct 2021 16:09:03 -0700 Subject: [PATCH] Handle line number changes in update_checks.py (#873) --- executable_semantics/update_checks.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/executable_semantics/update_checks.py b/executable_semantics/update_checks.py index 86ed7f4a81be..bb9bbece6b61 100755 --- a/executable_semantics/update_checks.py +++ b/executable_semantics/update_checks.py @@ -85,6 +85,8 @@ def _update_checks(): with futures.ThreadPoolExecutor() as exec: # list() iterates to propagate exceptions. list(exec.map(_update_check, tests)) + # Run again, because the previous run may have changed line numbers. + list(exec.map(_update_check, tests)) # Each update call indicates progress with a dot without a newline, so put a # newline to wrap. print("\nUpdated lit tests.")