mirror of
https://github.com/astral-sh/uv.git
synced 2025-07-07 21:35:00 +00:00
Edition 2024 prep: Escape r#gen
and remove redundant ref (#11922)
Three edition 2021 compatible sets of changes in preparation for the edition 2025 split out from #11724. In edition 2025, `gen` is a keyword, so we escape it as `r#gen`. `ref` and `ref mut` are not allowed anymore for `&T` and `&mut T`, so we remove them. `cargo fmt` now formats inside of macros, which the 2021 formatter doesn't undo.
This commit is contained in:
parent
6fdcaa8a4b
commit
d712ff243e
16 changed files with 63 additions and 44 deletions
|
@ -162,7 +162,7 @@ impl DevGroupsSpecificationInner {
|
||||||
/// you should ignore the project itself and all its dependencies,
|
/// you should ignore the project itself and all its dependencies,
|
||||||
/// and instead just install the dependency-groups.
|
/// and instead just install the dependency-groups.
|
||||||
///
|
///
|
||||||
/// (This is really just asking if an --only flag was passed.)
|
/// (This is really just asking if an --only flag was passed.)
|
||||||
pub fn prod(&self) -> bool {
|
pub fn prod(&self) -> bool {
|
||||||
!self.only_groups
|
!self.only_groups
|
||||||
}
|
}
|
||||||
|
|
|
@ -67,7 +67,7 @@ impl schemars::JsonSchema for PackageNameSpecifier {
|
||||||
"PackageNameSpecifier".to_string()
|
"PackageNameSpecifier".to_string()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn json_schema(_gen: &mut schemars::gen::SchemaGenerator) -> schemars::schema::Schema {
|
fn json_schema(_gen: &mut schemars::r#gen::SchemaGenerator) -> schemars::schema::Schema {
|
||||||
schemars::schema::SchemaObject {
|
schemars::schema::SchemaObject {
|
||||||
instance_type: Some(schemars::schema::InstanceType::String.into()),
|
instance_type: Some(schemars::schema::InstanceType::String.into()),
|
||||||
string: Some(Box::new(schemars::schema::StringValidation {
|
string: Some(Box::new(schemars::schema::StringValidation {
|
||||||
|
|
|
@ -35,7 +35,7 @@ impl schemars::JsonSchema for RequiredVersion {
|
||||||
String::from("RequiredVersion")
|
String::from("RequiredVersion")
|
||||||
}
|
}
|
||||||
|
|
||||||
fn json_schema(_gen: &mut schemars::gen::SchemaGenerator) -> schemars::schema::Schema {
|
fn json_schema(_gen: &mut schemars::r#gen::SchemaGenerator) -> schemars::schema::Schema {
|
||||||
schemars::schema::SchemaObject {
|
schemars::schema::SchemaObject {
|
||||||
instance_type: Some(schemars::schema::InstanceType::String.into()),
|
instance_type: Some(schemars::schema::InstanceType::String.into()),
|
||||||
metadata: Some(Box::new(schemars::schema::Metadata {
|
metadata: Some(Box::new(schemars::schema::Metadata {
|
||||||
|
|
|
@ -147,7 +147,7 @@ impl schemars::JsonSchema for TrustedHost {
|
||||||
"TrustedHost".to_string()
|
"TrustedHost".to_string()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn json_schema(_gen: &mut schemars::gen::SchemaGenerator) -> schemars::schema::Schema {
|
fn json_schema(_gen: &mut schemars::r#gen::SchemaGenerator) -> schemars::schema::Schema {
|
||||||
schemars::schema::SchemaObject {
|
schemars::schema::SchemaObject {
|
||||||
instance_type: Some(schemars::schema::InstanceType::String.into()),
|
instance_type: Some(schemars::schema::InstanceType::String.into()),
|
||||||
metadata: Some(Box::new(schemars::schema::Metadata {
|
metadata: Some(Box::new(schemars::schema::Metadata {
|
||||||
|
|
|
@ -72,7 +72,7 @@ impl schemars::JsonSchema for IndexUrl {
|
||||||
"IndexUrl".to_string()
|
"IndexUrl".to_string()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn json_schema(_gen: &mut schemars::gen::SchemaGenerator) -> schemars::schema::Schema {
|
fn json_schema(_gen: &mut schemars::r#gen::SchemaGenerator) -> schemars::schema::Schema {
|
||||||
schemars::schema::SchemaObject {
|
schemars::schema::SchemaObject {
|
||||||
instance_type: Some(schemars::schema::InstanceType::String.into()),
|
instance_type: Some(schemars::schema::InstanceType::String.into()),
|
||||||
metadata: Some(Box::new(schemars::schema::Metadata {
|
metadata: Some(Box::new(schemars::schema::Metadata {
|
||||||
|
|
|
@ -54,8 +54,10 @@ macro_rules! impl_index {
|
||||||
IndexUrl::schema_name()
|
IndexUrl::schema_name()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn json_schema(gen: &mut schemars::gen::SchemaGenerator) -> schemars::schema::Schema {
|
fn json_schema(
|
||||||
IndexUrl::json_schema(gen)
|
r#gen: &mut schemars::r#gen::SchemaGenerator,
|
||||||
|
) -> schemars::schema::Schema {
|
||||||
|
IndexUrl::json_schema(r#gen)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -352,7 +352,7 @@ impl schemars::JsonSchema for PortablePathBuf {
|
||||||
PathBuf::schema_name()
|
PathBuf::schema_name()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn json_schema(_gen: &mut schemars::gen::SchemaGenerator) -> schemars::schema::Schema {
|
fn json_schema(_gen: &mut schemars::r#gen::SchemaGenerator) -> schemars::schema::Schema {
|
||||||
PathBuf::json_schema(_gen)
|
PathBuf::json_schema(_gen)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -140,7 +140,7 @@ impl FromStr for Operator {
|
||||||
other => {
|
other => {
|
||||||
return Err(OperatorParseError {
|
return Err(OperatorParseError {
|
||||||
got: other.to_string(),
|
got: other.to_string(),
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
Ok(operator)
|
Ok(operator)
|
||||||
|
@ -483,7 +483,7 @@ impl Version {
|
||||||
/// last number in the release component.
|
/// last number in the release component.
|
||||||
#[inline]
|
#[inline]
|
||||||
fn push_release(&mut self, n: u64) {
|
fn push_release(&mut self, n: u64) {
|
||||||
if let VersionInner::Small { ref mut small } = &mut self.inner {
|
if let VersionInner::Small { small } = &mut self.inner {
|
||||||
if small.push_release(n) {
|
if small.push_release(n) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -498,8 +498,8 @@ impl Version {
|
||||||
#[inline]
|
#[inline]
|
||||||
fn clear_release(&mut self) {
|
fn clear_release(&mut self) {
|
||||||
match &mut self.inner {
|
match &mut self.inner {
|
||||||
VersionInner::Small { ref mut small } => small.clear_release(),
|
VersionInner::Small { small } => small.clear_release(),
|
||||||
VersionInner::Full { ref mut full } => {
|
VersionInner::Full { full } => {
|
||||||
Arc::make_mut(full).release.clear();
|
Arc::make_mut(full).release.clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -509,7 +509,7 @@ impl Version {
|
||||||
#[inline]
|
#[inline]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
pub fn with_epoch(mut self, value: u64) -> Self {
|
pub fn with_epoch(mut self, value: u64) -> Self {
|
||||||
if let VersionInner::Small { ref mut small } = &mut self.inner {
|
if let VersionInner::Small { small } = &mut self.inner {
|
||||||
if small.set_epoch(value) {
|
if small.set_epoch(value) {
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
@ -522,7 +522,7 @@ impl Version {
|
||||||
#[inline]
|
#[inline]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
pub fn with_pre(mut self, value: Option<Prerelease>) -> Self {
|
pub fn with_pre(mut self, value: Option<Prerelease>) -> Self {
|
||||||
if let VersionInner::Small { ref mut small } = &mut self.inner {
|
if let VersionInner::Small { small } = &mut self.inner {
|
||||||
if small.set_pre(value) {
|
if small.set_pre(value) {
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
@ -535,7 +535,7 @@ impl Version {
|
||||||
#[inline]
|
#[inline]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
pub fn with_post(mut self, value: Option<u64>) -> Self {
|
pub fn with_post(mut self, value: Option<u64>) -> Self {
|
||||||
if let VersionInner::Small { ref mut small } = &mut self.inner {
|
if let VersionInner::Small { small } = &mut self.inner {
|
||||||
if small.set_post(value) {
|
if small.set_post(value) {
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
@ -548,7 +548,7 @@ impl Version {
|
||||||
#[inline]
|
#[inline]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
pub fn with_dev(mut self, value: Option<u64>) -> Self {
|
pub fn with_dev(mut self, value: Option<u64>) -> Self {
|
||||||
if let VersionInner::Small { ref mut small } = &mut self.inner {
|
if let VersionInner::Small { small } = &mut self.inner {
|
||||||
if small.set_dev(value) {
|
if small.set_dev(value) {
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
@ -576,7 +576,7 @@ impl Version {
|
||||||
match value {
|
match value {
|
||||||
LocalVersion::Segments(segments) => self.with_local_segments(segments),
|
LocalVersion::Segments(segments) => self.with_local_segments(segments),
|
||||||
LocalVersion::Max => {
|
LocalVersion::Max => {
|
||||||
if let VersionInner::Small { ref mut small } = &mut self.inner {
|
if let VersionInner::Small { small } = &mut self.inner {
|
||||||
if small.set_local(LocalVersion::Max) {
|
if small.set_local(LocalVersion::Max) {
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
@ -594,7 +594,7 @@ impl Version {
|
||||||
#[inline]
|
#[inline]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
pub fn without_local(mut self) -> Self {
|
pub fn without_local(mut self) -> Self {
|
||||||
if let VersionInner::Small { ref mut small } = &mut self.inner {
|
if let VersionInner::Small { small } = &mut self.inner {
|
||||||
if small.set_local(LocalVersion::empty()) {
|
if small.set_local(LocalVersion::empty()) {
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
@ -635,7 +635,7 @@ impl Version {
|
||||||
pub fn with_min(mut self, value: Option<u64>) -> Self {
|
pub fn with_min(mut self, value: Option<u64>) -> Self {
|
||||||
debug_assert!(!self.is_pre(), "min is not allowed on pre-release versions");
|
debug_assert!(!self.is_pre(), "min is not allowed on pre-release versions");
|
||||||
debug_assert!(!self.is_dev(), "min is not allowed on dev versions");
|
debug_assert!(!self.is_dev(), "min is not allowed on dev versions");
|
||||||
if let VersionInner::Small { ref mut small } = &mut self.inner {
|
if let VersionInner::Small { small } = &mut self.inner {
|
||||||
if small.set_min(value) {
|
if small.set_min(value) {
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
@ -657,7 +657,7 @@ impl Version {
|
||||||
"max is not allowed on post-release versions"
|
"max is not allowed on post-release versions"
|
||||||
);
|
);
|
||||||
debug_assert!(!self.is_dev(), "max is not allowed on dev versions");
|
debug_assert!(!self.is_dev(), "max is not allowed on dev versions");
|
||||||
if let VersionInner::Small { ref mut small } = &mut self.inner {
|
if let VersionInner::Small { small } = &mut self.inner {
|
||||||
if small.set_max(value) {
|
if small.set_max(value) {
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
@ -687,7 +687,7 @@ impl Version {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
match &mut self.inner {
|
match &mut self.inner {
|
||||||
VersionInner::Full { ref mut full } => Arc::make_mut(full),
|
VersionInner::Full { full } => Arc::make_mut(full),
|
||||||
VersionInner::Small { .. } => unreachable!(),
|
VersionInner::Small { .. } => unreachable!(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1616,7 +1616,7 @@ impl LocalVersionSlice<'_> {
|
||||||
|
|
||||||
/// Returns `true` if the local version is empty.
|
/// Returns `true` if the local version is empty.
|
||||||
pub fn is_empty(&self) -> bool {
|
pub fn is_empty(&self) -> bool {
|
||||||
matches!(self, Self::Segments(&[]))
|
matches!(self, &Self::Segments(&[]))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -299,7 +299,7 @@ impl<T: Pep508Url> schemars::JsonSchema for Requirement<T> {
|
||||||
"Requirement".to_string()
|
"Requirement".to_string()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn json_schema(_gen: &mut schemars::gen::SchemaGenerator) -> schemars::schema::Schema {
|
fn json_schema(_gen: &mut schemars::r#gen::SchemaGenerator) -> schemars::schema::Schema {
|
||||||
schemars::schema::SchemaObject {
|
schemars::schema::SchemaObject {
|
||||||
instance_type: Some(schemars::schema::InstanceType::String.into()),
|
instance_type: Some(schemars::schema::InstanceType::String.into()),
|
||||||
metadata: Some(Box::new(schemars::schema::Metadata {
|
metadata: Some(Box::new(schemars::schema::Metadata {
|
||||||
|
|
|
@ -631,7 +631,7 @@ impl InternerGuard<'_> {
|
||||||
// we recursively simplify.
|
// we recursively simplify.
|
||||||
let Node {
|
let Node {
|
||||||
var: Variable::Version(CanonicalMarkerValueVersion::PythonFullVersion),
|
var: Variable::Version(CanonicalMarkerValueVersion::PythonFullVersion),
|
||||||
children: Edges::Version { ref edges },
|
children: Edges::Version { edges },
|
||||||
} = node
|
} = node
|
||||||
else {
|
else {
|
||||||
// Simplify all nodes recursively.
|
// Simplify all nodes recursively.
|
||||||
|
@ -713,7 +713,7 @@ impl InternerGuard<'_> {
|
||||||
let node = self.shared.node(i);
|
let node = self.shared.node(i);
|
||||||
let Node {
|
let Node {
|
||||||
var: Variable::Version(CanonicalMarkerValueVersion::PythonFullVersion),
|
var: Variable::Version(CanonicalMarkerValueVersion::PythonFullVersion),
|
||||||
children: Edges::Version { ref edges },
|
children: Edges::Version { edges },
|
||||||
} = node
|
} = node
|
||||||
else {
|
else {
|
||||||
// Complexify all nodes recursively.
|
// Complexify all nodes recursively.
|
||||||
|
@ -1630,7 +1630,7 @@ fn python_version_to_full_version(specifier: VersionSpecifier) -> Result<Version
|
||||||
Ok(match specifier.operator() {
|
Ok(match specifier.operator() {
|
||||||
// `python_version` cannot have more than two release segments, so equality is impossible.
|
// `python_version` cannot have more than two release segments, so equality is impossible.
|
||||||
Operator::Equal | Operator::ExactEqual | Operator::EqualStar | Operator::TildeEqual => {
|
Operator::Equal | Operator::ExactEqual | Operator::EqualStar | Operator::TildeEqual => {
|
||||||
return Err(NodeId::FALSE)
|
return Err(NodeId::FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Similarly, inequalities are always `true`.
|
// Similarly, inequalities are always `true`.
|
||||||
|
|
|
@ -1711,7 +1711,7 @@ impl schemars::JsonSchema for MarkerTree {
|
||||||
"MarkerTree".to_string()
|
"MarkerTree".to_string()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn json_schema(_gen: &mut schemars::gen::SchemaGenerator) -> schemars::schema::Schema {
|
fn json_schema(_gen: &mut schemars::r#gen::SchemaGenerator) -> schemars::schema::Schema {
|
||||||
schemars::schema::SchemaObject {
|
schemars::schema::SchemaObject {
|
||||||
instance_type: Some(schemars::schema::InstanceType::String.into()),
|
instance_type: Some(schemars::schema::InstanceType::String.into()),
|
||||||
metadata: Some(Box::new(schemars::schema::Metadata {
|
metadata: Some(Box::new(schemars::schema::Metadata {
|
||||||
|
|
|
@ -443,8 +443,8 @@ impl schemars::JsonSchema for SchemaConflictItem {
|
||||||
"SchemaConflictItem".to_string()
|
"SchemaConflictItem".to_string()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn json_schema(gen: &mut schemars::gen::SchemaGenerator) -> schemars::schema::Schema {
|
fn json_schema(r#gen: &mut schemars::r#gen::SchemaGenerator) -> schemars::schema::Schema {
|
||||||
<ConflictItemWire as schemars::JsonSchema>::json_schema(gen)
|
<ConflictItemWire as schemars::JsonSchema>::json_schema(r#gen)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@ impl schemars::JsonSchema for PythonVersion {
|
||||||
String::from("PythonVersion")
|
String::from("PythonVersion")
|
||||||
}
|
}
|
||||||
|
|
||||||
fn json_schema(_gen: &mut schemars::gen::SchemaGenerator) -> schemars::schema::Schema {
|
fn json_schema(_gen: &mut schemars::r#gen::SchemaGenerator) -> schemars::schema::Schema {
|
||||||
schemars::schema::SchemaObject {
|
schemars::schema::SchemaObject {
|
||||||
instance_type: Some(schemars::schema::InstanceType::String.into()),
|
instance_type: Some(schemars::schema::InstanceType::String.into()),
|
||||||
string: Some(Box::new(schemars::schema::StringValidation {
|
string: Some(Box::new(schemars::schema::StringValidation {
|
||||||
|
|
|
@ -71,7 +71,7 @@ impl schemars::JsonSchema for ExcludeNewer {
|
||||||
"ExcludeNewer".to_string()
|
"ExcludeNewer".to_string()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn json_schema(_gen: &mut schemars::gen::SchemaGenerator) -> schemars::schema::Schema {
|
fn json_schema(_gen: &mut schemars::r#gen::SchemaGenerator) -> schemars::schema::Schema {
|
||||||
schemars::schema::SchemaObject {
|
schemars::schema::SchemaObject {
|
||||||
instance_type: Some(schemars::schema::InstanceType::String.into()),
|
instance_type: Some(schemars::schema::InstanceType::String.into()),
|
||||||
string: Some(Box::new(schemars::schema::StringValidation {
|
string: Some(Box::new(schemars::schema::StringValidation {
|
||||||
|
|
|
@ -155,7 +155,7 @@ impl schemars::JsonSchema for SmallString {
|
||||||
String::schema_name()
|
String::schema_name()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn json_schema(_gen: &mut schemars::gen::SchemaGenerator) -> schemars::schema::Schema {
|
fn json_schema(_gen: &mut schemars::r#gen::SchemaGenerator) -> schemars::schema::Schema {
|
||||||
String::json_schema(_gen)
|
String::json_schema(_gen)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,9 +36,13 @@ pub enum PyprojectTomlError {
|
||||||
TomlSyntax(#[from] toml_edit::TomlError),
|
TomlSyntax(#[from] toml_edit::TomlError),
|
||||||
#[error(transparent)]
|
#[error(transparent)]
|
||||||
TomlSchema(#[from] toml_edit::de::Error),
|
TomlSchema(#[from] toml_edit::de::Error),
|
||||||
#[error("`pyproject.toml` is using the `[project]` table, but the required `project.name` field is not set")]
|
#[error(
|
||||||
|
"`pyproject.toml` is using the `[project]` table, but the required `project.name` field is not set"
|
||||||
|
)]
|
||||||
MissingName,
|
MissingName,
|
||||||
#[error("`pyproject.toml` is using the `[project]` table, but the required `project.version` field is neither set nor present in the `project.dynamic` list")]
|
#[error(
|
||||||
|
"`pyproject.toml` is using the `[project]` table, but the required `project.version` field is neither set nor present in the `project.dynamic` list"
|
||||||
|
)]
|
||||||
MissingVersion,
|
MissingVersion,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -780,8 +784,8 @@ impl schemars::JsonSchema for SerdePattern {
|
||||||
<String as schemars::JsonSchema>::schema_name()
|
<String as schemars::JsonSchema>::schema_name()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn json_schema(gen: &mut schemars::gen::SchemaGenerator) -> schemars::schema::Schema {
|
fn json_schema(r#gen: &mut schemars::r#gen::SchemaGenerator) -> schemars::schema::Schema {
|
||||||
<String as schemars::JsonSchema>::json_schema(gen)
|
<String as schemars::JsonSchema>::json_schema(r#gen)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1193,7 +1197,7 @@ impl<'de> Deserialize<'de> for Source {
|
||||||
_ => {
|
_ => {
|
||||||
return Err(serde::de::Error::custom(
|
return Err(serde::de::Error::custom(
|
||||||
"expected at most one of `rev`, `tag`, or `branch`",
|
"expected at most one of `rev`, `tag`, or `branch`",
|
||||||
))
|
));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1434,23 +1438,36 @@ pub enum SourceError {
|
||||||
WorkspacePackageUrl(String),
|
WorkspacePackageUrl(String),
|
||||||
#[error("Workspace dependency `{0}` must refer to local directory, not a file")]
|
#[error("Workspace dependency `{0}` must refer to local directory, not a file")]
|
||||||
WorkspacePackageFile(String),
|
WorkspacePackageFile(String),
|
||||||
#[error("`{0}` did not resolve to a Git repository, but a Git reference (`--rev {1}`) was provided.")]
|
#[error(
|
||||||
|
"`{0}` did not resolve to a Git repository, but a Git reference (`--rev {1}`) was provided."
|
||||||
|
)]
|
||||||
UnusedRev(String, String),
|
UnusedRev(String, String),
|
||||||
#[error("`{0}` did not resolve to a Git repository, but a Git reference (`--tag {1}`) was provided.")]
|
#[error(
|
||||||
|
"`{0}` did not resolve to a Git repository, but a Git reference (`--tag {1}`) was provided."
|
||||||
|
)]
|
||||||
UnusedTag(String, String),
|
UnusedTag(String, String),
|
||||||
#[error("`{0}` did not resolve to a Git repository, but a Git reference (`--branch {1}`) was provided.")]
|
#[error(
|
||||||
|
"`{0}` did not resolve to a Git repository, but a Git reference (`--branch {1}`) was provided."
|
||||||
|
)]
|
||||||
UnusedBranch(String, String),
|
UnusedBranch(String, String),
|
||||||
#[error("`{0}` did not resolve to a local directory, but the `--editable` flag was provided. Editable installs are only supported for local directories.")]
|
#[error(
|
||||||
|
"`{0}` did not resolve to a local directory, but the `--editable` flag was provided. Editable installs are only supported for local directories."
|
||||||
|
)]
|
||||||
UnusedEditable(String),
|
UnusedEditable(String),
|
||||||
#[error("Workspace dependency `{0}` was marked as `--no-editable`, but workspace dependencies are always added in editable mode. Pass `--no-editable` to `uv sync` or `uv run` to install workspace dependencies in non-editable mode.")]
|
#[error(
|
||||||
|
"Workspace dependency `{0}` was marked as `--no-editable`, but workspace dependencies are always added in editable mode. Pass `--no-editable` to `uv sync` or `uv run` to install workspace dependencies in non-editable mode."
|
||||||
|
)]
|
||||||
UnusedNoEditable(String),
|
UnusedNoEditable(String),
|
||||||
#[error("Failed to resolve absolute path")]
|
#[error("Failed to resolve absolute path")]
|
||||||
Absolute(#[from] std::io::Error),
|
Absolute(#[from] std::io::Error),
|
||||||
#[error("Path contains invalid characters: `{}`", _0.display())]
|
#[error("Path contains invalid characters: `{}`", _0.display())]
|
||||||
NonUtf8Path(PathBuf),
|
NonUtf8Path(PathBuf),
|
||||||
#[error("Source markers must be disjoint, but the following markers overlap: `{0}` and `{1}`.\n\n{hint}{colon} replace `{1}` with `{2}`.", hint = "hint".bold().cyan(), colon = ":".bold())]
|
#[error("Source markers must be disjoint, but the following markers overlap: `{0}` and `{1}`.\n\n{hint}{colon} replace `{1}` with `{2}`.", hint = "hint".bold().cyan(), colon = ":".bold()
|
||||||
|
)]
|
||||||
OverlappingMarkers(String, String, String),
|
OverlappingMarkers(String, String, String),
|
||||||
#[error("When multiple sources are provided, each source must include a platform marker (e.g., `marker = \"sys_platform == 'linux'\"`)")]
|
#[error(
|
||||||
|
"When multiple sources are provided, each source must include a platform marker (e.g., `marker = \"sys_platform == 'linux'\"`)"
|
||||||
|
)]
|
||||||
MissingMarkers,
|
MissingMarkers,
|
||||||
#[error("Must provide at least one source")]
|
#[error("Must provide at least one source")]
|
||||||
EmptySources,
|
EmptySources,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue