Closed anuragkanungo closed 2 months ago
In a typical pip installation the second file overwrites the first one.
Are the file contents checked before overwriting, or only the name taken into consideration? If so, then which one wins? My concern is that the ordering of the dependencies matter here, and rules_py will need to ensure the same dependency ordering as pip, which may not be possible.
In this case, both those libraries should not be shipping test cases into the distribution package.
Discussed with Matt that this injected __init__.py
that rules_python puts in namespaced-packages
https://github.com/bazelbuild/rules_python/blob/03854a20c39e9e9bfebe91802102715cb027220a/python/private/pypi/whl_installer/namespace_pkgs.py#L95-L96
is a particularly gross violation triggering this error.
Will probably just allow these conflicting symlinks and print a warning, then add a flag letting you suppress that warning.
I get a similar error
Error: × Unable to run command:
├─▶ Conflicting symlinks found when attempting to create venv. More than one
│ package provides the file at these paths
├─▶ rules_python~~pip~rules_ros_pip_deps_38_pyyaml/site-packages/yaml/
│ loader.py
╰─▶ site-packages/yaml/loader.py
Allowing these conflicts and printing a warning seems like a reasonable approach.
What happened?
Using version 0.7.3 I am seeing
These are the files
In a typical pip installation the second file overwrites the first one.
Version
Development (host) and target OS/architectures: Linux x86-64
Output of
bazel --version
: bazel 7.1.0Version of the Aspect rules, or other relevant rules from your
WORKSPACE
orMODULE.bazel
file: 0.7.3Language(s) and/or frameworks involved:
How to reproduce