-
Notifications
You must be signed in to change notification settings - Fork 1.1k
feat: export recipe in the ConanFileInterface #18995
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
base: develop2
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution @araffin
I am afraid that it is not very clear what problem is being solved. It would be better to file an issue first to discuss the need of exposing certain things over the ConanFileInterface
, as commented below, some of those things might even be an anti-pattern
data = OrderedDict((k, v) for k, v in data.items() | ||
# TODO: Make "recipe" part of ConanFileInterface model | ||
if v._conanfile._conan_node.recipe != RECIPE_PLATFORM) | ||
data = OrderedDict((k, v) for k, v in data.items() if not v.is_platform) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was done this way because we didn't want to expose this as part of the interface to consumers.
The idea that it is a platform thing should be transparent to consumers, if consumers need to check this, it is probably an anti-pattern
Changelog: (Feature): export
recipe
,is_editable
andis_platform
in theConanFileInterface
(fixes a TODO from the dependencies)closes #18996
explicit exports using the__all__
variableSome additional context: currently there is no easy way for a generator to know if a dependency is editable, platform, ...
This PR exposes the recipe via the
ConanFileInterface
so users don't have to use private method to have the info.For the
__all__
keywords, this makes it explicit what Conan exports and avoid "unused import" warnings with linters.develop
branch, documenting this one.