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 co/2.0.2 #7510

Merged
merged 30 commits into from
Oct 15, 2021
Merged

add co/2.0.2 #7510

merged 30 commits into from
Oct 15, 2021

Conversation

idealvin
Copy link
Contributor

@idealvin idealvin commented Oct 3, 2021

Specify library name and version: lib/1.0

This is also a good place to share with all of us why you are submitting this PR (specially if it is a new addition to ConanCenter): is it a dependency of other libraries you want to package? Are you the author of the library? Thanks!


  • I've read the guidelines for contributing.
  • I've followed the PEP8 style guides for Python code in the recipes.
  • I've used the latest Conan client version.
  • I've tried at least one configuration locally with the
    conan-center hook activated.

@CLAassistant
Copy link

CLAassistant commented Oct 3, 2021

CLA assistant check
All committers have signed the CLA.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

recipes/co/all/test_package/conanfile.py Outdated Show resolved Hide resolved
recipes/co/all/test_package/test_package.cc Outdated Show resolved Hide resolved
recipes/co/all/test_package/conanfile.py Outdated Show resolved Hide resolved
recipes/co/all/conanfile.py Outdated Show resolved Hide resolved
recipes/co/all/conanfile.py Outdated Show resolved Hide resolved
recipes/co/all/conanfile.py Outdated Show resolved Hide resolved
recipes/co/all/test_package/CMakeLists.txt Outdated Show resolved Hide resolved
recipes/co/all/test_package/conanfile.py Outdated Show resolved Hide resolved
recipes/co/all/conanfile.py Outdated Show resolved Hide resolved
recipes/co/all/conanfile.py Outdated Show resolved Hide resolved
idealvin and others added 10 commits October 7, 2021 21:45
Co-authored-by: Sparik Hayrapetyan <sparikhayrapetyan@gmail.com>
Co-authored-by: Sparik Hayrapetyan <sparikhayrapetyan@gmail.com>
Co-authored-by: Sparik Hayrapetyan <sparikhayrapetyan@gmail.com>
Co-authored-by: Sparik Hayrapetyan <sparikhayrapetyan@gmail.com>
Co-authored-by: Sparik Hayrapetyan <sparikhayrapetyan@gmail.com>
Co-authored-by: Sparik Hayrapetyan <sparikhayrapetyan@gmail.com>
Co-authored-by: Sparik Hayrapetyan <sparikhayrapetyan@gmail.com>
Co-authored-by: Sparik Hayrapetyan <sparikhayrapetyan@gmail.com>
Co-authored-by: Sparik Hayrapetyan <sparikhayrapetyan@gmail.com>
Co-authored-by: Sparik Hayrapetyan <sparikhayrapetyan@gmail.com>
@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@idealvin
Copy link
Contributor Author

idealvin commented Oct 9, 2021

@prince-chrismc

All blue! Can it be merged into one piece now?

Thanks for your help!

@SSE4 SSE4 requested a review from uilianries October 9, 2021 07:46
SSE4
SSE4 previously approved these changes Oct 9, 2021
@prince-chrismc
Copy link
Contributor

Why wouldn't we use the latest?

Can users choose the version by themselves?

Absolutely they can!

https://docs.conan.io/en/latest/using_packages/conanfile_txt.html#overriding-requirements

Copy link
Contributor

@prince-chrismc prince-chrismc left a comment

Choose a reason for hiding this comment

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

And one more questions

Does this impact the features?
https://github.com/idealvin/co/blob/7be5367623a85ca8a0a4e2095000d7b704cc9f89/src/CMakeLists.txt#L94

How can a consumer know if this was enabled?

recipes/co/all/CMakeLists.txt Outdated Show resolved Hide resolved


class CoConan(ConanFile):
name = "co"
Copy link
Contributor

Choose a reason for hiding this comment

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

Are we fine with co? Perhaps it 's safer to namespace it? idealvin-co?

I think it's a great idea, people who aren't familiar with the project we get confused


