about summary refs log tree commit diff
path: root/lib/trivial.nix
diff options
context:
space:
mode:
authorAlois Wohlschlager <alois1@gmx-topmail.de>2024-02-03 16:13:04 +0100
committerAlois Wohlschlager <alois1@gmx-topmail.de>2024-02-03 19:01:39 +0100
commitd33127863ecda07ddd292d9bad7f8717f69430a0 (patch)
tree8d91256287e4f49b427ea7ad97321d87fd22250f /lib/trivial.nix
parentb8b232ae7b8b144397fdb12d20f592e5e7c1a64d (diff)
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.
Diffstat (limited to 'lib/trivial.nix')
-rw-r--r--lib/trivial.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/trivial.nix b/lib/trivial.nix
index f27cfb04f074c..58620006de151 100644
--- a/lib/trivial.nix
+++ b/lib/trivial.nix
@@ -230,7 +230,7 @@ in {
        else if lib.pathExists revisionFile then lib.fileContents revisionFile
        else default;
 
-  nixpkgsVersion = builtins.trace "`lib.nixpkgsVersion` is deprecated, use `lib.version` instead!" version;
+  nixpkgsVersion = warn "lib.nixpkgsVersion is a deprecated alias of lib.version." version;
 
   /* Determine whether the function is being called from inside a Nix
      shell.