@@ -653,7 +653,7 @@ def _create_venv_symlinks(ctx, venv_dir_map):
653653 # NOTE: Topological ordering is used so that dependencies closer to the
654654 # binary have precedence in creating their symlinks. This allows the
655655 # binary a modicum of control over the result.
656- order = "topological " ,
656+ order = "postorder " ,
657657 transitive = [
658658 dep [PyInfo ].venv_symlinks
659659 for dep in ctx .attr .deps
@@ -688,7 +688,7 @@ def _build_link_map(entries):
688688
689689 for entry in entries :
690690 # We overwrite duplicates by design. The dependency closer to the
691- # binary gets precedence due to the topological ordering.
691+ # binary gets precedence due to the postorder ordering.
692692
693693 if entry .package and version_by_pkg .get (entry .package ) != entry .version :
694694 # If we detect that we are adding a different package version, clear the
@@ -704,13 +704,13 @@ def _build_link_map(entries):
704704
705705 if entry .venv_path in kind_map :
706706 # We ignore duplicates by design. The dependency closer to the
707- # binary gets precedence due to the topological ordering.
707+ # binary gets precedence due to the postorder ordering.
708708 continue
709709 else :
710710 kind_map [entry .venv_path ] = entry .link_to_path
711711
712712 # An empty link_to value means to not create the site package symlink.
713- # Because of the topological ordering, this allows binaries to remove
713+ # Because of the postorder ordering, this allows binaries to remove
714714 # entries by having an earlier dependency produce empty link_to values.
715715 for link_map in pkg_link_map .values ():
716716 for kind , kind_map in link_map .items ():
0 commit comments