lib: make deprecation warnings consistent

The deprecation warnings in lib were wildly inconsistent. Different
formulations were used in different places for the same meaning. Some warnings
used builtins.trace instead of lib.warn, which prevents silencing; one even
only had a comment instead. Make everything more uniform.
This commit is contained in:
Alois Wohlschlager 2024-02-03 16:13:04 +01:00
parent b8b232ae7b
commit d33127863e
No known key found for this signature in database
GPG key ID: E0F59EA5E5216914
5 changed files with 12 additions and 11 deletions

View file

@ -379,7 +379,7 @@ rec {
if ! isString text then throw "literalExpression expects a string."
else { _type = "literalExpression"; inherit text; };
literalExample = lib.warn "literalExample is deprecated, use literalExpression instead, or use literalMD for a non-Nix description." literalExpression;
literalExample = lib.warn "lib.literalExample is deprecated, use lib.literalExpression instead, or use lib.literalMD for a non-Nix description." literalExpression;
/* Transition marker for documentation that's already migrated to markdown
syntax. This is a no-op and no longer needed.