diff --git a/crates/puffin-cli/tests/pip_compile.rs b/crates/puffin-cli/tests/pip_compile.rs index 90143dd0c..436c192fa 100644 --- a/crates/puffin-cli/tests/pip_compile.rs +++ b/crates/puffin-cli/tests/pip_compile.rs @@ -2227,8 +2227,8 @@ fn compile_yanked_version_indirect() -> Result<()> { ----- stderr ----- × No solution found when resolving dependencies: - ╰─▶ Because there are no versions of attrs>20.3.0, <21.2.0 and root depends - on attrs>20.3.0, <21.2.0, version solving failed. + ╰─▶ Because there are no versions of attrs>20.3.0,<21.2.0 and root depends + on attrs>20.3.0,<21.2.0, version solving failed. "###); }); diff --git a/crates/puffin-cli/tests/pip_install_scenarios.rs b/crates/puffin-cli/tests/pip_install_scenarios.rs index b5ddae2ef..6d27b8be3 100644 --- a/crates/puffin-cli/tests/pip_install_scenarios.rs +++ b/crates/puffin-cli/tests/pip_install_scenarios.rs @@ -82,7 +82,7 @@ fn excluded_only_version() -> Result<()> { ----- stderr ----- × No solution found when resolving dependencies: - ╰─▶ Because there are no versions of a<1.0.0 | >1.0.0 and root depends on a<1.0.0 | >1.0.0, version solving failed. + ╰─▶ Because there are no versions of a<1.0.0|>1.0.0 and root depends on a<1.0.0|>1.0.0, version solving failed. "###); }); @@ -150,9 +150,9 @@ fn excluded_only_compatible_version() -> Result<()> { ----- stderr ----- × No solution found when resolving dependencies: - ╰─▶ Because there are no versions of a<1.0.0 | >1.0.0, <2.0.0 | >2.0.0, <3.0.0 | >3.0.0 and a==1.0.0 depends on b==1.0.0, a<2.0.0 depends on b==1.0.0. - And because a==3.0.0 depends on b==3.0.0, a<2.0.0 | >2.0.0 depends on b<=1.0.0 | >=3.0.0. - And because root depends on b>=2.0.0, <3.0.0 and root depends on a<2.0.0 | >2.0.0, version solving failed. + ╰─▶ Because there are no versions of a<1.0.0|>1.0.0,<2.0.0|>2.0.0,<3.0.0|>3.0.0 and a==1.0.0 depends on b==1.0.0, a<2.0.0 depends on b==1.0.0. + And because a==3.0.0 depends on b==3.0.0, a<2.0.0|>2.0.0 depends on b<=1.0.0|>=3.0.0. + And because root depends on b>=2.0.0,<3.0.0 and root depends on a<2.0.0|>2.0.0, version solving failed. "###); }); @@ -258,13 +258,13 @@ fn dependency_excludes_range_of_compatible_versions() -> Result<()> { ----- stderr ----- × No solution found when resolving dependencies: - ╰─▶ Because there are no versions of a<1.0.0 | >1.0.0, <2.0.0 | >3.0.0 and a==1.0.0 depends on b==1.0.0, a<2.0.0 depends on b==1.0.0. (1) + ╰─▶ Because there are no versions of a<1.0.0|>1.0.0,<2.0.0|>3.0.0 and a==1.0.0 depends on b==1.0.0, a<2.0.0 depends on b==1.0.0. (1) - Because there are no versions of c<1.0.0 | >1.0.0, <2.0.0 | >2.0.0 and c==1.0.0 depends on a<2.0.0, c<2.0.0 depends on a<2.0.0. - And because c==2.0.0 depends on a>=3.0.0, c depends on a<2.0.0 | >=3.0.0. + Because there are no versions of c<1.0.0|>1.0.0,<2.0.0|>2.0.0 and c==1.0.0 depends on a<2.0.0, c<2.0.0 depends on a<2.0.0. + And because c==2.0.0 depends on a>=3.0.0, c depends on a<2.0.0|>=3.0.0. And because a<2.0.0 depends on b==1.0.0 (1), a!=3.0.0, c*, b!=1.0.0 are incompatible. - And because a==3.0.0 depends on b==3.0.0, c depends on b<=1.0.0 | >=3.0.0. - And because root depends on c and root depends on b>=2.0.0, <3.0.0, version solving failed. + And because a==3.0.0 depends on b==3.0.0, c depends on b<=1.0.0|>=3.0.0. + And because root depends on c and root depends on b>=2.0.0,<3.0.0, version solving failed. "###); }); @@ -386,13 +386,13 @@ fn dependency_excludes_non_contiguous_range_of_compatible_versions() -> Result<( ----- stderr ----- × No solution found when resolving dependencies: - ╰─▶ Because a==1.0.0 depends on b==1.0.0 and there are no versions of a<1.0.0 | >1.0.0, <2.0.0 | >3.0.0, a<2.0.0 depends on b==1.0.0. - And because a==3.0.0 depends on b==3.0.0, a<2.0.0 | >=3.0.0 depends on b<=1.0.0 | >=3.0.0. (1) + ╰─▶ Because a==1.0.0 depends on b==1.0.0 and there are no versions of a<1.0.0|>1.0.0,<2.0.0|>3.0.0, a<2.0.0 depends on b==1.0.0. + And because a==3.0.0 depends on b==3.0.0, a<2.0.0|>=3.0.0 depends on b<=1.0.0|>=3.0.0. (1) - Because there are no versions of c<1.0.0 | >1.0.0, <2.0.0 | >2.0.0 and c==1.0.0 depends on a<2.0.0, c<2.0.0 depends on a<2.0.0. - And because c==2.0.0 depends on a>=3.0.0, c depends on a<2.0.0 | >=3.0.0. - And because a<2.0.0 | >=3.0.0 depends on b<=1.0.0 | >=3.0.0 (1), c depends on b<=1.0.0 | >=3.0.0. - And because root depends on b>=2.0.0, <3.0.0 and root depends on c, version solving failed. + Because there are no versions of c<1.0.0|>1.0.0,<2.0.0|>2.0.0 and c==1.0.0 depends on a<2.0.0, c<2.0.0 depends on a<2.0.0. + And because c==2.0.0 depends on a>=3.0.0, c depends on a<2.0.0|>=3.0.0. + And because a<2.0.0|>=3.0.0 depends on b<=1.0.0|>=3.0.0 (1), c depends on b<=1.0.0|>=3.0.0. + And because root depends on b>=2.0.0,<3.0.0 and root depends on c, version solving failed. "###); }); @@ -1117,7 +1117,7 @@ fn requires_transitive_package_only_prereleases_in_range() -> Result<()> { ----- stderr ----- × No solution found when resolving dependencies: ╰─▶ Because there are no versions of b>0.1 and a==0.1.0 depends on b>0.1, a==0.1.0 is forbidden. - And because there are no versions of a<0.1.0 | >0.1.0 and root depends on a, version solving failed. + And because there are no versions of a<0.1.0|>0.1.0 and root depends on a, version solving failed. hint: Pre-releases are available for b in the requested range (e.g., 1.0.0a1), but pre-releases weren't enabled (try: `--prerelease=allow`) "###); @@ -1272,7 +1272,7 @@ fn requires_transitive_prerelease_and_stable_dependency() -> Result<()> { ----- stderr ----- × No solution found when resolving dependencies: ╰─▶ Because there is no version of c==2.0.0b1 and a==1.0.0 depends on c==2.0.0b1, a==1.0.0 is forbidden. - And because there are no versions of a<1.0.0 | >1.0.0 and root depends on a, version solving failed. + And because there are no versions of a<1.0.0|>1.0.0 and root depends on a, version solving failed. hint: c was requested with a pre-release marker (e.g., ==2.0.0b1), but pre-releases weren't enabled (try: `--prerelease=allow`) "###); @@ -1468,9 +1468,9 @@ fn requires_transitive_prerelease_and_stable_dependency_many_versions() -> Resul ----- stderr ----- × No solution found when resolving dependencies: - ╰─▶ Because there are no versions of b<1.0.0 | >1.0.0 and b==1.0.0 depends on c, b depends on c. + ╰─▶ Because there are no versions of b<1.0.0|>1.0.0 and b==1.0.0 depends on c, b depends on c. And because there are no versions of c>=2.0.0b1, b depends on c<2.0.0b1. - And because a==1.0.0 depends on c>=2.0.0b1 and there are no versions of a<1.0.0 | >1.0.0, b*, a* are incompatible. + And because a==1.0.0 depends on c>=2.0.0b1 and there are no versions of a<1.0.0|>1.0.0, b*, a* are incompatible. And because root depends on b and root depends on a, version solving failed. hint: c was requested with a pre-release marker (e.g., >=2.0.0b1), but pre-releases weren't enabled (try: `--prerelease=allow`) @@ -1567,10 +1567,10 @@ fn requires_transitive_prerelease_and_stable_dependency_many_versions_holes() -> ----- stderr ----- × No solution found when resolving dependencies: - ╰─▶ Because there are no versions of c>1.0.0, <2.0.0a5 | >2.0.0a7, <2.0.0b1 | >2.0.0b1, <2.0.0b5 and a==1.0.0 depends on c>1.0.0, <2.0.0a5 | >2.0.0a7, <2.0.0b1 | >2.0.0b1, <2.0.0b5, a==1.0.0 is forbidden. - And because there are no versions of a<1.0.0 | >1.0.0 and root depends on a, version solving failed. + ╰─▶ Because there are no versions of c>1.0.0,<2.0.0a5|>2.0.0a7,<2.0.0b1|>2.0.0b1,<2.0.0b5 and a==1.0.0 depends on c>1.0.0,<2.0.0a5|>2.0.0a7,<2.0.0b1|>2.0.0b1,<2.0.0b5, a==1.0.0 is forbidden. + And because there are no versions of a<1.0.0|>1.0.0 and root depends on a, version solving failed. - hint: c was requested with a pre-release marker (e.g., >1.0.0, <2.0.0a5 | >2.0.0a7, <2.0.0b1 | >2.0.0b1, <2.0.0b5), but pre-releases weren't enabled (try: `--prerelease=allow`) + hint: c was requested with a pre-release marker (e.g., >1.0.0,<2.0.0a5|>2.0.0a7,<2.0.0b1|>2.0.0b1,<2.0.0b5), but pre-releases weren't enabled (try: `--prerelease=allow`) "###); }); @@ -1978,7 +1978,7 @@ fn requires_transitive_incompatible_with_root_version() -> Result<()> { ----- stderr ----- × No solution found when resolving dependencies: - ╰─▶ Because there are no versions of a<1.0.0 | >1.0.0 and a==1.0.0 depends on b==2.0.0, a depends on b==2.0.0. + ╰─▶ Because there are no versions of a<1.0.0|>1.0.0 and a==1.0.0 depends on b==2.0.0, a depends on b==2.0.0. And because root depends on a and root depends on b==1.0.0, version solving failed. "###); }); @@ -2054,8 +2054,8 @@ fn requires_transitive_incompatible_with_transitive() -> Result<()> { ----- stderr ----- × No solution found when resolving dependencies: - ╰─▶ Because there are no versions of b<1.0.0 | >1.0.0 and b==1.0.0 depends on c==2.0.0, b depends on c==2.0.0. - And because a==1.0.0 depends on c==1.0.0 and there are no versions of a<1.0.0 | >1.0.0, a*, b* are incompatible. + ╰─▶ Because there are no versions of b<1.0.0|>1.0.0 and b==1.0.0 depends on c==2.0.0, b depends on c==2.0.0. + And because a==1.0.0 depends on c==1.0.0 and there are no versions of a<1.0.0|>1.0.0, a*, b* are incompatible. And because root depends on b and root depends on a, version solving failed. "###); }); @@ -2451,16 +2451,16 @@ fn requires_python_version_greater_than_current_excluded() -> Result<()> { ----- stderr ----- × No solution found when resolving dependencies: - ╰─▶ Because there are no versions of Python>=3.10, <3.11 and there are no versions of Python>=3.12, Python>=3.10, <3.11 | >=3.12 are incompatible. - And because there are no versions of Python>=3.11, <3.12, Python>=3.10 are incompatible. - And because a==2.0.0 depends on Python>=3.10 and there are no versions of a>2.0.0, <3.0.0 | >3.0.0, <4.0.0 | >4.0.0, a>=2.0.0, <3.0.0 is forbidden. (1) + ╰─▶ Because there are no versions of Python>=3.10,<3.11 and there are no versions of Python>=3.12, Python>=3.10, <3.11 | >=3.12 are incompatible. + And because there are no versions of Python>=3.11,<3.12, Python>=3.10 are incompatible. + And because a==2.0.0 depends on Python>=3.10 and there are no versions of a>2.0.0,<3.0.0|>3.0.0,<4.0.0|>4.0.0, a>=2.0.0,<3.0.0 is forbidden. (1) - Because there are no versions of Python>=3.11, <3.12 and there are no versions of Python>=3.12, Python>=3.11 are incompatible. + Because there are no versions of Python>=3.11,<3.12 and there are no versions of Python>=3.12, Python>=3.11 are incompatible. And because a==3.0.0 depends on Python>=3.11, a==3.0.0 is forbidden. - And because a>=2.0.0, <3.0.0 is forbidden (1), a>=2.0.0, <4.0.0 is forbidden. (2) + And because a>=2.0.0,<3.0.0 is forbidden (1), a>=2.0.0,<4.0.0 is forbidden. (2) Because there are no versions of Python>=3.12 and a==4.0.0 depends on Python>=3.12, a==4.0.0 is forbidden. - And because a>=2.0.0, <4.0.0 is forbidden (2), a>=2.0.0 is forbidden. + And because a>=2.0.0,<4.0.0 is forbidden (2), a>=2.0.0 is forbidden. And because root depends on a>=2.0.0, version solving failed. "###); }); diff --git a/crates/puffin-resolver/src/pubgrub/report.rs b/crates/puffin-resolver/src/pubgrub/report.rs index 30fd1c9f9..a9ba45063 100644 --- a/crates/puffin-resolver/src/pubgrub/report.rs +++ b/crates/puffin-resolver/src/pubgrub/report.rs @@ -338,7 +338,7 @@ impl std::fmt::Display for PubGrubRange<'_> { } else { for (idx, segment) in self.inner.iter().enumerate() { if idx > 0 { - write!(f, " | ")?; + write!(f, "|")?; } match segment { (Bound::Unbounded, Bound::Unbounded) => write!(f, "*")?, @@ -349,13 +349,13 @@ impl std::fmt::Display for PubGrubRange<'_> { if v == b { write!(f, "=={v}")?; } else { - write!(f, ">={v}, <={b}")?; + write!(f, ">={v},<={b}")?; } } - (Bound::Included(v), Bound::Excluded(b)) => write!(f, ">={v}, <{b}")?, + (Bound::Included(v), Bound::Excluded(b)) => write!(f, ">={v},<{b}")?, (Bound::Excluded(v), Bound::Unbounded) => write!(f, ">{v}")?, - (Bound::Excluded(v), Bound::Included(b)) => write!(f, ">{v}, <={b}")?, - (Bound::Excluded(v), Bound::Excluded(b)) => write!(f, ">{v}, <{b}")?, + (Bound::Excluded(v), Bound::Included(b)) => write!(f, ">{v},<={b}")?, + (Bound::Excluded(v), Bound::Excluded(b)) => write!(f, ">{v},<{b}")?, }; } }