Skip to content

feat(pypi): resolve the extras of the dependencies in the whl repositories - #43

Draft
aignas wants to merge 1 commit into
feat.aignas.extras-edges-01-extra-dep-rulesfrom
feat.aignas.extras-edges-02-edges
Draft

aignas wants to merge 1 commit into
feat.aignas.extras-edges-01-extra-dep-rulesfrom
feat.aignas.extras-edges-02-edges

Conversation

@aignas

@aignas aignas commented Nov 22, 2026

Copy link
Copy Markdown
Owner

A dependency on an extra of another package from the wheel METADATA,
e.g. pytest-cov requiring coverage[toml], used the [toml] target
of the hub, which only exists if the lock file requests the extra, and
the build failed otherwise. The whl repositories now create an
extra_dep target for such an edge and an _extras target that selects
the extra, and the hub only forwards _extras. This also works without
a hub. An extra that is not provided only prints a warning, like pip,
so the missing_extra_error rule is removed.

Part of #41. Based on the previous PR of the stack.

Work towards bazel-contrib#2786

…ories

A dependency on an extra of another package from the wheel METADATA,
e.g. coverage[toml], used the [toml] target of the hub, which only
exists if the lock file requests the extra, and failed the build
otherwise. The extras that a package provides are only known from its
METADATA, so the whl repository of the dependency resolves them: the
dependent package uses an extra_dep target that points to the _extras
target of the dependency, which is forwarded by the hub. The
missing_extra_error rule is no longer needed.

Work towards bazel-contrib#2786
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.

1 participant