Skip to content
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

Satisfiable logic broken? #122

Closed
alexandernst opened this issue Jun 2, 2015 · 7 comments
Closed

Satisfiable logic broken? #122

alexandernst opened this issue Jun 2, 2015 · 7 comments
Labels
Milestone

Comments

@alexandernst
Copy link
Contributor

I have a composer.json file with the following content:

"require": {
    "npm-asset/npmconf": "2.1.2"
}

I also have a package.json with the equivalent content.

When I run npm install this is the output that I get:

npmconf@2.1.2 node_modules/npmconf
├── uid-number@0.0.5
├── inherits@2.0.1
├── osenv@0.1.1
├── ini@1.3.3
├── semver@4.3.6
├── config-chain@1.1.9 (proto-list@1.2.4)
├── once@1.3.2 (wrappy@1.0.1)
├── nopt@3.0.2 (abbrev@1.0.7)
└── mkdirp@0.5.1 (minimist@0.0.8)

But when I run composer install I see this:

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for npm-asset/npmconf 2.1.2 -> satisfiable by npm-asset/npmconf[2.1.2].
    - npm-asset/npmconf 2.1.2 requires npm-asset/config-chain ~1.1.8 -> satisfiable by npm-    asset/config-chain[1.1.8, 1.1.9].
    - npm-asset/config-chain 1.1.8 requires npm-asset/ini 1 -> satisfiable by npm-asset/ini[1.0.0].
    - npm-asset/config-chain 1.1.9 requires npm-asset/ini 1 -> satisfiable by npm-asset/ini[1.0.0].
    - Conclusion: don't install npm-asset/ini 1.0.0

Composer realizes that it can install ini v1.0.0 (instead of 1), but it doesn't do it. Why is that?

NOTE: This is the output after applying my last patch.

@alexandernst
Copy link
Contributor Author

Also, I'm not really sure why NPM is installing ini 1.3.3, while Composer is targeting for ini 1.0.0. Any ideas @francoispluchino ?

@alexandernst
Copy link
Contributor Author

Ok, I get it. config-chain requires "ini": "1". NPM treats that as any version starting with 1 as you can see here.

So this is another bug. The plugin should tell Composer that 1 is satisfiable by any version starting with 1.

Let me see if I can get it working.

@alexandernst
Copy link
Contributor Author

Got to the bottom of the issue. PR #123 is fixing this

@francoispluchino
Copy link
Member

There is seems that a conversion problem is present for the version 1, because Composer and NPM not interpret this value in the same way.

@alexandernst
Copy link
Contributor Author

@francoispluchino Yes, indeed. That's why I made #123 which fixes that issue. Please review and merge if you don't have any objections for the fix :)

@francoispluchino
Copy link
Member

Ok, I see your PR tomorrow.

@francoispluchino francoispluchino added this to the 1.0.2 milestone Jun 3, 2015
@francoispluchino
Copy link
Member

Can be closed by #123.

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

No branches or pull requests

2 participants