Skip to content

Conversation

@chudnyi
Copy link
Contributor

@chudnyi chudnyi commented Nov 15, 2025

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 +openssl.org@3.6.0 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 +openssl.org@3.6.0 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
Copy link
Contributor Author

chudnyi commented Nov 17, 2025

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 *"

@jhheider jhheider force-pushed the feature/improve-intersection-error-message branch from 72fc47c to 5ecdd72 Compare February 3, 2026 00:33
@jhheider
Copy link
Contributor

jhheider commented Feb 3, 2026

this is a good fix, chudnyi. thank you!

@jhheider
Copy link
Contributor

jhheider commented Feb 3, 2026

i moved the error cleanup a little higher up, so we don't have to push a &str through so many functions just to mutate an error message.

@jhheider jhheider merged commit 4e86ff3 into pkgxdev:main Feb 3, 2026
13 checks passed
@coveralls
Copy link

Coverage Status

coverage: 90.345% (-0.05%) from 90.397%
when pulling fc9d3da on chudnyi:feature/improve-intersection-error-message
into 6b45c9e on pkgxdev:main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants