docs icon indicating copy to clipboard operation
docs copied to clipboard

Better documentation for transitive header and transitive libs (traits)

Open uilianries opened this issue 2 years ago • 1 comments

When looking for transitive_headers and transitive_libs parameter for requirements, I can find:

  • https://docs.conan.io/2/reference/conanfile/methods/requirements.html#transitive-headers
  • https://docs.conan.io/2/reference/conanfile/methods/requirements.html#transitive-libs

Still, the documentation only specifies the WHAT, not the WHY, or recommended cases.

Right now, the requirements traits design is more informative, and could be used as inspiration.

It would be great if we have a better explanation, like:

  • Transitive headers are useful when a public header of a project has included a downstream header, resulting that the consumer will need to have access to both upstream and downstream headers

uilianries avatar Nov 07 '23 14:11 uilianries

Yes, please. I wish the docs also mentioned how the default values for these two are determined - that they are mostly affected by the package_type attribute (and also maybe how) and the libs and headers parameters. The fact that transitive_libs is not needed for header-library but is for others can be a bit surprising at first.

valgur avatar Nov 07 '23 16:11 valgur