code: function deps(s, p) {
          if (!shards.map[p] || !shards.map[p].ParentShardId) return;
          shards.deps[s] = lib.toFlags("add", shards.deps[s], shards.map[p].ParentShardId);
          deps(s, shards.map[p].ParentShardId);
      }
docs: For each shard keep all dependencies including parent's dependencies in one list for fast checks