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

Added support for reflect-cpp v0.14.0; added CBOR and TOML #24819

Closed

Conversation

liuzicheng1987
Copy link

@liuzicheng1987 liuzicheng1987 commented Aug 4, 2024

Summary

Changes to recipe: reflect-cpp/0.14.0

Motivation

The most recent version on Conan was 0.11, but the most recent version of the library is 0.14. There have been significant advances between these two versions.

Also, not all serialization formats supported by reflect-cpp were also supported in the Conan package.

Details

reflect-cpp is no longer a header-only library, and some of the changes made reflect that. I now compile the library using the official CMakeLists.txt.


@CLAassistant
Copy link

CLAassistant commented Aug 4, 2024

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.

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.

Thanks a lot for taking the time to add the new version.

I see that you deleted all the code for 0.11.0, which is something we should keep around. Do you think it's worth keeping? As it's a header-only library instead of being built, I see value on keeping it around, but I defer the decision to you :)

If you end up removing the version, please do so from the config.yml and conandata.yml files.

Also please check the linter errors, the missing test_package and the hardcoded version should be reverted :)

dst=os.path.join(self.package_folder, "licenses"),
src=self.source_folder,
)
copy(
Copy link
Member

Choose a reason for hiding this comment

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

What is this used for? Why is the CMakeLists needed when consuming this package?

Copy link
Author

Choose a reason for hiding this comment

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

Well, how are supposed to build the package without the CMakeLists.txt?

@liuzicheng1987
Copy link
Author

Hi @AbrilRBS , thanks for your feedback.

I am the main author of reflect-cpp, but I didn't upload any of the previous Conan packages. Other people did that without informing me. I found out about its existence, because users were complaining to me about the Conan package.

As far as the tests are concerned: I frankly think the way they were set up in the Conan package before didn't make any sense. We have several hundreds of tests in our original Git repository, if you want to run these tests in the Conan package as well, I'd be happy to set up a proper test pipeline there.

And sure, I will remove the hardcoded version.

@liuzicheng1987
Copy link
Author

@AbrilRBS , here are the tests:

https://github.com/getml/reflect-cpp/tree/main/tests

I could either set up the JSON tests only (roughly 130 tests) or I could set up the tests for all supported formats (several hundred). JSON is the default format and the JSON tests are the most extensive, so there is a case to be made for running the JSON tests only. But let me know which option you prefer.

@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
Copy link
Collaborator

Conan v1 pipeline ❌

Changes not allowed in build 8:

[reflectcpp, reflect-cpp]

Only one library can be changed in the same PR.


Conan v2 pipeline ❌

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

The v2 pipeline failed. Please, review the errors and note this is required for pull requests to be merged. In case this recipe is still not ported to Conan 2.x, please, ping @conan-io/barbarians on the PR and we will help you.

Changes not allowed in build 8:

[reflectcpp, reflect-cpp]

Only one library can be changed in the same PR.

@liuzicheng1987
Copy link
Author

liuzicheng1987 commented Aug 5, 2024

@AbrilRBS, I'm stuck.

So here's the problem: Like I said, I am the main author of reflect-cpp, but someone else uploaded the package to Conan without consulting me.

In our CMakeLists.txt, we have always referred to the package as "reflectcpp" not "reflect-cpp":

https://github.com/getml/reflect-cpp/blob/main/CMakeLists.txt

But a requirement of the Conan package is that the name of the installed package be the same as the name of the package in the CMakeLists.txt.

This didn't matter as long as the library was treated as header-only. But this was a workaround from the get-go and in any case it won't work for any of the newer versions.

So my view is that the right course of action would be to rename the package "reflectcpp" in the Conan Center, but the Conan linter won't let me do that either.

So what should I do now? Open a new PR for a new recipe called "reflectcpp"?

@uilianries
Copy link
Member

uilianries commented Aug 6, 2024

@liuzicheng1987 Thank you for your PR and clarifying about the project name. Sorry hear that you were not informed about your project is packaged in Conan Center already.

Renaming a package is not a simple operation, because the CI is not prepared to do it (yet), as packages are "immutable", and it's something rare to occur in ConanCenterIndex. But don't worry, I'll talk to @AbrilRBS to find a proper solution and rename it somehow.

@liuzicheng1987
Copy link
Author

@uilianries , I could open a new PR for a new recipe called "reflectcpp" and tell people to use that in my documentation. We could then kind of deprecate the "reflect-cpp" recipe.

@liuzicheng1987
Copy link
Author

@uilianries and @AbrilRBS , I have opened a new PR: #24857

@uilianries
Copy link
Member

Closing this PR as #24857 superseded this one.

@uilianries uilianries closed this Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants