mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-03 18:38:21 +00:00
Add type-based validation for index names (#8464)
## Summary Also documents the normalization scheme.
This commit is contained in:
parent
399d5ab50a
commit
ff3ed3b797
10 changed files with 189 additions and 44 deletions
|
@ -6,7 +6,7 @@ use thiserror::Error;
|
|||
use url::Url;
|
||||
use uv_configuration::LowerBound;
|
||||
use uv_distribution_filename::DistExtension;
|
||||
use uv_distribution_types::{Index, IndexLocations, Origin};
|
||||
use uv_distribution_types::{Index, IndexLocations, IndexName, Origin};
|
||||
use uv_git::GitReference;
|
||||
use uv_normalize::PackageName;
|
||||
use uv_pep440::VersionSpecifiers;
|
||||
|
@ -398,7 +398,7 @@ pub enum LoweringError {
|
|||
#[error("Can only specify one of: `rev`, `tag`, or `branch`")]
|
||||
MoreThanOneGitRef,
|
||||
#[error("Package `{0}` references an undeclared index: `{1}`")]
|
||||
MissingIndex(PackageName, String),
|
||||
MissingIndex(PackageName, IndexName),
|
||||
#[error("Workspace members are not allowed in non-workspace contexts")]
|
||||
WorkspaceMember,
|
||||
#[error(transparent)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue