Skip to content
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

conanfile reserved attrs and methods #3560



Copy link

@memsharded memsharded commented Sep 17, 2018

Close #3526

  • Add this convention to docs.

Docs in conan-io/docs#825

Changelog: Feature: New naming convention for conanfile reserved/public/private attributes.

@ghost ghost assigned memsharded Sep 17, 2018
@memsharded memsharded added this to the 1.8 milestone Sep 17, 2018
@ghost ghost added the stage: review label Sep 17, 2018
@memsharded memsharded assigned jgsogo and unassigned memsharded Sep 17, 2018
Copy link

@jgsogo jgsogo left a comment

Also, I would add a test to check this rule about ConanFile attributes/funcs:

something like?

def test_conanfile_naming(self):
    for it in vars(ConanFile):
         if it.startswith('_'):

    evaluated_conanfile = ... 
    for it in vars(evaluated_conanfile):

if not hasattr(conanfile, "_evaluated_requires"):
conanfile._evaluated_requires = conanfile.requires.copy()
elif conanfile.requires != conanfile._evaluated_requires:
if not hasattr(conanfile, "_conan_eval_requires"):
Copy link

@jgsogo jgsogo Sep 17, 2018

I'll keep the past perfect tense, for me eval has one meaning and evaluated a different one.

@ghost ghost assigned memsharded Sep 17, 2018
jgsogo approved these changes Sep 17, 2018
@memsharded memsharded merged commit 719d66d into conan-io:develop Sep 17, 2018
2 checks passed
@ghost ghost removed the stage: review label Sep 17, 2018
@memsharded memsharded deleted the feature/conanfile_reserved_attrs branch Sep 17, 2018
grisumbras pushed a commit to grisumbras/conan that referenced this issue Dec 27, 2018

conanfile reserved attrs and methods
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants