mirror of https://github.com/astral-sh/uv
Add preview warning
This commit is contained in:
parent
fb0ca39c69
commit
49a75fa797
|
|
@ -24,7 +24,7 @@ use uv_distribution_types::{
|
||||||
use uv_git::ResolvedRepositoryReference;
|
use uv_git::ResolvedRepositoryReference;
|
||||||
use uv_normalize::{GroupName, PackageName};
|
use uv_normalize::{GroupName, PackageName};
|
||||||
use uv_pep440::Version;
|
use uv_pep440::Version;
|
||||||
use uv_pypi_types::{Conflicts, SupportedEnvironments};
|
use uv_pypi_types::{ConflictKind, Conflicts, SupportedEnvironments};
|
||||||
use uv_python::{Interpreter, PythonDownloads, PythonEnvironment, PythonPreference, PythonRequest};
|
use uv_python::{Interpreter, PythonDownloads, PythonEnvironment, PythonPreference, PythonRequest};
|
||||||
use uv_requirements::ExtrasResolver;
|
use uv_requirements::ExtrasResolver;
|
||||||
use uv_requirements::upgrade::{LockedRequirements, read_lock_requirements};
|
use uv_requirements::upgrade::{LockedRequirements, read_lock_requirements};
|
||||||
|
|
@ -476,6 +476,21 @@ async fn do_lock(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check if any conflicts contain project-level conflicts
|
||||||
|
if preview.is_disabled() {
|
||||||
|
for set in conflicts.iter() {
|
||||||
|
if set
|
||||||
|
.iter()
|
||||||
|
.any(|item| matches!(item.kind(), ConflictKind::Project))
|
||||||
|
{
|
||||||
|
warn_user_once!(
|
||||||
|
"Declaring conflicts for packages (`package = ...`) is experimental and may change without warning. Pass `--preview` to disable this warning."
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Collect the list of supported environments.
|
// Collect the list of supported environments.
|
||||||
let environments = {
|
let environments = {
|
||||||
let environments = target.environments();
|
let environments = target.environments();
|
||||||
|
|
|
||||||
|
|
@ -2947,6 +2947,7 @@ fn lock_conflicting_workspace_members() -> Result<()> {
|
||||||
----- stdout -----
|
----- stdout -----
|
||||||
|
|
||||||
----- stderr -----
|
----- stderr -----
|
||||||
|
warning: Declaring conflicts for packages (`package = ...`) is experimental and may change without warning. Pass `--preview` to disable this warning.
|
||||||
Resolved 4 packages in [TIME]
|
Resolved 4 packages in [TIME]
|
||||||
");
|
");
|
||||||
|
|
||||||
|
|
@ -3123,6 +3124,7 @@ fn lock_conflicting_workspace_members_depends_direct() -> Result<()> {
|
||||||
----- stdout -----
|
----- stdout -----
|
||||||
|
|
||||||
----- stderr -----
|
----- stderr -----
|
||||||
|
warning: Declaring conflicts for packages (`package = ...`) is experimental and may change without warning. Pass `--preview` to disable this warning.
|
||||||
× No solution found when resolving dependencies:
|
× No solution found when resolving dependencies:
|
||||||
╰─▶ Because subexample depends on sortedcontainers==2.4.0 and example depends on sortedcontainers==2.3.0, we can conclude that example and subexample are incompatible.
|
╰─▶ Because subexample depends on sortedcontainers==2.4.0 and example depends on sortedcontainers==2.3.0, we can conclude that example and subexample are incompatible.
|
||||||
And because example depends on subexample and your workspace requires example, we can conclude that your workspace's requirements are unsatisfiable.
|
And because example depends on subexample and your workspace requires example, we can conclude that your workspace's requirements are unsatisfiable.
|
||||||
|
|
@ -3202,6 +3204,7 @@ fn lock_conflicting_workspace_members_depends_direct_extra() -> Result<()> {
|
||||||
----- stdout -----
|
----- stdout -----
|
||||||
|
|
||||||
----- stderr -----
|
----- stderr -----
|
||||||
|
warning: Declaring conflicts for packages (`package = ...`) is experimental and may change without warning. Pass `--preview` to disable this warning.
|
||||||
Resolved 4 packages in [TIME]
|
Resolved 4 packages in [TIME]
|
||||||
");
|
");
|
||||||
|
|
||||||
|
|
@ -3418,6 +3421,7 @@ fn lock_conflicting_workspace_members_depends_transitive() -> Result<()> {
|
||||||
----- stdout -----
|
----- stdout -----
|
||||||
|
|
||||||
----- stderr -----
|
----- stderr -----
|
||||||
|
warning: Declaring conflicts for packages (`package = ...`) is experimental and may change without warning. Pass `--preview` to disable this warning.
|
||||||
× No solution found when resolving dependencies:
|
× No solution found when resolving dependencies:
|
||||||
╰─▶ Because subexample depends on sortedcontainers==2.4.0 and indirection depends on subexample, we can conclude that indirection depends on sortedcontainers==2.4.0.
|
╰─▶ Because subexample depends on sortedcontainers==2.4.0 and indirection depends on subexample, we can conclude that indirection depends on sortedcontainers==2.4.0.
|
||||||
And because example depends on sortedcontainers==2.3.0, we can conclude that example and indirection are incompatible.
|
And because example depends on sortedcontainers==2.3.0, we can conclude that example and indirection are incompatible.
|
||||||
|
|
@ -3518,6 +3522,7 @@ fn lock_conflicting_workspace_members_depends_transitive_extra() -> Result<()> {
|
||||||
----- stdout -----
|
----- stdout -----
|
||||||
|
|
||||||
----- stderr -----
|
----- stderr -----
|
||||||
|
warning: Declaring conflicts for packages (`package = ...`) is experimental and may change without warning. Pass `--preview` to disable this warning.
|
||||||
Resolved 5 packages in [TIME]
|
Resolved 5 packages in [TIME]
|
||||||
");
|
");
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue