Open Nekto89 opened 1 month ago
I just noticed that conan doesn't output replace_requires in log. It is present in my host profile
[replace_requires]
zlib/* : zlib-ng/2.1.6
Hi @Nekto89 thanks a lot for taking the time to report the issue.
While it's true that this is one great side-effect of the feature, this aspect is not fully realized yet, so some shortcomings are still expected. We are planning on thinking more about this issue to provide solutions for this usage (And it's one of the reasons for which we've stop accepting PRs in CCI that add a with_zlibng
option to recipes, the idea is to let users choose via the replace mechanism)
I'll let you know once we have some solid ground to work on, but for now I'll check if there's something to be done in the recipe to support this use-case without too many modifications :)
I just noticed that conan doesn't output replace_requires in log. It is present in my host profile
[replace_requires] zlib/* : zlib-ng/2.1.6
I'm proposing https://github.com/conan-io/conan/pull/16401 for Conan 2.4 next release to fix this issue, thanks for the heads-up :)
I'm also trying to use replace_requires
to substitute zlib-ng for zlib. The main issue I'm facing is that many recipes like openssl use self.dependencies["zlib"]
which then fails with KeyError: "'zlib' not found in the dependency set"
Perhaps a bit naïve, but wouldn't it make sense to alias the dependencies with their original name in the dependencies dict?
I am investigating in https://github.com/conan-io/conan/pull/16443 if it is possible to allow this, or replace_requires
requires full referential transparency. Even with this investigation can improve things a bit on the Conan side, there might be other aspects like CMakeLists.txt
with a find_package(ZLIB)
will hardly work unless the replacement zlib-ng
is configured to create the same ZLIB-Config.cmake
filename and possible target names.
@RubenRBS has also been investigating the part of the cpp_info.requires
, we are doing progress, but still need more research.
What is your question?
Hi, I have a question regarding replace_requires.
Previously I was changing recipes to be able to use zlib-ng instead of zlib. [replace_requires] should be able to allow me to do this without change of recipes if I understood correctly. But I can't make it work. Is this a problem of recipe that uses zlib, recipe of zlib-ng or conan? Or maybe I'm doing something completely wrong?
Have you read the CONTRIBUTING guide?