diff options
author | Profpatsch <mail@profpatsch.de> | 2018-04-02 20:41:59 +0200 |
---|---|---|
committer | Profpatsch <mail@profpatsch.de> | 2018-04-27 18:59:39 +0200 |
commit | 562286aa560aea85448adbc0e50e636e8d3cf8d0 (patch) | |
tree | aef82ef424a5babeaf87f6422cf9fa7058c5af30 /lib/debug.nix | |
parent | 7365671fb23861d59ece8d85de407c3127128ad8 (diff) |
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.nix | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/debug.nix b/lib/debug.nix index fad6b769b39f7..16e8710168c3d 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 |