Commit Graph
3 Commits
Author SHA1 Message Date
sneeker 752ddea916 feat(sched): cancel in-flight actions when a build fails
Only new spawns were held back after a failure, so every action already running
was allowed to finish even though its output would be discarded. The scheduler
now sends SIGTERM to the remaining children on the first failure, and reports
them separately rather than counting a process it killed as a failure of its
own. Partial outputs are removed and their cache entries dropped, so the next
run starts clean.

Under -k the existing behaviour is kept, since keeping going is the point.

On a graph with three six-second generators alongside one translation unit that
fails immediately, -j4 now returns in 0.12 s rather than 6.03 s.
2022-07-15 04:18:43 +00:00
sneeker 244609ba1a fix(cli): detect the core count on systems without /proc/cpuinfo
The default job limit read /proc/cpuinfo and silently fell back to four
anywhere that file is absent, so macOS and the BSDs ran at a fraction of the
available parallelism. Falls back to getconf _NPROCESSORS_ONLN before the
constant.
2022-07-14 18:24:39 +00:00
sneeker f751ccbde9 feat(cli): add argument parsing and command dispatch
Handles attached flag forms such as -j4 and -Dname=value, dispatches the
subcommands, and prints one aligned line per completed action with a summary.
2022-06-25 17:08:00 +00:00