Remove obsolete backwards compatibility hack for getAttr
This commit is contained in:
parent
1baf48f087
commit
3bf4437622
|
@ -10,7 +10,7 @@ with {
|
||||||
};
|
};
|
||||||
|
|
||||||
rec {
|
rec {
|
||||||
inherit (builtins) attrNames listToAttrs hasAttr isAttrs;
|
inherit (builtins) attrNames listToAttrs hasAttr isAttrs getAttr;
|
||||||
|
|
||||||
|
|
||||||
/* Return an attribute from nested attribute sets. For instance
|
/* Return an attribute from nested attribute sets. For instance
|
||||||
|
@ -33,15 +33,6 @@ rec {
|
||||||
nameValuePair (head attrPath) (setAttrByPath (tail attrPath) value)
|
nameValuePair (head attrPath) (setAttrByPath (tail attrPath) value)
|
||||||
)];
|
)];
|
||||||
|
|
||||||
|
|
||||||
/* Backwards compatibility hack: lib.attrByPath used to be called
|
|
||||||
lib.getAttr, which was confusing given that there was also a
|
|
||||||
builtins.getAttr. Eventually we'll drop this hack and
|
|
||||||
lib.getAttr will just be an alias for builtins.getAttr. */
|
|
||||||
getAttr = a: b: if isString a
|
|
||||||
then builtins.getAttr a b
|
|
||||||
else c: builtins.trace "Deprecated use of lib.getAttr!" (attrByPath a b c);
|
|
||||||
|
|
||||||
|
|
||||||
getAttrFromPath = attrPath: set:
|
getAttrFromPath = attrPath: set:
|
||||||
let errorMsg = "cannot find attribute `" + concatStringsSep "." attrPath + "'";
|
let errorMsg = "cannot find attribute `" + concatStringsSep "." attrPath + "'";
|
||||||
|
|
Loading…
Reference in New Issue