conan-io / conan-io/docs

better documentation for auto_use

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

Description

> That means that either you declare the `VirtualBuildEnv` generator in your recipe explicitly, or you do it implicitly with the `auto_use` configuration. What is exactly not clear about that note? Do you want to explicitly add your line with `generators = ...` there?

it's not fully clear what happens with `buildenv` if none of the conditions mentioned satisfied, is it just silently ignored?
anyway, it would be better if `auto_use` had its own section describing effects of True/False values, it's pretty hard to deduce it now from these pieces without looking at code. like the following:

auto_use = True:
- `[buildenv]` profile section parsing is activated
- both `VirtualBuildEnv` and `VirtualRunEnv` appended to the `generators` attribute of the conan file (e.g. `generators = "cmake"` actually means `generators = "cmake", "VirtualRunEnv", "VirtualRunEnv"`)

auto_use = False:
- `[buildenv]` profile section is silently ignored with no error, if `VirtualBuildEnv` generator wasn't defined in recipe

and as we can see from this issue, there is a third side effect of `auto_use` - it causes an empty `generate` method to behave differently from recipe with no `generate` method at all.

_Originally posted by @SSE4 in https://github.com/conan-io/conan/issues/12383#issuecomment-1290406062_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.