Remove obsolete backwards compatibility hack for getAttr

This commit is contained in:
Eelco Dolstra 2012-08-13 00:08:21 -04:00
parent 1baf48f087
commit 3bf4437622

View file

@ -10,7 +10,7 @@ with {
};
rec {
inherit (builtins) attrNames listToAttrs hasAttr isAttrs;
inherit (builtins) attrNames listToAttrs hasAttr isAttrs getAttr;
/* Return an attribute from nested attribute sets. For instance
@ -33,15 +33,6 @@ rec {
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:
let errorMsg = "cannot find attribute `" + concatStringsSep "." attrPath + "'";