summaryrefslogtreecommitdiffstats
path: root/lib/debug.nix
diff options
context:
space:
mode:
authorProfpatsch <mail@profpatsch.de>2018-04-02 21:00:47 +0200
committerProfpatsch <mail@profpatsch.de>2018-04-27 18:59:39 +0200
commitfd54a946ca6d42b53df8d9040263fa43f6e426e9 (patch)
tree04019ddc65259fd420c5c5abb1e4ffbca2544565 /lib/debug.nix
parentb90104ea0edc6763505458e4143e034f1d92bc2a (diff)
lib/debug: deprecate `addErrorContextToAttrs`
The function isn’t used anywhere and `addErrorContext` is an undocumented builtin. The builtin is explicitely qualified at its two uses in the module system.
Diffstat (limited to 'lib/debug.nix')
-rw-r--r--lib/debug.nix10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/debug.nix b/lib/debug.nix
index 16e8710168c3..a792806fa79e 100644
--- a/lib/debug.nix
+++ b/lib/debug.nix
@@ -11,10 +11,6 @@ in
rec {
- inherit (builtins) addErrorContext;
-
- addErrorContextToAttrs = lib.mapAttrs (a: v: lib.addErrorContext "while evaluating ${a}" v);
-
traceIf = p: msg: x: if p then trace msg x else x;
traceValFn = f: x: trace (f x) x;
@@ -98,6 +94,12 @@ rec {
+ "and will be removed in the next release." )
(if c x then true else traceSeq (showVal x) false);
+
+ addErrorContextToAttrs = attrs:
+ trace ( "Warning: `addErrorContextToAttrs` is deprecated "
+ + "and will be removed in the next release." )
+ (lib.mapAttrs (a: v: lib.addErrorContext "while evaluating ${a}" v) attrs);
+
/* Evaluate a set of tests. A test is an attribute set {expr,
expected}, denoting an expression and its expected result. The
result is a list of failed tests, each represented as {name,