fix: avoid repo name collision for multi-version packages in uv.lock#795
fix: avoid repo name collision for multi-version packages in uv.lock#795roundhd wants to merge 1 commit intoaspect-build:mainfrom
Conversation
When uv.lock contains multiple versions of the same package (e.g., python-version-conditional deps like ipython 8.x vs 9.x), `_sbuild_repo_name` and `_whl_install_repo_name` produce identical names causing collisions. Include `sha1(version)[:8]` in repo names for disambiguation. Also pass the full package dict in `_group_repos` so version info is available. Fixes aspect-build#792
|
Shiyuan Zheng seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
|
|
Hey @roundhd, thanks for the contribution! I don't believe this is a complete solution to the problem, since this original implementation of the module extension lacks the decision machinery to correctly handle multiple versions of a locked package. This and the need to correct extras handling is the driver behind #778, which has at this point turned into a near rewrite of the extension to handle all the relevant graph details. That should be coming shortly. |


Summary
When
uv.lockcontains multiple versions of the same package (e.g., python-version-conditional deps like ipython 8.x for py3.9 and 9.x for py3.13),_sbuild_repo_nameand_whl_install_repo_nameproduce identical repo names, causing collisions.Changes:
sha1(version)[:8]in_sbuild_repo_nameand_whl_install_repo_namefor disambiguation_group_reposinstead of{"name": package}Fixes #792
Related: #718