Skip to content

zeus_expected: new recipe - #23477

Merged
conan-center-bot merged 8 commits into
conan-io:masterfrom
X1aomu:zeus_expected-new
Apr 20, 2024
Merged

conan-center-bot merged 8 commits into
conan-io:masterfrom
X1aomu:zeus_expected-new

Conversation

@X1aomu

@X1aomu X1aomu commented Apr 11, 2024 •

Copy link
Copy Markdown
Contributor

zeus_expected

A header-only library to backport std::expected to C++17.


@CLAassistant

CLAassistant commented Apr 11, 2024 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@conan-center-bot

This comment has been minimized.

@X1aomu
X1aomu force-pushed the zeus_expected-new branch from 1cbcab5 to 75106dc Compare April 11, 2024 06:40
@conan-center-bot

This comment has been minimized.

@AbrilRBS AbrilRBS self-assigned this Apr 15, 2024
AbrilRBS
AbrilRBS previously approved these changes Apr 15, 2024

@AbrilRBS AbrilRBS left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hi! Thanks for taking the time to make your library available in Conan Center, we really appreciate it!

The recipe looks super good, I have nothing to suggest changing :)

(Don't worry about the CI, it will be retriggered automatically once the underlying infra issues have been fixed)

@conan-center-bot

This comment has been minimized.

@uilianries uilianries left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looking good, only some details.

Comment thread recipes/zeus_expected/all/conanfile.py Resolved
Comment thread recipes/zeus_expected/all/conanfile.py Resolved
Comment thread recipes/zeus_expected/all/conanfile.py Resolved
@conan-center-bot

This comment has been minimized.

@X1aomu

X1aomu commented Apr 18, 2024

Copy link
Copy Markdown
Contributor Author

Hi, @uilianries

Though I've successfully run conan create against conan 1.54 with the hook enabled, there are still a few more questions I have,

  1. does it need a seperated test_v1_package folder for test package? what content should lie in there?
  2. I saw some old things about conan 1.x from the recipe of tl-expected. Are they still necessary nowadays? (they cause the deprecated warning in conan 2 that I don't like)

# TODO: to remove in conan v2 once cmake_find_package* generators removed
self.cpp_info.filenames["cmake_find_package"] = "tl-expected"
self.cpp_info.filenames["cmake_find_package_multi"] = "tl-expected"
self.cpp_info.names["cmake_find_package"] = "tl"
self.cpp_info.names["cmake_find_package_multi"] = "tl"
self.cpp_info.components["expected"].names["cmake_find_package"] = "expected"
self.cpp_info.components["expected"].names["cmake_find_package_multi"] = "expected"
self.cpp_info.components["expected"].set_property("cmake_target_name", "tl::expected")
self.cpp_info.components["expected"].bindirs = []
self.cpp_info.components["expected"].frameworkdirs = []
self.cpp_info.components["expected"].libdirs = []
self.cpp_info.components["expected"].resdirs = []

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

Comment thread recipes/zeus_expected/all/conanfile.py Resolved
Comment thread recipes/zeus_expected/all/conanfile.py Resolved
@conan-center-bot

This comment has been minimized.

@uilianries

Copy link
Copy Markdown
Member

Hi, @uilianries

Though I've successfully run conan create against conan 1.54 with the hook enabled, there are still a few more questions I have,

1. does it need a seperated test_v1_package folder for test package? what content should lie in there?

2. I saw some old things about conan 1.x from the recipe of `tl-expected`. Are they still necessary nowadays? (they cause the deprecated warning in conan 2 that I don't like)

# TODO: to remove in conan v2 once cmake_find_package* generators removed
self.cpp_info.filenames["cmake_find_package"] = "tl-expected"
self.cpp_info.filenames["cmake_find_package_multi"] = "tl-expected"
self.cpp_info.names["cmake_find_package"] = "tl"
self.cpp_info.names["cmake_find_package_multi"] = "tl"
self.cpp_info.components["expected"].names["cmake_find_package"] = "expected"
self.cpp_info.components["expected"].names["cmake_find_package_multi"] = "expected"
self.cpp_info.components["expected"].set_property("cmake_target_name", "tl::expected")
self.cpp_info.components["expected"].bindirs = []
self.cpp_info.components["expected"].frameworkdirs = []
self.cpp_info.components["expected"].libdirs = []
self.cpp_info.components["expected"].resdirs = []

@X1aomu Thank you for validating even Conan 1.x locally!

  1. does it need a seperated test_v1_package folder for test package? what content should lie in there?

No, for new recipes, the same test_package folder should be used by both Conan 2.x and 1.x, with the exactly same code, no condition related to the version. The legacy test_v1_package folder was kept to prove compatibility with legacy Conan generators like cmake and cmake_find_package. So you do not need to create test_v1_package, your current test_package is good enough. More details about the deprecation of support for legacy generators here: #17406

  1. I saw some old things about conan 1.x from the recipe of tl-expected. Are they still necessary nowadays? (they cause the deprecated warning in conan 2 that I don't like)

Do you mean this line, right? https://github.com/conan-io/conan-center-index/blob/master/recipes/tl-expected/all/conanfile.py#L50

It was added only for recipes in ConanCenterIndex that was present since Conan 1.x and then migrated to support Conan 2.x. As users would need time to migrate too, we kept both legacy and new generators supported in the recipes. But this a decision only for old recipes, new recipes like yours should ignore that rule and do not add support for those legacy generators.

Though I've successfully run conan create against conan 1.54 with the hook enabled

About the hooks, don't worry too much about the warnings, it's more a notification than an obligation, some of them are covered already by Conan 2.x as built-in rule (e.g package name should be lower-case). In Conan 2.x we still don't have hooks in ConanCenterIndex, but we are designing other ways to check it.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@X1aomu

X1aomu commented Apr 19, 2024

Copy link
Copy Markdown
Contributor Author

glad to see all checks passed for the first time :)

I am going to investigate the bug further and merge the patch to upstream.

@uilianries uilianries left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Almost good to go, only small details. Thank you for releasing a new version!

Comment thread recipes/zeus_expected/all/conandata.yml Resolved
Comment thread recipes/zeus_expected/all/conanfile.py Resolved
Comment thread recipes/zeus_expected/all/conanfile.py Resolved
Comment thread recipes/zeus_expected/all/conanfile.py Resolved
Comment thread recipes/zeus_expected/all/conanfile.py Resolved
@conan-center-bot

Copy link
Copy Markdown
Contributor

Conan v1 pipeline ✔️

All green in build 12 (aac604b3ebaa4fba702712f423aec34e17eaa9a1):

  • zeus_expected/1.1.0:
    All packages built successfully! (All logs)

Conan v2 pipeline ✔️

Note: Conan v2 builds are now mandatory. Please read our discussion about it.

All green in build 12 (aac604b3ebaa4fba702712f423aec34e17eaa9a1):

  • zeus_expected/1.1.0:
    All packages built successfully! (All logs)

@uilianries uilianries left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM. Thank you for your PR!

@conan-center-bot
conan-center-bot merged commit afb0c9a into conan-io:master Apr 20, 2024
@X1aomu
X1aomu deleted the zeus_expected-new branch April 23, 2024 08:45
franramirez688 pushed a commit to toge/conan-center-index that referenced this pull request Apr 23, 2024
* zeus_expected: new recipe

* zeus_expected: keep only the latest bugfix version as a new recipe

* Apply suggestions from code review

Co-authored-by: Uilian Ries <[email protected]>

* zeus_expected: fix for linting

* zeus_expected: bump to latest version

* zeus_expected: test_package: removoe /Zc:__cplusplus as the new version doesn't require it

* zeus_expected: testing: add patches

* Apply suggestions from code review

Co-authored-by: Uilian Ries <[email protected]>

---------

Co-authored-by: Uilian Ries <[email protected]>
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.

7 participants