Skip to content

fix(uv): index stub packages in Gazelle manifests#1365

Open
TrapsterDK wants to merge 1 commit into
aspect-build:mainfrom
TrapsterDK:fix/gazelle-stub-packages
Open

fix(uv): index stub packages in Gazelle manifests#1365
TrapsterDK wants to merge 1 commit into
aspect-build:mainfrom
TrapsterDK:fix/gazelle-stub-packages

Conversation

@TrapsterDK

Copy link
Copy Markdown

AI written, human reviewed.

Closes #1364.

Add opt-in stub-package indexing to gazelle_python_manifest.

When include_stub_packages = True, the manifest generator adds synthetic mappings for normalized distributions following the stub conventions supported by rules_python:

  • types_*
  • stubs_*
  • *_types
  • *_stubs

This allows the Gazelle Python extension to automatically add dependencies such as types-requests and asyncpg-stubs alongside their runtime packages.

The option defaults to False, matching the compatibility behavior introduced by bazel-contrib/rules_python#2425.

Related work:

Changes are visible to end-users: yes

  • Searched for relevant documentation and updated as needed: yes
  • Breaking change (forces users to change their own code or config): no
  • Suggested release notes appear below: yes

gazelle_python_manifest now supports include_stub_packages = True, allowing Gazelle to automatically resolve conventional Python stub distributions from uv-managed dependencies.

Test plan

  • New unit coverage for all supported stub-package naming conventions
  • Updated the uv-Gazelle end-to-end manifest snapshot with types_requests
  • bazel test //uv/private/gazelle_manifest:test
  • bazel build //uv-gazelle-778:gazelle_python_manifest from the e2e/cases workspace
  • Ruff
  • Pyright
  • ty
  • Buildifier

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.

[Bug]: gazelle_python_manifest does not index conventional stub packages

1 participant