Duplicated requirement for version range
See original GitHub issueI 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:
- Created 6 years ago
- Comments:9 (9 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks for the hint. I’ll try to fix my packages accordingly.
Great! thanks for telling