Co-authored-by: Emilia Bopp <contact@ebopp.de> Change-Id: I3c3347e51d8543fbeb2b4e6ed12b0f556a6a6964
901 B
901 B
synopsis, cls, category, credits
| synopsis | cls | category | credits | |||
|---|---|---|---|---|---|---|
| Add `builtins.warn` for emitting warnings from Nix code |
|
Features |
|
Lix now has a builtin function for emitting warnings.
Like builtins.trace, it takes two arguments: the message to emit, and the expression to return.
Unlike builtins.trace, builtins.warn requires the first argument — the message — to be a string.
In the future we may extend builtins.warn to accept a more structured API.
To go along with this, we also have two new config settings:
debugger-on-warn, which, when used with--debugger, makesbuiltins.warnalso function likebuiltins.break.abort-on-warn, which aborts evaluation entirely after the warning is emitted.