Update lock version diagnostics for v3

This commit is contained in:
Charlie Marsh
2026-06-03 16:25:30 -04:00
parent 7de7723e0f
commit 2b6d07bbf9
2 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -152,12 +152,12 @@ pub(crate) enum ProjectError {
LockWorkspaceMismatch(PackageName),
#[error(
"The lockfile at `uv.lock` uses an unsupported schema version (v{0}, but only v1 and v2 are supported). Downgrade to a compatible uv version, or remove the `uv.lock` prior to running `uv lock` or `uv sync`."
"The lockfile at `uv.lock` uses an unsupported schema version (v{0}, but only v1, v2, and v3 are supported). Downgrade to a compatible uv version, or remove the `uv.lock` prior to running `uv lock` or `uv sync`."
)]
UnsupportedLockVersion(u32),
#[error(
"Failed to parse `uv.lock`, which uses an unsupported schema version (v{0}, but only v1 and v2 are supported). Downgrade to a compatible uv version, or remove the `uv.lock` prior to running `uv lock` or `uv sync`."
"Failed to parse `uv.lock`, which uses an unsupported schema version (v{0}, but only v1, v2, and v3 are supported). Downgrade to a compatible uv version, or remove the `uv.lock` prior to running `uv lock` or `uv sync`."
)]
UnparsableLockVersion(u32, #[source] toml::de::Error),
+4 -4
View File
@@ -23382,7 +23382,7 @@ fn lock_unsupported_version() -> Result<()> {
// Validate schema, invalid version.
context.temp_dir.child("uv.lock").write_str(
r#"
version = 3
version = 4
requires-python = ">=3.12"
[options]
@@ -23416,13 +23416,13 @@ fn lock_unsupported_version() -> Result<()> {
----- stdout -----
----- stderr -----
error: The lockfile at `uv.lock` uses an unsupported schema version (v3, but only v1 and v2 are supported). Downgrade to a compatible uv version, or remove the `uv.lock` prior to running `uv lock` or `uv sync`.
error: The lockfile at `uv.lock` uses an unsupported schema version (v4, but only v1, v2, and v3 are supported). Downgrade to a compatible uv version, or remove the `uv.lock` prior to running `uv lock` or `uv sync`.
");
// Invalid schema (`iniconfig` is referenced, but missing), invalid version.
context.temp_dir.child("uv.lock").write_str(
r#"
version = 3
version = 4
requires-python = ">=3.12"
[options]
@@ -23447,7 +23447,7 @@ fn lock_unsupported_version() -> Result<()> {
----- stdout -----
----- stderr -----
error: Failed to parse `uv.lock`, which uses an unsupported schema version (v3, but only v1 and v2 are supported). Downgrade to a compatible uv version, or remove the `uv.lock` prior to running `uv lock` or `uv sync`.
error: Failed to parse `uv.lock`, which uses an unsupported schema version (v4, but only v1, v2, and v3 are supported). Downgrade to a compatible uv version, or remove the `uv.lock` prior to running `uv lock` or `uv sync`.
Caused by: Dependency `iniconfig` has missing `source` field but has more than one matching package
");