question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Duplicated requirement for version range

See original GitHub issue

I created a few recipes that used version ranges for dependencies using semantic versioning. In the following example libcurl depends to libssh2/[~=1.8]@theirix/stable and libssh2 depends to zlib/[~=1.2]@lasote/stable. Also I have fixed zlib at 1.2.11 in the project conanfile. The package OpenSSL/1.0.2k@lasote/stable depends strictly on zlib/1.2.11@lasote/stable. See a gist for a complete dependency list.

I am expecting that the dependency graph resolves strictly to zlib/1.2.11 but it is failing with: Duplicated requirement zlib/1.2.11@lasote/stable != zlib/[~=1.2]@lasote/stable

Should it really fail or is it a bug?

Test conanfile. All other recipes are from conan.io.

Full output:

libcurl/7.52.1@theirix/stable requirement zlib/[~=1.2]@lasote/stable overriden by your conanfile to zlib/1.2.11@lasote/stable
libcurl/7.52.1@theirix/stable requirement libssh2/[~=1.8]@theirix/testing overriden by your conanfile to libssh2/1.8.0@theirix/stable
Version range '~=1.2' required by 'libcurl/7.52.1@theirix/stable' valid for downstream requirement 'zlib/1.2.11@lasote/stable'
Version range '~=1.8' required by 'libcurl/7.52.1@theirix/stable' valid for downstream requirement 'libssh2/1.8.0@theirix/stable'
libssh2/1.8.0@theirix/stable requirement zlib/[~=1.2]@lasote/stable overriden by libcurl/7.52.1@theirix/stable to zlib/1.2.11@lasote/stable
libssh2/1.8.0@theirix/stable requirement OpenSSL/[>1.0.2a,<1.0.3]@lasote/stable overriden by libcurl/7.52.1@theirix/stable to OpenSSL/1.0.2k@lasote/stable
Version range '~=1.2' required by 'libssh2/1.8.0@theirix/stable' valid for downstream requirement 'zlib/1.2.11@lasote/stable'
Version range '>1.0.2a,<1.0.3' required by 'libssh2/1.8.0@theirix/stable' valid for downstream requirement 'OpenSSL/1.0.2k@lasote/stable'
ERROR: libssh2/1.8.0@theirix/stable: Duplicated requirement zlib/1.2.11@lasote/stable != zlib/[~=1.2]@lasote/stable

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
theirixcommented, Apr 10, 2017

Thanks for the hint. I’ll try to fix my packages accordingly.

0reactions
memshardedcommented, Apr 11, 2017

Great! thanks for telling

Read more comments on GitHub >

github_iconTop Results From Across the Web

How will NPM/WebPack manage duplicate dependencies ...
It really depends on how strict you get with the versions required and if they conflict. If they conflict, you definitely will end...
Read more >
Package Management: Stop Using Version Ranges - Lucidchart
Don't use version ranges​​ Even if version ranges are allowed, you don't need to use them. Naturally, this only works if your transitive ......
Read more >
Duplication and Deduping · GitBook
If a secondary dependency is required by 2+ modules, but was not installed as a top-level dependency in the directory hierarchy, it will...
Read more >
Version ranges — conan 1.56.0 documentation
Instead, version ranges are evaluated when dependencies are first retrieved. This means, that if a package A depends on another package B (A->B),...
Read more >
yarn-berry-deduplicate | Yarn - Package Manager
A duplicate package is when two dependencies are resolved to a different version, even when a single version matches the range specified in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found