* Remove the warning, it's rather annoying.

svn path=/nixpkgs/trunk/; revision=16862
This commit is contained in:
Eelco Dolstra 2009-08-26 14:13:05 +00:00
parent 24487fa73e
commit 921de5b511

View File

@ -52,23 +52,19 @@ rec {
textClosureList = predefined: arg: textClosureList = predefined: arg:
let let
warn = map (x : if isAttrs x
then builtins.trace "warning, passing attrs to textClosureList instead of dep entry names is depreceated and may cause failure" x
else x );
f = done: todo: f = done: todo:
if todo == [] then {result = []; inherit done;} if todo == [] then {result = []; inherit done;}
else else
let entry = head todo; in let entry = head todo; in
if isAttrs entry then if isAttrs entry then
let x = f done (warn entry.deps); let x = f done entry.deps;
y = f x.done (tail todo); y = f x.done (tail todo);
in { result = x.result ++ [entry.text] ++ y.result; in { result = x.result ++ [entry.text] ++ y.result;
done = y.done; done = y.done;
} }
else if hasAttr entry done then f done (tail todo) else if hasAttr entry done then f done (tail todo)
else f (done // listToAttrs [{name = entry; value = 1;}]) ([(builtins.getAttr entry predefined)] ++ tail todo); else f (done // listToAttrs [{name = entry; value = 1;}]) ([(builtins.getAttr entry predefined)] ++ tail todo);
in (f {} (warn arg)).result; in (f {} arg).result;
textClosureMap = f: predefined: names: textClosureMap = f: predefined: names:
concatStringsSep "\n" (map f (textClosureList predefined names)); concatStringsSep "\n" (map f (textClosureList predefined names));