Skip to content

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

Closed

Description

@asgrim

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.

Activity

  1. asgrim commented on Sep 16, 2024

    @asgrim
    ContributorAuthor

    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... 😅

  2. self-assigned this
    on Sep 24, 2024
  3. added this to the 0.1.0 milestone on Dec 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions