Skip to content

Improve messaging when we can't find a package matching the constraint #15

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
asgrim opened this issue Jun 3, 2024 · 1 comment · Fixed by #53
Closed

Improve messaging when we can't find a package matching the constraint #15

asgrim opened this issue Jun 3, 2024 · 1 comment · Fixed by #53
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@asgrim
Copy link
Collaborator

asgrim commented Jun 3, 2024

When I run bin/pie download xdebug/xdebug:3.4.0alpha1, I see:

Unable to find an installable package xdebug/xdebug for version 3.4.0alpha1  

It does not tell me why it can't find it, as there is certainly a release on packagist.

When you run bin/pie download xdebug/xdebug:3.4.0alpha1@alpha this works.

In this case, it is because the default stability flag is stable. This may be because we're missing something in version resolution in Composer, but either way, this could be improved with better messaging.

@asgrim asgrim added the enhancement New feature or request label Jun 3, 2024
@asgrim
Copy link
Collaborator Author

asgrim commented Sep 16, 2024

This also applies when the downstream dependency depends on an extension that is missing. For example, I built PHP 7.4 using --disable-json and tried to install mongodb/mongodb-extension:

$ bin/pie download --with-php-config=/home/james/workspace/oss/php-src-build/bin/php-config mongodb/mongodb-extension:v1.x-dev@dev
You are running PHP 8.3.10
Target PHP installation: 7.4.33 ts, on Linux/OSX/etc x86_64 (from /home/james/workspace/oss/php-src-build/bin/php)

In UnableToResolveRequirement.php line 16:
                                                                                             
  Unable to find an installable package mongodb/mongodb-extension for version v1.x-dev@dev.  
                                                                                             

download [--with-php-config [WITH-PHP-CONFIG]] [--with-php-path [WITH-PHP-PATH]] [--] <requested-package-and-version>

Whilst it is correct, it is not particularly helpful in telling the user that the only thing preventing installation is that ext-json is missing... 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant