Skip to content

Mention ConanFile.conf validity #4037

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: develop2
Choose a base branch
from
Open

Conversation

tttapa
Copy link

@tttapa tttapa commented Mar 24, 2025

This addresses comments from @memsharded in conan-io/conan#18008 about which methods are allowed to rely on the data in ConanFile.conf.

I just added a quick note, but it would be great to discuss some more helpful suggestions for people who need these configuration values elsewhere in their recipe.

@CLAassistant
Copy link

CLAassistant commented Mar 24, 2025

CLA assistant check
All committers have signed the CLA.

@AbrilRBS
Copy link
Member

AbrilRBS commented Mar 25, 2025

Thanks a lot for taking the time to improve the docs, we appreciate it!

I think it would be easier to note in which methods access to conf is not allowed, or only a certain kind of confs are allowed to be queried, as the current list would be missing quite a few methods, let me check with the team :)

Copy link
Member

@memsharded memsharded left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might be a bit more complicated than this.
The issue is that the conf is available in other places, as long as it comes from profiles files.

It is the usage of conf coming from tool_requires that is expected to be limited, because those tool_requires might not be necessarily available (skipped), and their package_info() won't even execute.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants