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

Change exported install name to beman::execution26 #109

Merged
merged 2 commits into from
Dec 23, 2024

Conversation

maikel
Copy link
Collaborator

@maikel maikel commented Dec 23, 2024

According to https://github.com/bemanproject/beman/blob/main/docs/BEMAN_STANDARD.md the library should be exported as beman::execution26 but currently it is beman_execution26::beman_execution26

Take care: I did not check whether this breaks net29

@maikel maikel force-pushed the change_export_install_names branch from 508a8a9 to 00596a7 Compare December 23, 2024 04:43
@maikel maikel force-pushed the change_export_install_names branch from 00596a7 to 6bc0de6 Compare December 23, 2024 04:46
@ClausKlein
Copy link
Collaborator

Do you know this cmake naming convention? https://discourse.cmake.org/t/fetchcontent-and-cache-variables-collisions/13236/2

Comment on lines 43 to 44
${PROJECT_SOURCE_DIR}/include/beman/execution26/detail/atomic_intrusive_stack.hpp
${PROJECT_SOURCE_DIR}/include/beman/execution26/detail/await_result_type.hpp
Copy link
Collaborator

Choose a reason for hiding this comment

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

It is not clear to me why this additional headers are needed now?

The last CI runs worked without this headers???

We have to check the CI build rules!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We always need to install headers since this is a header only library. We simply forgot to add them to the file set when I implemented the awaitable helpers.

The things that I change here occured while I was using beman::execution26 as an installed library to implement a coroutine task. I couldn't use the library because headers were missing.

I was using it here
https://github.com/maikel/task

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is how I expect to consume beman.execution26

https://github.com/maikel/task/blob/main/CMakeLists.txt#L20-L26

@maikel
Copy link
Collaborator Author

maikel commented Dec 23, 2024

Do you know this cmake naming convention? https://discourse.cmake.org/t/fetchcontent-and-cache-variables-collisions/13236/2

Indeed, I do not. I will have a look. I was just looking into the beman standard rules and was surprised to not have an beman::execution26 target that I can cmake-link against. AFAIU we provide a local beman::execution26 target but install beman_execution26::beman_execution26 so somthing is iffy here. I hope to fix that. But I changed more than that and if that violates other best-practises lets just do the very necessary changes

@maikel
Copy link
Collaborator Author

maikel commented Dec 23, 2024

TODO: a good check whether we forgot to install all necessary headers in the FILE_SET could be to have a CI job that installs the library in the docker image and consumes it to build either the examples or the unit tests as an external provided library instead of in an in-tree build

@ClausKlein
Copy link
Collaborator

ClausKlein commented Dec 23, 2024

TODO: a good check whether we forgot to install all necessary headers in the FILE_SET could be to have a CI job that installs the library in the docker image and consumes it to build either the examples or the unit tests as an external provided library instead of in an in-tree build

it exists here https://github.com/bemanproject/execution26/blob/2d7e75e804a3bc57b9f9e5f251630d456576a7b9/tests/beman/execution26/CMakeLists.txt#L134

and it runs here https://github.com/bemanproject/execution26/actions/runs/12456083371/job/34769207665#step:4:922

@dietmarkuehl But for timing reason, only one test is compiled!

@maikel
Copy link
Collaborator Author

maikel commented Dec 23, 2024

TODO: a good check whether we forgot to install all necessary headers in the FILE_SET could be to have a CI job that installs the library in the docker image and consumes it to build either the examples or the unit tests as an external provided library instead of in an in-tree build

it exists here

https://github.com/bemanproject/execution26/blob/2d7e75e804a3bc57b9f9e5f251630d456576a7b9/tests/beman/execution26/CMakeLists.txt#L134

and it runs here https://github.com/bemanproject/execution26/actions/runs/12456083371/job/34769207665#step:4:922

Hm, yes. Then that test doesn't detect the missing include files in the FILE_SET. Maybe it picks up the include directory of build dir instead of only considering the stage dir.

Edit: and we should make sure to build a test that uses all public headers, such as #include <beman/execution26/execution.hpp>

@dietmarkuehl
Copy link
Collaborator

Edit: and we should make sure to build a test that uses all public headers, such as #include <beman/execution26/execution.hpp>

Of course, that just kicks the can down the road: headers can also be missing from execution.hpp. There is actually a target (update) in the top-level Makefile which automatically adds all headers in include/beman/execution26 (and detail subdirectory) to the relevant CMakeLists.txt but not [yet?] to execution.hpp.

