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

avoid breaking users calling forbidden private api conanfile.__init__ #8746

Conversation

memsharded
Copy link
Member

@memsharded memsharded commented Mar 31, 2021

Changelog: Fix: Avoid breaking users calling forbidden private api conanfile.__init__.
Docs: Omit

Close #8741

#tags: slow

@memsharded memsharded added this to the 1.35.1 milestone Mar 31, 2021
conans/client/loader.py Outdated Show resolved Hide resolved
Co-authored-by: Carlos Zoido <mrgalleta@gmail.com>
@SSE4
Copy link
Contributor

SSE4 commented Apr 5, 2021

@memsharded is it really needed to be fixed? that appears to be private API, thus breakage is totally expected. (and if breakage of private API is not expected, then this particular fix breaks behavior of 1.35.0).
I suggest to close #8741 instead of adding workarounds to the codebase.

Copy link
Contributor

@czoido czoido left a comment

Choose a reason for hiding this comment

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

I think we all agree this is not the ideal solution as commented in the PR: #8741 (comment) but I also would prefer to give some time for this users to migrate and revert this changes in the near future.
Although it's already stated, maybe we could emphasise a bit more in the documentation that making use of the private implementation could lead to breakage.

@czoido czoido merged commit f4a5a25 into conan-io:release/1.35 Apr 5, 2021
@SSE4
Copy link
Contributor

SSE4 commented Apr 5, 2021

if we want to avoid breakage, this cannot be merged as is, because right now we have two categories of users:

  1. pre-1.35 users who used private ctor with 4 arguments
  2. 1.35 users who used private ctor with 5 arguments

the changes breaks second category now, as there is no 5 arguments ctor any more. IMO it would be better to provide two overloads of ctor then.

@czoido
Copy link
Contributor

czoido commented Apr 5, 2021

  1. pre-1.35 users who used private ctor with 4 arguments
  2. 1.35 users who used private ctor with 5 arguments

the changes breaks second category now, as there is no 5 arguments ctor any more. IMO it would be better to provide two overloads of ctor then.

Technically, yes, we will break people who used that 5 arguments constructor between the release of 1.35.0 and the moment we release 1.35.1, but I hope no one decided to do this in this short period of time... so IMHO I would try to help those users that have hundreds of packages affected by this now and fix this in the near future...

@memsharded memsharded deleted the fix/avoid_breaking_conanfile_requester branch April 5, 2021 11:41
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.

None yet

3 participants