pkgx icon indicating copy to clipboard operation
pkgx copied to clipboard

Improve error message for version intersection conflicts

Open chudnyi opened this issue 2 months ago • 1 comments

This PR enhances the error message when version intersection is not possible, making it easier to identify which packages are causing conflicts.

Before:

$ pkgx +nodejs.org@24 [email protected] openssl version
Error: no intersection possible

The error message was not informative, making it difficult to identify which packages were causing the conflict.

After:

$ pkgx +nodejs.org@24 [email protected] openssl version
Error: "no intersection possible for openssl.org: @3.6.0 and ^1.1"

The improved error message now includes:

  • The package name causing the conflict
  • The specific version constraints that couldn't be resolved

This allows users to much more quickly identify the root cause of the problem and fix it.

pkgx version: 2.7.0

chudnyi avatar Nov 15 '25 09:11 chudnyi

Another example

Before

$ pkgx "+nodejs.org>=22.21.0" node -v
Error: invalid range description

After

$ pkgx "+nodejs.org>=22.21.0" node -v
Error: "invalid range description for nodejs.org: >=22.21 and *"

chudnyi avatar Nov 17 '25 07:11 chudnyi