Skip to content
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

fix: sdist resulting in duplicate repo name when requirements line does not match #2658

Draft
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

chrisirhc
Copy link
Contributor

Attempt to fix #2648

@@ -505,12 +505,14 @@ some_pkg==0.0.1
whl_config_setting(
filename = "simple-0.0.1-py3-none-any.whl",
version = "3.15",
target_platforms = ("cp315_linux_aarch64", "cp315_linux_arm", "cp315_linux_ppc", "cp315_linux_s390x", "cp315_linux_x86_64", "cp315_osx_aarch64", "cp315_osx_x86_64", "cp315_windows_x86_64"),
Copy link
Contributor Author

@chrisirhc chrisirhc Mar 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure why my changes introduced this change. My guess is that extension.bzl may have some handling for any.whl

@chrisirhc
Copy link
Contributor Author

One of the errors from the CI:

(14:29:58) ERROR: /private/var/tmp/_bazel_buildkite/c90e6e99c06413157d7a728d39ca2945/external/+pip+dev_pip/markupsafe/BUILD.bazel:6:12: Illegal ambiguous match on configurable attribute "actual" in @@+pip+dev_pip//markupsafe:pkg:
--
  | @@+pip+dev_pip//_config:is_cp311_osx_x86_64
  | @@+pip+dev_pip//_config:is_cp311_cp311_osx_universal2

@@ -207,22 +207,46 @@ def parse_requirements(
# Return normalized names
ret_requirements = ret.setdefault(normalize_name(whl_name), [])

all_platforms = []
common_sdist = None

for r in sorted(reqs.values(), key = lambda r: r.requirement_line):
whls, sdist = _add_dists(
requirement = r,
index_urls = index_urls.get(whl_name),
logger = logger,
)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The idea of adding a common sdist feels like a hack. Maybe having a different algorithm/grouping would be better. Maybe having per sha grouping could be better.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Took a stab at changing it to use the sha instead.

@chrisirhc chrisirhc force-pushed the chua/03-11-investigate-exp-index branch from 608355a to fa04ed5 Compare April 4, 2025 05:57
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_index_url can only be used in one pip.parse(), subsequent calls fail
2 participants