From 95a8493f5a45b93b501c1b3dbe20ecbfea67046b Mon Sep 17 00:00:00 2001 From: Andrew Gallant Date: Tue, 20 Aug 2024 13:46:46 -0400 Subject: [PATCH] uv/tests: update error message This update changes the error message to one that is worse than the status quo, but it is still correct because `datasets >= 2.19` doesn't actually exist given our `EXCLUDE_NEWER` in tests at present. The underlying cause here seems to be in how PubGrub deals with reporting incompatibilities. Namely, when it has `foo < 1` and `foo >= 1`, it reports an incompatibility immediately before looking for versions. But when it has `foo < 1` and `foo >= 1 ; marker`, then because they aren't both pubgrub "packages," it starts requesting versions first and hits the "not available" error path instead of the "incompatible" error path. Since this is more of an underlying issue with how we setup `PubGrubPackage` and our interaction with pubgrub, we ended up deciding to move forward here with the regression since this PR is fixing a correctness issue. In particular, if one changes the `requires-python` to `>=3.8`, then both `main` and this PR produce similarly bad error messages. --- crates/uv/tests/lock.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/uv/tests/lock.rs b/crates/uv/tests/lock.rs index 31ef660bc..27e03e041 100644 --- a/crates/uv/tests/lock.rs +++ b/crates/uv/tests/lock.rs @@ -8662,7 +8662,7 @@ fn unconditional_overlapping_marker_disjoint_version_constraints() -> Result<()> ----- stderr ----- × No solution found when resolving dependencies: - ╰─▶ Because your project depends on datasets<2.19 and datasets>=2.19, we can conclude that your project's requirements are unsatisfiable. + ╰─▶ Because only datasets<2.19 is available and your project depends on datasets>=2.19, we can conclude that your project's requirements are unsatisfiable. "###); Ok(())