docs icon indicating copy to clipboard operation
docs copied to clipboard

[question] Documentation on conancenter fork: conan export for dependent packages necessary?

Open mattarroz opened this issue 10 months ago • 3 comments

The documentation on forking conancenter says "Create a script that first conan export all the packages in your list", where "list" is "a list of the packages and versions you need for your project". I wonder if this is entirely correct.

To my understanding, conan export of all possible dependencies of the packages in "your list" would be needed. Otherwise, the recipe for a dependency of a package and version from "your list" could be missing, couldn't it be? Therefore, build=missing wouldn't work, because the recipe of said dependency is not available.

E.g. libtool is needed to build libest, however my list would typically only include libest.

If this actually an error in the documentation, what workflow do you suggest instead? Find out and add dependencies (possibly specific to settings, e.g. the OS) to the list as well? It could get more complex when dependencies are version specific.

Or first export all conancenter recipes to the local cache? Which takes some time.

mattarroz avatar Apr 17 '25 09:04 mattarroz

Hi @mattarroz

Thanks for your question.

Create a script that first conan export all the packages in your list", where "list" is "a list of the packages and versions you need for your project"

The packages that your project needs are all packages, including both your direct dependencies, but also the transitive dependencies. All are needed by the project.

No need to export all ConanCenter, there are some alternatives, for example using the "local-recipes-index" (see https://docs.conan.io/2/devops/devops_local_recipes_index.html) that way it will automatically export all the needed dependencies, also the transitives ones.

memsharded avatar Apr 17 '25 20:04 memsharded

Hi @memsharded ,

that's exactly what I need, thanks for pointing this out! It removes the need to manually determine all transitive dependencies, which is error-prone and needs maintenance. How about adding a link to the section explaining the directory-based remote here?

mattarroz avatar Apr 20 '25 07:04 mattarroz

Sure, that would make sense, I'll put this in the milestone 2, to be added to the docs when possible, thanks for the feedback!

memsharded avatar Apr 20 '25 19:04 memsharded