Implement full module extension with toolchain, libc detection, and Gazelle manifest#947
Open
xangcastle wants to merge 4 commits intomainfrom
Open
Implement full module extension with toolchain, libc detection, and Gazelle manifest#947xangcastle wants to merge 4 commits intomainfrom
xangcastle wants to merge 4 commits intomainfrom
Conversation
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Replaces the stub uv/unstable/extension.bzl (previously a one-liner alias to the
stable extension) with a complete, self-contained module extension that owns its own
toolchain download, platform detection, and Gazelle integration.
New features
Hermetic UV toolchain provisioning (uv/private/toolchain/)
with optional SHA256 verification
binary
environment
across 7 supported platforms (macOS arm/x86, Linux glibc/musl arm/x86, Windows x86)
uv/private/toolchain/types.bzl
Host libc detection (uv/private/constraints/libc/)
and /etc/os-release to distinguish glibc from musl at repository-fetch time
defs.bzl (LIBC_VARIANT) and config_setting targets
Gazelle manifest generation from uv.lock (uv/unstable/gazelle.bzl,
uv/unstable/lock_parser.bzl)
uv.lock, inspects each wheel's top_level.txt (with directory-scan fallback) to map
import names → package names, and emits a gazelle_python.yaml
SHA256 hashes without requiring a full TOML library
Full uv module extension (uv/unstable/extension.bzl)
toolchain, declare_hub, project, unstable_annotate_packages, override_package,
gazelle_manifest
setup, libc detection, and Gazelle manifest generation on top
Tests
(top_level.txt, directory scan fallback, metadata exclusion, name normalisation)
detection heuristics via a Python mirror of the Starlark logic
the new uv.gazelle_manifest() tag end-to-end and asserts the generated YAML contains
the expected cowsay: cowsay mapping
Test plan