pkgx
pkgx copied to clipboard
Improve error message for version intersection conflicts
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
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 *"