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

set_name and set_version can use given name and version #6940



Copy link

@memsharded memsharded commented Apr 30, 2020

Changelog: Feature: Allow access to and self.version in set_name() and set_version() methods.
Docs: conan-io/docs#1710

Close #6939

Copy link

@jgsogo jgsogo left a comment

With these changes we loose this check:

        if hasattr(conanfile, "set_name"):	
                raise ConanException("Conanfile defined package 'name', set_name() redundant")

is it intended?

Copy link
Member Author

@memsharded memsharded commented May 5, 2020

Yes, having a predefined name (command line or package) does not exclude the possibility of defining a method. This is what the request #6939 was asking for basically. As it was not possible in the past, seems this wouldn't be breaking existing packages.

jgsogo approved these changes May 5, 2020
Copy link

@jgsogo jgsogo left a comment

Now it can have a name and also a set_name() function, it is more permissive, I hope no one relies on that error ¡!

This change is needed, and soon we will move the init() function as we have done with these ones...

@memsharded memsharded merged commit f361690 into conan-io:develop May 10, 2020
2 checks passed
@memsharded memsharded deleted the feature/set_name_version_later branch May 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

2 participants