Commit fcbc4fe9 authored by Evgeny Egorochkin's avatar Evgeny Egorochkin
Browse files

Deprecate lib.zip in favor of lib.zipAttrsWith.

Add deprecation trace message.
Nixos has been ported away from lib.zip in d705c0c3a4b84768907ade90b3f420d62db422a2.
parent a3f148ce
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -246,7 +246,7 @@ rec {

  /* backward compatibility */
  zipWithNames = zipAttrsWithNames;
  zip = zipAttrsWith;
  zip = builtins.trace "lib.zip is deprecated, use lib.zipAttrsWith instead" zipAttrsWith;


  /* Does the same as the update operator '//' except that attributes are
+1 −1
Original line number Diff line number Diff line
@@ -117,7 +117,7 @@ rec {
      name = "attribute set of ${elemType.name}s";
      check = x: lib.traceValIfNot isAttrs x
        && fold (e: v: v && elemType.check e) true (lib.attrValues x);
      merge = lib.zip (name: elemType.merge);
      merge = lib.zipAttrsWith (name: elemType.merge);
      iter = f: path: set: lib.mapAttrs (name: elemType.iter f (path + "." + name)) set;
      fold = op: nul: set: fold (e: l: elemType.fold op l e) nul (lib.attrValues set);
      docPath = path: elemType.docPath (path + ".<name>");