def package_info(self):
self.cpp_info.libs = ["co"]
self.cpp_info.names["cmake_find_package"] = "CO"
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed. Thanks.

Copy link
Contributor Author

@idealvin idealvin Oct 10, 2021

Choose a reason for hiding this comment

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

Are we fine with co? Perhaps it 's safer to namespace it? idealvin-co

Unfortunately, I chose the name co at the beginning, and it’s too late when I want to rename it.

Copy link
Member

Choose a reason for hiding this comment

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

I didn't find other C/C++ projects using same name. As your project has 2k2 stars on GIthub, it's popular, so I think is okay accepting it as co only.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I didn't find other C/C++ projects using same name. As your project has 2k2 stars on GIthub, it's popular, so I think is okay accepting it as co only.

Thanks!

Co-authored-by: Chris Mc <prince.chrismc@gmail.com>
@conan-center-bot

This comment has been minimized.

@idealvin
Copy link
Contributor Author

And one more questions

Does this impact the features? https://github.com/idealvin/co/blob/7be5367623a85ca8a0a4e2095000d7b704cc9f89/src/CMakeLists.txt#L94

How can a consumer know if this was enabled?

This is described in the documents, should be ok.

@conan-center-bot

This comment has been minimized.

@prince-chrismc
Copy link
Contributor

This is described in the documents, should be ok.

Then libstacktrace needs to be an option. Otherwise Conan wont be able to track it

@idealvin
Copy link
Contributor Author

This is described in the documents, should be ok.

Then libstacktrace needs to be an option. Otherwise Conan wont be able to track it

@prince-chrismc

This is a little different, libbacktrace is automatically detected by check_include_files in cmake:

    check_include_files(backtrace.h HAS_BACKTRACE)
    if(HAS_BACKTRACE)
        target_compile_definitions(co PRIVATE HAS_BACKTRACE_H)
        target_link_libraries(co PUBLIC backtrace)
    endif()

It seems that it is not necessary for conan to track it.

@conan-center-bot

This comment has been minimized.

@prince-chrismc
Copy link
Contributor

This is a little different, libbacktrace is automatically detected by check_include_files in cmake:

Okay, there's a key feature about Conan that makes it so powerful.
➡️ its ability to calculate the package_id

Now what the hell does that mean?
https://docs.conan.io/en/latest/reference/conanfile/methods.html#package-id

TL;DR it is related to the ABI of the binary. Well mostly.

That means anything that affect the binary, add/removes API, compiler settings, platform, etc need to be tracked by conan.
This is done for a lot by default but certain details (like what optional dependencies maybe be used) need to be added as options.

I'll give you an example where not adding the option may ruin someone's day.

We have two systems

  1. The builder -- for some unknown reason has libbacktrace is installed
  2. A costumers system who runs our application

When we build our app we are going to compile and link against libbacktrace. Unit tests will pass. Everything is ready.
The customer runs the applications and gets "unable to load libbacktrace.so"

The opposite is less annoying but easily avoided... let pretend we forgot to install the extra library. if the option with_backtrace was true the compilation would fail since it was missing.

@prince-chrismc prince-chrismc mentioned this pull request Oct 12, 2021
4 tasks
@idealvin
Copy link
Contributor Author

idealvin commented Oct 12, 2021

@prince-chrismc
Usually, libbacktrace has been installed within gcc as a static library if you have a newer version of gcc on linux, and you may find it in a directory like /usr/lib/gcc/x86_64-linux-gnu/9.

I think there is no problem at present. However, I'll consider make it as a feature in the next version of co.

Co-authored-by: Uilian Ries <uilianries@gmail.com>
@conan-center-bot
Copy link
Collaborator

All green in build 29 (3c4fe47dedabeaaf6af5487750336bbcc9771b18):

  • co/2.0.2@:
    All packages built successfully! (All logs)

Copy link
Member

@uilianries uilianries left a comment

Choose a reason for hiding this comment

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

LGTM

@conan-center-bot conan-center-bot merged commit 48cce93 into conan-io:master Oct 15, 2021
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.

9 participants