You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Non-zero exit when the checker reports unsafe or foreign dependencies #966
When a book type-checks but relies on @unsafe or foreign defs, bend prints:
All terms check, but N defs rely on unsafe or foreign code:
- …
and exits 0.
TODOs and type errors exit 1. The unsafe/foreign path does not.
Related history: #776 asked for a non-zero exit when @unsafe is in the import graph; it was closed after requiring PROOF.bend to import ./LAWS.bend (2.0.8). The exit-0-on-unsafe half was not changed. #805 / #874 improved disclosure / counting; they did not make the status non-zero.
This is a documented design choice. WONTFIX.txt, DESIGN: "@unsafe programs check and exit 0 (#776, #805). The checker prints 'All terms check, but N defs rely on unsafe or foreign code:', lists them, and exits 0. @unsafe is a choice the author made in the source; read the note, not the exit code." A --strict-proof or --allow-unsafe flag is the same exit-code request behind a flag. A CI can grep the note.
Note: an AI wrote this reply after I made the decision. If anything here is wrong, reply and I will review it myself.
Activity
VictorTaelin commentedon Sep 27, 2026
This is a documented design choice. WONTFIX.txt, DESIGN: "@unsafe programs check and exit 0 (#776, #805). The checker prints 'All terms check, but N defs rely on unsafe or foreign code:', lists them, and exits 0.
@unsafeis a choice the author made in the source; read the note, not the exit code." A--strict-proofor--allow-unsafeflag is the same exit-code request behind a flag. A CI can grep the note.Note: an AI wrote this reply after I made the decision. If anything here is wrong, reply and I will review it myself.