Skip to content
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

[question] Deploying files from skipped dependencies #17313

Open
1 task done
schaber-hxg opened this issue Nov 13, 2024 · 3 comments
Open
1 task done

[question] Deploying files from skipped dependencies #17313

schaber-hxg opened this issue Nov 13, 2024 · 3 comments

Comments

@schaber-hxg
Copy link

What is your question?

Hi!
I have a question regarding deploying files from the conan cache to another directory. We do that by parsing the json output of a conan install command. We know of the (custom) deployers feature, more on that later.
As i understand, the package_folder is set to None on purpose for skipped dependencies in the graph. You explained that in this issue: #14299 (comment).
I guess one reason to skip is when linking a static library A into another shared library B that is then used by an application. In this case no library files of A (e.g. .dll or .so) are required by the application. In our case this assumption (that no files of A need to be made available to the application) does not hold: the static library A provides resource files that may be used by the application (via lib A).
The libraries in question are Qt with webengine and libdrm. libdrm provides files via cpp_info.resdirs that we want to deploy to our application. We read the json output of a conan install command to get the paths to the library files and deploy them. For libdrm the package_folder is None and we cannot get the resource files. We are aware of the deployers feature of conan install and evaluate using it. However, even when using deployers the package_folder is still None I think.

We are still investigating if the resources files of libdrm are really required in our application. Regardless of the outcome it would be interesting what your thoughts are on this.
Are you aware of that use case? Is the qt package supposed to include the resource files of libdrm (and it's a bug in the qt recipe)? Is there another way to access the resource files if the package_folder is None?

Conan version 2.7.1, OS: Linux, compiler gcc

Thanks for your work on conan

Have you read the CONTRIBUTING guide?

  • I've read the CONTRIBUTING guide
@AbrilRBS
Copy link
Member

Hi! More can be said about the QT aspects of your question, but regarding your skip issue, if your use-case requires all binaries to be present, you might want to try using the tools.graph:skip_binaries=False conf (either your profile or CLI invokation), which will force Conan not to skip anything you might need for the deployers/your custom setup.

Let me know if this helps, and I'll let others chime in for the other questions :)

@schaber-hxg
Copy link
Author

Thanks for the quick answer! I gave the conf option a try and it does work for us, the packages are no longer skipped and their paths appear in the json output. An important detail is to set the conf only for the host profile. If it also applies to the build profile the conan install command includes the the build requirements, which is not desired for the package consumer.

@memsharded
Copy link
Member

An important detail is to set the conf only for the host profile. If it also applies to the build profile the conan install command includes the the build requirements, which is not desired for the package consumer.

yes, that is correct, very often only the host context is desired, this is one of the advantages of the dual profile, it gives finer control over this kind of thing.

Then maybe we can close this question as solved? Thanks for the feedback!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants