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

andreasbuhr-cppcoro: Conan 2.0 support #20611

Merged
merged 19 commits into from
Jan 11, 2024

Conversation

Ahajha
Copy link
Contributor

@Ahajha Ahajha commented Oct 17, 2023

Specify library name and version: andreasbuhr-cppcoro/all

I noticed the recipe previously had a single component defined, which seemed unnecessary, so I removed it. If anyone might know why that was there I can re-add it.

Closes #20564
Closes #16621

@ghost
Copy link

ghost commented Oct 17, 2023

I detected other pull requests that are modifying andreasbuhr-cppcoro/all recipe:

This message is automatically generated by https://github.com/ericLemanissier/conan-center-conflicting-prs so don't hesitate to report issues/improvements there.

@conan-center-bot

This comment has been minimized.

@AbrilRBS AbrilRBS self-assigned this Oct 17, 2023
@AbrilRBS
Copy link
Member

Hi @Ahajha thanks a lot for your PR, we really appreciate it! :)
The windows error comes from the fact that a check for C++17 at least should be done, else CCI will set it to 14 in windows and it won't compile

Just checked that there's a similar PR (I thought my first review didn't go thru!) for this recipe, maybe we can work to bring them both together with their changes?

@Ahajha
Copy link
Contributor Author

Ahajha commented Oct 17, 2023

@RubenRBS I didn't even notice there was another PR for this until I had already pushed it, but it seems this one will be a bit easier since it has a few more months of changes/fixes. I can definitely incorporate the rest of that branch's changes.

@conan-center-bot

This comment has been minimized.

@github-actions
Copy link
Contributor

Hooks produced the following warnings for commit 18ef9c1
andreasbuhr-cppcoro/cci.20210113@#cd2c14706331779efaea159f160e1418
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library '.\bin\cppcoro.dll' links to system library 'ws2_32' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library '.\bin\cppcoro.dll' links to system library 'mswsock' but it is not in cpp_info.system_libs.

@Ahajha
Copy link
Contributor Author

Ahajha commented Oct 18, 2023

Getting a C5231 on MSVC in the test package, which has almost no documentation online, I can't visually tell what's causing it, and I can't reproduce it on my machine. So for now trying to remove 20210113 and see if it's fixed upstream.

@conan-center-bot

This comment has been minimized.

@Ahajha
Copy link
Contributor Author

Ahajha commented Oct 18, 2023

Not quite ready yet:

  1. Need to figure out why cci.20210113 is failing on Windows, maybe we either drop support or bump it to a slightly later commit. Regardless I think having the latest is a good idea.
  2. Add system deps for Windows
  3. Minor test package cleanup (v1 should defer to v2)

@conan-center-bot

This comment has been minimized.

@Ahajha
Copy link
Contributor Author

Ahajha commented Oct 18, 2023

Looking at the changes between cci.20210113 and the latest, it's mostly very small bugfixes (including the windows build issue), so I imagine it won't cause any breakages for people to upgrade. Thus, I think we can just leave only the latest version. If someone needs a previous version we can revisit.

With that note, this should be ready for another review once CI passes.

@conan-center-bot

This comment has been minimized.

@Ahajha
Copy link
Contributor Author

Ahajha commented Oct 20, 2023

@RubenRBS This is ready for review (not sure if there's another process to signaling ready-ness)

@AbrilRBS
Copy link
Member

Pinging works, thanks :) (If not, we usually come around the PR eventually after a few days)

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! Somall questions, but looks nice

recipes/andreasbuhr-cppcoro/all/conanfile.py Outdated Show resolved Hide resolved
recipes/andreasbuhr-cppcoro/all/conanfile.py Show resolved Hide resolved
recipes/andreasbuhr-cppcoro/all/conanfile.py Show resolved Hide resolved
@Ahajha
Copy link
Contributor Author

Ahajha commented Nov 20, 2023

@RubenRBS Can you please take another look at this PR to see if there's any more required changes?

@Ahajha Ahajha requested a review from AbrilRBS November 20, 2023 20:01
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. I have a concern with Clang >= 16. I've proposed a solution, and I'm interested in hearing what you think about it :)

"gcc": "10",
"clang": "8",
"apple-clang": "10",
}

@property
def _min_cppstd(self):
return 17
Copy link
Member

Choose a reason for hiding this comment

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

This will be an issue for compilers that only have coroutines support for C++20 enabled. This is the case of clang >= 16, where only having -std=c++20 enables coroutines. With this check, CCI will only try to build for C++ 17. Maybe a solution is to force C++20 as a min required version if the other flag checks have not succeeded?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe we could just update this value to be
return 20 if self.settings.compiler == "clang" and self.settings.compiler.version >= 16 else 17?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There's also a funny edge case that I just ran into: When using libstdc++ with clang, it always required C++20. With libc++, it allows C++17 actually through clang 16, but fails with 17. I'll double check all my tests, but assuming that's correct I'll update the checks.

@Ahajha
Copy link
Contributor Author

Ahajha commented Nov 28, 2023

@RubenRBS A couple things I found while doing some more extensive clang testing:

  1. It seems that the -fcoroutines-ts flag is never needed, at least as far down as clang11. Just to be on the safe side, for versions older than that, I kept the flag.
  2. If using newer libstdc++ versions (I have libstdc++ 13, not sure if earlier ones will cause it) with clang 14 specifically, the build may fail for an unrelated reason. I don't know if there's a setting to test this, but I have it outputting a warning for now if it detects libstdc++ and clang 14.
  3. libstdc++ + clang always requires c++20
  4. clang allows c++17 mode up to and including clang 16, clang 17 is the first one to require c++20.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@Ahajha
Copy link
Contributor Author

Ahajha commented Dec 4, 2023

@RubenRBS I think this is ready for another look (I don't see the Conan v2 pipeline though, odd)

@conan-center-bot
Copy link
Collaborator

Conan v1 pipeline ✔️

All green in build 16 (d8ce9ebf6aa58a6e997d51c444606537192780e6):

  • andreasbuhr-cppcoro/cci.20230629:
    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 18 (d8ce9ebf6aa58a6e997d51c444606537192780e6):

  • andreasbuhr-cppcoro/cci.20230629:
    All packages built successfully! (All logs)

@Ahajha
Copy link
Contributor Author

Ahajha commented Dec 28, 2023

@RubenRBS Can you take another look at this one?

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 e712a50 into conan-io:master Jan 11, 2024
13 checks passed
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.

Library andreasbuhr-cppcoro is not compatible with Conan v2 [request] andreasbuhr-cppcoro/latest
4 participants