uv/crates
Charlie Marsh fa1bbbbe08
Write fully-precise Git SHAs to pip-compile output (#299)
This PR adds a mechanism by which we can ensure that we _always_ try to
refresh Git dependencies when resolving; further, we now write the fully
resolved SHA to the "lockfile". However, nothing in the code _assumes_
we do this, so the installer will remain agnostic to this behavior.

The specific approach taken here is minimally invasive. Specifically,
when we try to fetch a source distribution, we check if it's a Git
dependency; if it is, we fetch, and return the exact SHA, which we then
map back to a new URL. In the resolver, we keep track of URL
"redirects", and then we use the redirect (1) for the actual source
distribution building, and (2) when writing back out to the lockfile. As
such, none of the types outside of the resolver change at all, since
we're just mapping `RemoteDistribution` to `RemoteDistribution`, but
swapping out the internal URLs.

There are some inefficiencies here since, e.g., we do the Git fetch,
send back the "precise" URL, then a moment later, do a Git checkout of
that URL (which will be _mostly_ a no-op -- since we have a full SHA, we
don't have to fetch anything, but we _do_ check back on disk to see if
the SHA is still checked out). A more efficient approach would be to
return the path to the checked-out revision when we do this conversion
to a "precise" URL, since we'd then only interact with the Git repo
exactly once. But this runs the risk that the checked-out SHA changes
between the time we make the "precise" URL and the time we build the
source distribution.

Closes #286.
2023-11-03 16:26:57 +00:00
..
distribution-filename Wheel filename distribution package name (#278) 2023-11-02 11:15:27 +00:00
gourgeist Make cache non-optional in most crates (#293) 2023-11-02 13:40:20 -04:00
install-wheel-rs Add PackageName::as_dist_info_name (#305) 2023-11-03 08:16:44 +00:00
pep440-rs Add support for pre-release versions (#216) 2023-10-29 14:31:55 -04:00
pep508-rs Wheel filename distribution package name (#278) 2023-11-02 11:15:27 +00:00
platform-host Fix musl compilation (#234) 2023-10-30 18:10:17 +01:00
platform-tags Store all distributions rather than compatible wheels (#114) 2023-10-17 17:09:31 -04:00
puffin-build Add support for Git dependencies (#283) 2023-11-02 15:14:55 +00:00
puffin-cache Add stable hash crate (#281) 2023-11-01 23:41:45 +00:00
puffin-cli Write fully-precise Git SHAs to pip-compile output (#299) 2023-11-03 16:26:57 +00:00
puffin-client Wheel filename distribution package name (#278) 2023-11-02 11:15:27 +00:00
puffin-dev Make cache non-optional in most crates (#293) 2023-11-02 13:40:20 -04:00
puffin-dispatch Report project name instead of root when using pyproject.toml files (#295) 2023-11-03 10:22:10 -05:00
puffin-distribution Wheel filename distribution package name (#278) 2023-11-02 11:15:27 +00:00
puffin-git Write fully-precise Git SHAs to pip-compile output (#299) 2023-11-03 16:26:57 +00:00
puffin-installer Make cache non-optional in most crates (#293) 2023-11-02 13:40:20 -04:00
puffin-interpreter Make cache non-optional in most crates (#293) 2023-11-02 13:40:20 -04:00
puffin-normalize Add PackageName::as_dist_info_name (#305) 2023-11-03 08:16:44 +00:00
puffin-package Wheel filename distribution package name (#278) 2023-11-02 11:15:27 +00:00
puffin-resolver Write fully-precise Git SHAs to pip-compile output (#299) 2023-11-03 16:26:57 +00:00
puffin-traits Make cache non-optional in most crates (#293) 2023-11-02 13:40:20 -04:00
puffin-workspace Wheel filename distribution package name (#278) 2023-11-02 11:15:27 +00:00
README.md Add source distribution filename abstraction (#154) 2023-10-20 17:45:57 +02:00

Crates

pep440-rs

Utilities for interacting with Python version numbers and specifiers.

pep508-rs

Utilities for interacting with PEP 508 dependency specifiers.

platform-host

Functionality for detecting the current platform (operating system, architecture, etc.).

platform-tags

Functionality for parsing and inferring Python platform tags as per PEP 425.

puffin-cli

Command-line interface for the Puffin package manager.

puffin-client

Client for interacting with PyPI-compatible HTTP APIs.

puffin-installer

Functionality for installing Python packages into a virtual environment.

puffin-interpreter

Functionality for detecting and leveraging the current Python interpreter.

puffin-package

Types and functionality for working with Python packages, e.g., parsing wheel files.

puffin-resolver

Functionality for resolving Python packages and their dependencies.

distribution-filename

Functionality for parsing wheel filenames as per PEP 427.