conan-io / conan-io/docs

Improve documentation around graph expansion for conflicts

Open
#4,192 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
125
Forks
382
Avg merge
22h 39m
Merged PRs (30d)
21

Description

> > 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](https://github.com/conan-io/conan/issues/18752#issuecomment-3188338766)_

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the requirements reference page linked in the issue and inspect where documentation about graph generation and dependency traits belongs. Document how tool_requires graph expansion behaves, including the relevant skip settings, and link the new explanation from the requirements page so users can discover it.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.