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

Don't include config.h from serverassert.h #404

Merged

Conversation

zuiderkwast
Copy link
Contributor

Serverassert is a drop-in replacement of assert. We use it even in code copied from other sources. To make these files usable outside of Valkey, it should be enough to replace the serverassert.h include with <assert.h>. Therefore, this file shouldn't have any dependencies to the rest of the valkey code.

This was mentioned in comments in #350.

Signed-off-by: Viktor Söderqvist <viktor.soderqvist@est.tech>
Signed-off-by: Viktor Söderqvist <viktor.soderqvist@est.tech>
Copy link

codecov bot commented Apr 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 68.37%. Comparing base (b0d5a0f) to head (8b4caf4).

❗ Current head 8b4caf4 differs from pull request most recent head 4d9112d. Consider uploading reports for the commit 4d9112d to get more accurate results

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable     #404      +/-   ##
============================================
+ Coverage     68.33%   68.37%   +0.03%     
============================================
  Files           108      108              
  Lines         61563    61563              
============================================
+ Hits          42072    42096      +24     
+ Misses        19491    19467      -24     

see 14 files with indirect coverage changes

src/serverassert.h Outdated Show resolved Hide resolved
Signed-off-by: Viktor Söderqvist <viktor.soderqvist@est.tech>
@zuiderkwast
Copy link
Contributor Author

This PR number is 404 "File not found" 🤪

@stockholmux

@zuiderkwast zuiderkwast merged commit 89f72bc into valkey-io:unstable May 1, 2024
15 checks passed
@zuiderkwast zuiderkwast deleted the serverassert-no-includes branch May 1, 2024 01:27
PingXie pushed a commit to PingXie/valkey that referenced this pull request May 2, 2024
Serverassert is a drop-in replacement of assert. We use it even in code
copied from other sources. To make these files usable outside of Valkey,
it should be enough to replace the `serverassert.h` include with
`<assert.h>`. Therefore, this file shouldn't have any dependencies to
the rest of the valkey code.

---------

Signed-off-by: Viktor Söderqvist <viktor.soderqvist@est.tech>
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.

None yet

2 participants