-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[bug] using 'replace_requires' leads MSBuildDeps generator to include non-existent property sheet #17966
Comments
Hi @chr-thien Thanks for your report. I am trying to reproduce, and did some extra checks in the test suite in #17967. So far it seems to be working fine, the It would be great to have a minimal reproducible case, ideally self-contained, it can be done with quick |
I tried to create minimum working example with zlib-ng and libpng. Everything works as expected. Then I had a look at the recipe of 'wt' from conan-center-index and found this:
Here it sets a requirement to 'sqlite3::sqlite3' directly. This could be the problem. It seems that 'replace_requires' is not taken into account here. |
Thanks for the details. |
If you know how to do it, it would be useful if you could test your project running from source from my branch in #17967, that would be good feedback too. |
I tested using your branch 'test/replace_requires_msbuilddeps'. The problem is gone. |
Excellent, thanks for the feedback! |
Describe the bug
I'm using component 'wt' with recipe from conan-center-index.
'wt' requires 'sqlite3'.
I'm building a component named 'sqlite3see' which is a drop-in replacement for 'sqlite3'.
For 'sqlite3see' I'm using the recipe from conan-center-index and changed only source code URL.
My profile for building 'wt' contains 'replace_requires'
[replace_requires]
sqlite3/*: sqlite3see/[>3]
This part works fine.
Now I'm consuming 'wt' in my own component using MSBuild.
I use same profile with 'replace_requires'.
I use MSBuildDeps generator to get property sheets which I import into my project.
The bug is:
Generator created a property sheet named
conan_sqlite3see.props
.Generator created a property sheet named
conan_wt.props
.The property sheet for 'wt' wants to import a property sheet of
conan_sqlite3.props
.But 'sqlite3' was redirected to 'sqlite3see'.
So there is no property sheet
conan_sqlite3.props
This but was introduced in 2.12.
This bug is related to #17557
Revisions of Conan prior to 2.12 generated different property sheets.
Property sheets for 'wt' did not include the property sheets of requirements.
How to reproduce it
Maybe could be reproduced with other 'replace_requires' as well (e.g. 'zlib'->'zlig-ng').
The text was updated successfully, but these errors were encountered: