Skip to content

fix: add release_header dependency to valkey-cli and valkey-benchmark [fj4WqyCCw3C5ShR1RfB7MoBPTpkRrBFYP1uT35g3MvT] - #4540

Open
waterWang wants to merge 1 commit into
valkey-io:9.1from
waterWang:fix/cmake-release-header-9.1
Open

fix: add release_header dependency to valkey-cli and valkey-benchmark [fj4WqyCCw3C5ShR1RfB7MoBPTpkRrBFYP1uT35g3MvT]#4540
waterWang wants to merge 1 commit into
valkey-io:9.1from
waterWang:fix/cmake-release-header-9.1

Conversation

@waterWang

Copy link
Copy Markdown

Fixes #4538.

The valkey-cli and valkey-benchmark targets both compile release.c, which #includes the generated release.h, but neither declares a dependency on the release_header custom target that generates it. Only valkey-server declares that dependency in src/CMakeLists.txt.

Under parallel make (make -jN, N > 1), compilation of release.c for the cli and benchmark targets can start before mkreleasehdr.sh produces release.h, causing intermittent fatal error: 'release.h' file not found.

This adds add_dependencies(valkey-cli release_header) and add_dependencies(valkey-benchmark release_header), matching the dependency pattern already applied on the unstable branch.

The valkey-cli and valkey-benchmark targets compile release.c, which
#includes the generated release.h, but neither declares a dependency on
the release_header custom target. Under parallel make (-jN) the
compilation of release.c can start before mkreleasehdr.sh produces
release.h, causing intermittent 'fatal error: release.h file not found'.

Only valkey-server declared the release_header dependency. Add it for
valkey-cli and valkey-benchmark as well, matching the dependency pattern
already applied on the unstable branch.

Closes valkey-io#4538

Signed-off-by: waterWang <waterWang@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Aug 28, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 67495f9f-dddb-4fe0-9af7-71cec8cb2a2f

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Comment thread src/CMakeLists.txt
valkey_build_and_install_bin(valkey-cli "${VALKEY_CLI_SRCS}" "${VALKEY_SERVER_LDFLAGS}" "${CLI_LIBS}" "redis-cli")
add_dependencies(valkey-cli generate_commands_def)
add_dependencies(valkey-cli generate_fmtargs_h)
add_dependencies(valkey-cli release_header)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Since all Valkey binary targets are defined using the macro: valkey_build_and_install_bin (which itself is defined in cmake/Modules/ValkeySetup.cmake) - it makes sense to add the dependency in that macro (we will also need to move that macro after the declaration of the custom target release_header). WDYT?

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.

2 participants