Skip to content

fix(whl_library): stop duplicating deps in whl_library#1874

Merged
rickeylev merged 1 commit intobazel-contrib:mainfrom
aignas:fix/duplicate-deps
May 12, 2024
Merged

fix(whl_library): stop duplicating deps in whl_library#1874
rickeylev merged 1 commit intobazel-contrib:mainfrom
aignas:fix/duplicate-deps

Conversation

@aignas
Copy link
Collaborator

@aignas aignas commented May 4, 2024

Before this PR we would incorrectly add deps to the platform-specific
list if there were multiple entries in the METADATA file. It seems
that some projects (e.g. opencv-python) have multiple entries in their
METADATA file to help SAT solvers with selecting the right version when
different interpreter versions are used.

In our case, we will have only one version of a given package because we
are operating with a locked dependency list, so we should ensure that we
do not have duplicates across the lists. With this PR we are solving
this during the construction of the dependency sets so that the internal
model is always consistent.

Fixes #1873

Before this PR we would incorrectly add deps to the platform-specific
list if there were multiple entries in the `METADATA` file. It seems
that some projects (e.g. [opencv-python]) have multiple entries in their
METADATA file to help SAT solvers with selecting the right version when
different interpreter versions are used.

In our case, we will have only one version of a given package because we
are operating with a locked dependency list, so we should ensure that we
do not have duplicates across the lists. With this PR we are solving
this during the construction of the dependency sets so that the internal
model is always consistent.

Fixes bazel-contrib#1873

[opencv-python]: https://pypi.org/project/opencv-python/
@aignas aignas requested a review from rickeylev as a code owner May 4, 2024 03:21
@rickeylev rickeylev added this pull request to the merge queue May 12, 2024
Merged via the queue into bazel-contrib:main with commit 4c4c06c May 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

experimental_target_platforms produces whl with duplicated dependencies

2 participants