File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,8 +6,8 @@ All notable changes to `devloop` will be recorded in this file.
66
77### Fixed
88- Made the CI smoke test wait for file watching to start before editing
9- the watched fixture file, avoiding a startup race that could time out
10- on macOS runners.
9+ the watched fixture file, and retry the watched write until the state
10+ change is observed, avoiding startup races on macOS runners.
1111
1212### Changed
1313- Split Linux and macOS CI into separate badgeable workflows backed by
Original file line number Diff line number Diff line change @@ -58,18 +58,22 @@ while time.time() < deadline:
5858raise SystemExit("timed out waiting for watcher startup")
5959PY
6060
61- printf ' updated\n' > " ${tmp_dir} /watched.txt"
62-
63- python3 - " $state_path " " $log_path " << 'PY '
61+ python3 - " $state_path " " $log_path " " ${tmp_dir} /watched.txt" << 'PY '
6462import json
6563import pathlib
6664import sys
6765import time
6866
6967state_path = pathlib.Path(sys.argv[1])
7068log_path = pathlib.Path(sys.argv[2])
69+ watched_path = pathlib.Path(sys.argv[3])
7170deadline = time.time() + 15
71+ next_write = 0.0
7272while time.time() < deadline:
73+ now = time.time()
74+ if now >= next_write:
75+ watched_path.write_text("updated\n")
76+ next_write = now + 0.5
7377 if state_path.exists():
7478 data = json.loads(state_path.read_text())
7579 if (
You can’t perform that action at this time.
0 commit comments