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 --profile:build makes private dependencies disappear from CONAN_PKG:: targets #9390
Comments
Not only |
This was recently fixed in new CMakeDeps and MSBuildDeps generators in #9517 |
Related to open ticket #8780 |
Still reproducible with Conan 1.40.3. It's even more annoying now with new |
@Paultergeist is it reproducible with the CMakeDeps and MSBuildDeps? It was fixed in #9517, and we added tests there to validate it. The legacy generators like |
@memsharded No, I was trying with I never used |
I like CMakeDeps. With conan 1.41.0, I did notice if I set a requirement to be private=True that my imports() copy fail to occur for that dependency. |
I also don't get any package configs generated for build_requirements() dependencies when I use: conan install .. --build missing --profile:build default --profile:host default build I do when I use: conan install .. --build missing Which both logically should be equivalent. |
Using CMakeDeps in generate() and adding explicit entries to build_context_activated does provide the package configs for build_requirements. private=True is still broken on package imports, and using private=False ends up generating too many package configs for my shared library built from statics. Is there a way in package_info() to explicitly control which dependencies I want to expose? |
I just encountered the same issue, and I'm a bit unsure how to handle that. Basically, all my private dependencies (and their dependencies) that worked fine with the
for actual requirements. I'm not sure what should be done, as my recipe use the standard |
@memsharded Looks like it's not just self.output.info(f"{self.deps_cpp_info['gtest'].rootpath}") It builds fine with
But if I build with
PS:
|
Reproducible in 1.48.0. |
Yes, When using the 2 profiles, |
@memsharded I don't see the package in
Conan 1.59.0 EDIT: Interesting, |
I don't think this is because being private, but in Conan 1.X In an case the |
Environment Details (include every applicable attribute)
Steps to reproduce (Include if Applicable)
Sample project available here
In short:
Add private requirement to the recipe
Build without
--profile:build
- builds fine.Build with
--profile:build
- CMake can't find correspondingCONAN_PKG::target
.Make requirement public - builds fine.
Logs (Executed commands with output) (Include/Attach if Applicable)
The text was updated successfully, but these errors were encountered: