Skip to content

fix(make): propagate per-package failures in root Makefile loops#60

Merged
Chouffe merged 1 commit into
mainfrom
arthur/fix-makefile-loops
Jun 12, 2026
Merged

fix(make): propagate per-package failures in root Makefile loops#60
Chouffe merged 1 commit into
mainfrom
arthur/fix-makefile-loops

Conversation

@Chouffe

@Chouffe Chouffe commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • The root Makefile targets install, lint, format, and test looped over packages with a plain shell for loop, whose exit status is that of the last iteration only — a failure in any package except benchmark was swallowed and the target reported success.
  • Each loop now tracks failures explicitly (fail=0; ... || fail=1; ...; exit $fail): every package still runs, all failures are reported, and the target exits non-zero if any package failed.

Closes #55

Test Plan

  • Reproduced the bug with a stub $(MAKE) that fails for core only: before the fix all four targets exited 0; after the fix all four exit non-zero while still iterating all 5 packages.
  • All-pass stub run exits 0.
  • Real make lint passes end to end (all packages + docs scripts).
  • Real make test passes: 566 passed, 1 skipped across the five packages.

A shell for loop exits with the status of its last iteration, so a
failure in any package except the last one was swallowed and
install/lint/format/test reported success. Track failures explicitly
so every package still runs and the target exits non-zero if any
package failed.

Closes #55
@Chouffe Chouffe requested a review from MateoLostanlen June 12, 2026 06:52
@Chouffe Chouffe merged commit 73fc53d into main Jun 12, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Root Makefile loops swallow per-package failures

1 participant