mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-04 02:48:17 +00:00
Use consistent canonicalization for URLs (#5980)
Right now, the URL gets out-of-sync with the install path, since the install path is canonicalized. This leads to a subtle error on Windows (in CI) in which we don't preserve caching across resolution and installation.
This commit is contained in:
parent
cd0171a2ed
commit
19ac9af167
6 changed files with 41 additions and 38 deletions
|
@ -185,7 +185,7 @@ impl ParsedUrl {
|
|||
#[derive(Debug, Clone, Eq, PartialEq, PartialOrd, Hash, Ord)]
|
||||
pub struct ParsedPathUrl {
|
||||
pub url: Url,
|
||||
/// The resolved, absolute path to the distribution which we use for installing.
|
||||
/// The absolute, canonicalized path to the distribution which we use for installing.
|
||||
pub install_path: PathBuf,
|
||||
/// The absolute path or path relative to the workspace root pointing to the distribution
|
||||
/// which we use for locking. Unlike `given` on the verbatim URL all environment variables
|
||||
|
@ -219,7 +219,7 @@ impl ParsedPathUrl {
|
|||
#[derive(Debug, Clone, Eq, PartialEq, PartialOrd, Hash, Ord)]
|
||||
pub struct ParsedDirectoryUrl {
|
||||
pub url: Url,
|
||||
/// The resolved, absolute path to the distribution which we use for installing.
|
||||
/// The absolute, canonicalized path to the distribution which we use for installing.
|
||||
pub install_path: PathBuf,
|
||||
/// The absolute path or path relative to the workspace root pointing to the distribution
|
||||
/// which we use for locking. Unlike `given` on the verbatim URL all environment variables
|
||||
|
|
|
@ -313,7 +313,7 @@ pub enum RequirementSource {
|
|||
/// be a binary distribution (a `.whl` file) or a source distribution archive (a `.zip` or
|
||||
/// `.tar.gz` file).
|
||||
Path {
|
||||
/// The resolved, absolute path to the distribution which we use for installing.
|
||||
/// The absolute, canonicalized path to the distribution which we use for installing.
|
||||
install_path: PathBuf,
|
||||
/// The absolute path or path relative to the workspace root pointing to the distribution
|
||||
/// which we use for locking. Unlike `given` on the verbatim URL all environment variables
|
||||
|
@ -328,7 +328,7 @@ pub enum RequirementSource {
|
|||
/// A local source tree (a directory with a pyproject.toml in, or a legacy
|
||||
/// source distribution with only a setup.py but non pyproject.toml in it).
|
||||
Directory {
|
||||
/// The resolved, absolute path to the distribution which we use for installing.
|
||||
/// The absolute, canonicalized path to the distribution which we use for installing.
|
||||
install_path: PathBuf,
|
||||
/// The absolute path or path relative to the workspace root pointing to the distribution
|
||||
/// which we use for locking. Unlike `given` on the verbatim URL all environment variables
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue