Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 12, 2024

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
4 checks passed
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