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 new package redis++ including hiredis #641

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

Dargun
Copy link

@Dargun Dargun commented Dec 7, 2022

add new packages hiredis and redis++
update libuv to version 1.44.2 and use offical repro for download instead hunter

  • I've followed this guide
    step by step carefully. [Yes]

  • I've followed this guide
    step by step carefully. [Yes]

I tested all localy with vs-17-2022-win64-cxx17

  • examples/redis++
  • examples/libuv

Copy link

@NeroBurner NeroBurner left a comment

Choose a reason for hiding this comment

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

please move the libuv update to a new PR, to keep the single PRs small and easy to review

cmake/projects/HiRedis/ci/matrix.json Outdated Show resolved Hide resolved
cmake/projects/Redis++/hunter.cmake Outdated Show resolved Hide resolved

hunter_pick_scheme(DEFAULT url_sha1_cmake)

hunter_cmake_args(Redis++ CMAKE_ARGS REDIS_PLUS_PLUS_BUILD_ASYNC=libuv REDIS_PLUS_PLUS_BUILD_TEST=OFF CMAKE_PREFIX_PATH=${HUNTER_INSTALL_PREFIX})

Choose a reason for hiding this comment

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

use multiple lines instead of a very long one for better git diffs in the future

and why is the CMAKE_PREFIX_PATH=${HUNTER_INSTALL_PREFIX}) needed? This should be done automatically by hunter

Suggested change
hunter_cmake_args(Redis++ CMAKE_ARGS REDIS_PLUS_PLUS_BUILD_ASYNC=libuv REDIS_PLUS_PLUS_BUILD_TEST=OFF CMAKE_PREFIX_PATH=${HUNTER_INSTALL_PREFIX})
hunter_cmake_args(Redis++ CMAKE_ARGS
REDIS_PLUS_PLUS_BUILD_ASYNC=libuv
REDIS_PLUS_PLUS_BUILD_TEST=OFF
)

Copy link
Author

Choose a reason for hiding this comment

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

i

please move the libuv update to a new PR, to keep the single PRs small and easy to review

had to update libuv so that i'am able to compile redis++

Copy link
Author

Choose a reason for hiding this comment

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

and why is the CMAKE_PREFIX_PATH=${HUNTER_INSTALL_PREFIX}) needed? This should be done automatically by hunter

this is needed so redis is able to find libuv and hiredis packages.
this is the way they describe in there docs.

Choose a reason for hiding this comment

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

link to documentation please

and please try it without. I thought this path is set by Hunter itself and you should not be required to set it as argument

Copy link
Author

Choose a reason for hiding this comment

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

i tested i localy without CMAKE_PREFIX_PATH=${HUNTER_INSTALL_PREFIX}
but then redis++ is not able to find the libs uvlib and hiredis.

https://github.com/sewenew/redis-plus-plus

If hiredis is installed at non-default location, you should use CMAKE_PREFIX_PATH to specify the installation path of hiredis. By default, redis-plus-plus is installed at /usr/local. However, you can use CMAKE_INSTALL_PREFIX to install redis-plus-plus at non-default location.

cmake/projects/libuv/ci/matrix.json Outdated Show resolved Hide resolved
cmake/projects/libuv/hunter.cmake Outdated Show resolved Hide resolved
examples/HiRedis/CMakeLists.txt Outdated Show resolved Hide resolved
examples/HiRedis/CMakeLists.txt Show resolved Hide resolved
examples/HiRedis/main.cpp Outdated Show resolved Hide resolved
examples/Redis++/CMakeLists.txt Outdated Show resolved Hide resolved
examples/Redis++/main.cpp Outdated Show resolved Hide resolved
@Dargun
Copy link
Author

Dargun commented Dec 9, 2022

@NeroBurner so i fixed all feedaback from review, how we want proceed?

@NeroBurner
Copy link

as mentioned before

please move the libuv update to a new PR, to keep the single PRs small and easy to review

If I've overlooked the libuv PR please ping me there

@NeroBurner
Copy link

You'll need to create a fork of redis++ (@rbsheth please fork https://github.com/sewenew/redis-plus-plus ) and add hunter_add_package() calls

documentation at: https://hunter.readthedocs.io/en/latest/creating-new/create/cmake-dependencies.html

@Dargun
Copy link
Author

Dargun commented Dec 12, 2022

You'll need to create a fork of redis++ (@rbsheth please fork https://github.com/sewenew/redis-plus-plus ) and add hunter_add_package() calls

documentation at: https://hunter.readthedocs.io/en/latest/creating-new/create/cmake-dependencies.html

Creating a fork only for calling hunter_add_package increases the complexity to keep packages up to date for no real reason.
If i want to compile redis++ i need also to link package a and b or more. Whats the issue?

@NeroBurner
Copy link

yes, the overhead of forks is a known issue (unfortunately). But the goal of Hunter is to provide the dependency for the project with all the other dependencies. Otherwise dependency hell breaks loose

More on this topic with detailed explanation why we need forks: https://hunter.readthedocs.io/en/latest/faq/why-do-we-need-forks.html

HiRedis
hiredis

.. index:: HiRedis

Choose a reason for hiding this comment

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

please add the package to at least one of the already listed index-groups

https://hunter.readthedocs.io/en/latest/genindex.html

Redis++
redis

.. index:: Redis++

Choose a reason for hiding this comment

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

please add the package to at least one of the already listed index-groups

https://hunter.readthedocs.io/en/latest/genindex.html

@@ -0,0 +1,16 @@
[

Choose a reason for hiding this comment

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

needed? if not please remove

@@ -0,0 +1,17 @@
[

Choose a reason for hiding this comment

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

needed? if not please remove

@rbsheth
Copy link
Member

rbsheth commented Dec 14, 2022

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