Skip to content

Improve documentation around graph expansion for conflicts #4192

@AbrilRBS

Description

@AbrilRBS

This perhaps should be better documented. I was under the impression visible=False does not propagate the dependency.

it does not propagate visibility or linkage requirements, and it can help to compute a Binary=Skip and avoid the download of the binary. But the dependency graph of recipes (not binaries) is always fully computed by default. There are special confs like skip_build:

$ conan config list skip
...
tools.graph:skip_build: (Experimental) Do not expand build/tool_requires
tools.graph:skip_test: (Experimental) Do not expand test_requires. If building it might need 'tools.build:skip_test=True'

That fully avoid that expansion of tool-requires dependency graph, but that is not the default expansion because of the above reasons.

I came up with a solution using vendor=True my clang recipe required parts of the gcc-toolchain. This was provided by a recipe to retrieve that toolchain but because this dependency was required at runtime originally vendor=True would not work as I have a required transitive dependency. But I've figured out that I should vendor the toolchain package by copying it into my clang package_folder. That way the clang package is self-contained and the vendor=True option works as intended.

Ok, great to know, happy that this helped.

Thanks once again. I think maybe the right takeaway here is the way the graph expands with tool_requires today is a little unintuitive and better documentation would certainly help.

Yes, maybe that could help, the challenge is knowing where to put it. When tool-requires are introduced in the tutorial, it is too early, and this is a too advanced topic for the learning flow, so it can be more confusing to readers than helpful. Putting it in a separate "reference" section makes it quite invisible, so users will likely hit the behavior without having read that part of the docs.

While I definitely empathize with documentation discoverability. I believe we have to start somewhere and perhaps no better place than maybe a page detailing how graph generation works with different traits. Probably linked at the end of https://docs.conan.io/2/reference/conanfile/methods/requirements.html#reference-conanfile-methods-requirements perhaps.

Originally posted by @res0nance in #18752

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions