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

Add finalize() method to ConanFile #16646

Merged
merged 53 commits into from
Aug 27, 2024
Merged

Conversation

AbrilRBS
Copy link
Member

@AbrilRBS AbrilRBS commented Jul 10, 2024

Changelog: Feature: Add finalize() method for local cache final adjustments of packages.
Docs: conan-io/docs#3820

We'll want to release a blogpost alongside the feature

Closes #15277
Closes #16707

---------

Co-authored-by: PerseoGI <perseog@jfrog.com>
@AbrilRBS AbrilRBS marked this pull request as draft July 10, 2024 12:05
Copy link
Member

@memsharded memsharded left a comment

Choose a reason for hiding this comment

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

This is looking very good, good job :)

I am very happy to see that apparently the new cache design, architecture, folders, etc, seem to support this use case in a way that looks like one order of magnitude more doable than in Conan 1.

conans/model/layout.py Outdated Show resolved Hide resolved
conans/model/layout.py Outdated Show resolved Hide resolved
conans/model/layout.py Outdated Show resolved Hide resolved
AbrilRBS and others added 3 commits July 22, 2024 11:23
Co-authored-by: PerseoGI <perseog@jfrog.com>
Co-authored-by: PerseoGI <perseog@jfrog.com>
Co-authored-by: PerseoGI <perseog@jfrog.com>
conans/model/layout.py Outdated Show resolved Hide resolved
conans/model/layout.py Outdated Show resolved Hide resolved
AbrilRBS and others added 4 commits July 22, 2024 11:25
Co-authored-by: PerseoGI <perseog@jfrog.com>
Co-authored-by: PerseoGI <perseog@jfrog.com>
Co-authored-by: PerseoGI <perseog@jfrog.com>
@AbrilRBS AbrilRBS requested a review from perseoGI July 22, 2024 09:26
conan/api/subapi/cache.py Outdated Show resolved Hide resolved
conan/test/assets/genconanfile.py Outdated Show resolved Hide resolved
conans/model/conan_file.py Outdated Show resolved Hide resolved
conans/client/installer.py Outdated Show resolved Hide resolved
@AbrilRBS AbrilRBS changed the title Add install() method to ConanFile Add localize() method to ConanFile Aug 12, 2024
conans/model/layout.py Outdated Show resolved Hide resolved
conans/client/installer.py Outdated Show resolved Hide resolved
@AbrilRBS AbrilRBS changed the title Add localize() method to ConanFile Add finalize() method to ConanFile Aug 20, 2024
conans/model/layout.py Outdated Show resolved Hide resolved
conans/model/layout.py Outdated Show resolved Hide resolved
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'm still not super convinced about the name of the feature. Not that these are better but leaving some more options here:

customize()
modify()
prepare()
adjust()
mute()
tweak()

@memsharded
Copy link
Member

mute()
tweak()

We have already considered all of them with @AbrilRBS (we spent some hours thinking about this 😅 ) except the last 2 mute() and tweak(), which I still think are not a better one than finalize() (I guess the first one would actually be mutate() or something like that, not mute()?)

@czoido
Copy link
Contributor

czoido commented Aug 26, 2024

mute()
tweak()

We have already considered all of them with @AbrilRBS (we spent some hours thinking about this 😅 ) except the last 2 mute() and tweak(), which I still think are not a better one than finalize() (I guess the first one would actually be mutate() or something like that, not mute()?)

yes, sorry, I meant mutate! 🤦

Copy link
Contributor

@perseoGI perseoGI left a comment

Choose a reason for hiding this comment

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

I guess it is the best name, I hope users won't mix post-hook concept with this new method.
LGTM 🚀

@czoido czoido merged commit be2467e into conan-io:develop2 Aug 27, 2024
2 checks passed
@AbrilRBS AbrilRBS deleted the ar/install-method branch August 27, 2024 12:12
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.

[bug] __pycache__ presence violates cached package integrity [feature] Re consider the install() method
4 participants