Admins will be upgrading ORNL GitLab Servers on Saturday, 16 May 2026, from 7 AM until 11 AM EST. Repositories will experience intermittent outages during this time.
# Do not eta reduce v, so that we have the same strictness as `builtins.warn`.
msg:v:
# `builtins.warn` requires a string message, so we enforce that in our implementation, so that callers aren't accidentally incompatible with newer Nix versions.
assertisStringmsg;
ifmustAbort
thenbuiltins.trace"[1;31mwarning: ${msg}[0m"(abort"NIX_ABORT_ON_WARN=true; warnings are treated as unrecoverable errors.")
elsebuiltins.trace"[1;31mwarning: ${msg}[0m"v
);
/**
Like warn, but only warn when the first argument is `true`.