refactor: avoid conflict merging when shared libraries are present by rickeylev · Pull Request #3448 · bazel-contrib/rules_python
rickeylev
deleted the
refactor.optimize.symlink.grouping
branch
This was referenced
Dec 10, 2025github-merge-queue bot pushed a commit that referenced this pull request
Dec 14, 2025…re being linked (#3458) When a file (instead of directory) was duplicated, it was incorrectly be treated as a directory. The conflicting path was turned into a directory and all the files were made child paths of it. In practice, this usually worked out OK still because the conflicting file was an `__init__.py` file for a pkgutil-style namespace package, which effectively converted it to an implicit namespace package. I think this was introduced by #3448, but am not 100% sure. To fix, first check for exact path equality when merging conflicting paths. If the candidate file has the same link_to_path as the grouping, then just link to that file and skip any remaining files in the group. The rest of the group's files are skipped because none of them can contribute links anymore: * If they have the same path, then they are ignored (first set wins) * If they are a sub-path, then it violates the preconditions of the group (all files in the group should be exact matches or sub-paths of a common prefix) * If they aren't under the common prefix, then it violates the preconditions of the group and are skipped. --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters