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

Merged

Conversation

Projects
None yet
2 participants
@memsharded
Copy link
Contributor

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

@jgsogo
Copy link
Member

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('_'):
            self.assertTrue(it.startswith('_conan'))

    evaluated_conanfile = ... 
    for it in vars(evaluated_conanfile):
        [...idem...]
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"):

This comment has been minimized.

Copy link
@jgsogo

jgsogo Sep 17, 2018

Member

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

jgsogo approved these changes Sep 17, 2018

@memsharded memsharded merged commit 719d66d into conan-io:develop Sep 17, 2018

2 checks passed

continuous-integration/jenkins/pr-head This commit looks good
Details
license/cla Contributor License Agreement is signed.
Details

@ghost ghost removed the stage: review label Sep 17, 2018

@memsharded memsharded deleted the memsharded:feature/conanfile_reserved_attrs branch Sep 17, 2018

grisumbras pushed a commit to grisumbras/conan that referenced this pull request Dec 27, 2018

Merge pull request conan-io#3560 from memsharded/feature/conanfile_re…
…served_attrs

conanfile reserved attrs and methods
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.