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

make CppInfo an importable tool #14101

Merged

Conversation

memsharded
Copy link
Member

@memsharded memsharded commented Jun 15, 2023

Changelog: Feature: Make CppInfo a public, documented, importable tool for generators that need to aggregate them.
Docs: conan-io/docs#3268

Close #13758 (#13758 (comment)), but:

  • It might be necessary to backport this to Conan 1.X for compatibility?

Probably better wait. Conan 1.X uses NewCppInfo instead, so it is going to be challenging. Lets move forward with 2.0 only, and see what happens and user feedback.

@memsharded memsharded added this to the 2.0.7 milestone Jun 15, 2023
cpp_info.save(p)

def package_info(self):
cpp_info = CppInfo(self).load("cpp_info.json")
Copy link
Member Author

Choose a reason for hiding this comment

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

This test shows that the interface cannot be a class/static method like CppInfo.load() as we typically do in the codebase, but it is loading on an already existing object (overwriting it)

@memsharded memsharded marked this pull request as ready for review June 18, 2023 14:45
Copy link
Member

@AbrilRBS AbrilRBS left a comment

Choose a reason for hiding this comment

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

Nice!

@franramirez688 franramirez688 merged commit 5ad2216 into conan-io:release/2.0 Jun 19, 2023
@memsharded memsharded deleted the feature/public_cpp_info branch June 19, 2023 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[question] What replaces custom generator packages in Conan v2?
5 participants