@dietmarkuehl
Copy link
Collaborator

TODO: a good check whether we forgot to install all necessary headers in the FILE_SET could be to have a CI job that installs the library in the docker image and consumes it to build either the examples or the unit tests as an external provided library instead of in an in-tree build

it exists here

https://github.com/bemanproject/execution26/blob/2d7e75e804a3bc57b9f9e5f251630d456576a7b9/tests/beman/execution26/CMakeLists.txt#L134

and it runs here https://github.com/bemanproject/execution26/actions/runs/12456083371/job/34769207665#step:4:922

@dietmarkuehl But for timing reason, only one test is compiled!

This one remaining test still takes more time than building the tests and running them together. I'm not objecting to testing that all files get properly installed. However, I run tests often during development and currently the first thing I tend to do is to disable this test.

@maikel
Copy link
Collaborator Author

maikel commented Dec 23, 2024

TODO: a good check whether we forgot to install all necessary headers in the FILE_SET could be to have a CI job that installs the library in the docker image and consumes it to build either the examples or the unit tests as an external provided library instead of in an in-tree build

it exists here
https://github.com/bemanproject/execution26/blob/2d7e75e804a3bc57b9f9e5f251630d456576a7b9/tests/beman/execution26/CMakeLists.txt#L134

and it runs here https://github.com/bemanproject/execution26/actions/runs/12456083371/job/34769207665#step:4:922
@dietmarkuehl But for timing reason, only one test is compiled!

This one remaining test still takes more time than building the tests and running them together. I'm not objecting to testing that all files get properly installed. However, I run tests often during development and currently the first thing I tend to do is to disable this test.

But do you have to run an integration test in your local development? We could have a dedicated CI job that installs into a docker container and tries to compile an example using the freshly installed package.

@@ -174,32 +181,33 @@ target_sources(
${PROJECT_SOURCE_DIR}/include/beman/execution26/detail/when_all.hpp
${PROJECT_SOURCE_DIR}/include/beman/execution26/detail/when_all_with_variant.hpp
${PROJECT_SOURCE_DIR}/include/beman/execution26/detail/with_await_transform.hpp
${PROJECT_SOURCE_DIR}/include/beman/execution26/detail/with_awaitable_senders.hpp
Copy link
Collaborator

Choose a reason for hiding this comment

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

There are a few more headers also missing. I spotted

  • intrusive_stack.hpp
  • split.hpp

@dietmarkuehl
Copy link
Collaborator

This one remaining test still takes more time than building the tests and running them together. I'm not objecting to testing that all files get properly installed. However, I run tests often during development and currently the first thing I tend to do is to disable this test.

But do you have to run an integration test in your local development? We could have a dedicated CI job that installs into a docker container and tries to compile an example using the freshly installed package.

No, I don't. Effectively, I just build using make which uses the default target in the Makefile. That just depends on test which depends on build. test just run ctest with some options. If there is a setup to not run tests which should be part of the integration but are probably not part of building during development, that's fine.

I should really also add a target which does all the things getting ready to create a PR:

  • update to add missing headers and (with an extension) check that all detail headers are used from at least one top-level header
  • check to detect cyclic dependencies in headers (although I recently fixed some clang-tidy warnings which also detected cycles)
  • clang-format (in theory format should do the trick but I don't have cmake-format installed)
  • clang-tidy
  • ce to build headers for Compiler Explorer (although that probably needs some work)
  • possibly others

Copy link
Collaborator

@dietmarkuehl dietmarkuehl left a comment

Choose a reason for hiding this comment

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

The change looks good to me. I'll try it out and make sure that the list of headers is up to date. With that I'll plan to approve and land the changes. Moving the setup to be in line with other policies can be a separate PR.

Copy link
Collaborator

@dietmarkuehl dietmarkuehl left a comment

Choose a reason for hiding this comment

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

Aside from missing headers (and listing one header twice) the change also broke the header update script. With these also fixed, the change looks good.

@dietmarkuehl dietmarkuehl merged commit 752882e into main Dec 23, 2024
12 checks passed
@dietmarkuehl dietmarkuehl deleted the change_export_install_names branch December 23, 2024 19:46
dietmarkuehl added a commit that referenced this pull request Jan 21, 2025
* Change exported install name to beman::execution26

* adjust the header update script and add missing headers

---------

Co-authored-by: Dietmar Kühl <[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.

3 participants