summary refs log tree commit diff
path: root/lib/debug.nix
diff options
context:
space:
mode:
authorProfpatsch <mail@profpatsch.de>2018-04-02 20:41:59 +0200
committerProfpatsch <mail@profpatsch.de>2018-04-27 18:59:39 +0200
commit562286aa560aea85448adbc0e50e636e8d3cf8d0 (patch)
treeaef82ef424a5babeaf87f6422cf9fa7058c5af30 /lib/debug.nix
parent7365671fb23861d59ece8d85de407c3127128ad8 (diff)
downloadnixlib-562286aa560aea85448adbc0e50e636e8d3cf8d0.tar
nixlib-562286aa560aea85448adbc0e50e636e8d3cf8d0.tar.gz
nixlib-562286aa560aea85448adbc0e50e636e8d3cf8d0.tar.bz2
nixlib-562286aa560aea85448adbc0e50e636e8d3cf8d0.tar.lz
nixlib-562286aa560aea85448adbc0e50e636e8d3cf8d0.tar.xz
nixlib-562286aa560aea85448adbc0e50e636e8d3cf8d0.tar.zst
nixlib-562286aa560aea85448adbc0e50e636e8d3cf8d0.zip
lib/debug: deprecate `traceValIfNot`
The function is only used in exactly one module and overly specific (`c` must be
a true predicate for `x`, if not, a specific trace is called).
Diffstat (limited to 'lib/debug.nix')
-rw-r--r--lib/debug.nix5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/debug.nix b/lib/debug.nix
index fad6b769b39f..16e8710168c3 100644
--- a/lib/debug.nix
+++ b/lib/debug.nix
@@ -93,9 +93,10 @@ rec {
   traceCall2 = n: f: a: b: let t = n2: x: traceShowValMarked "${n} ${n2}:" x; in t "result" (f (t "arg 1" a) (t "arg 2" b));
   traceCall3 = n: f: a: b: c: let t = n2: x: traceShowValMarked "${n} ${n2}:" x; in t "result" (f (t "arg 1" a) (t "arg 2" b) (t "arg 3" c));
 
-  # FIXME: rename this?
   traceValIfNot = c: x:
-    if c x then true else trace (showVal x) false;
+    trace ( "Warning: `traceValIfNot` is deprecated "
+          + "and will be removed in the next release." )
+    (if c x then true else traceSeq (showVal x) false);
 
   /* Evaluate a set of tests.  A test is an attribute set {expr,
      expected}, denoting an expression and its expected result.  The