feat(pypi): add pip.dep to declare abstract pypi dependencies#3850
feat(pypi): add pip.dep to declare abstract pypi dependencies#3850rickeylev wants to merge 4 commits into
Conversation
Introduce the pip.dep tag class to allow modules to declare abstract PyPI dependencies. These dependencies are fed directly into the unified hub repository, ensuring their target structures exist and automatically routing any unimplemented declarations to analysis-time errors.
There was a problem hiding this comment.
Code Review
This pull request introduces a new dep tag class to the pip bzlmod extension, enabling modules to declare abstract PyPI dependencies. This ensures that target structures exist in the unified hub without forcing a specific version or lock file on consumers, with downstream modules providing the concrete implementation via pip.parse. The feedback suggests a minor optimization in python/private/pypi/extension.bzl to remove a redundant normalize_name call since the keys of declared_deps are already normalized.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Simplify the declared_deps loop by removing a redundant normalization call. Add a unit test to verify that when a package is declared via pip.dep and also provided by a concrete hub, the concrete hub implementation coexists correctly and takes precedence.
Add the missing H1 title to the Starlark rules file to ensure it conforms to the workspace rule formatting guidelines.
Introduce the pip.dep tag class to allow modules to declare abstract
PyPI dependencies. These declarations ensure the target structure for
a PyPI package is created, but provide a no-op implementation that
passes analysis time, but fails at execution time.
Along the way, create an agent rule for
*.bzlfiles to help guide itin creating better bzl files.