Skip to content

Fix all build warnings both in the main code and tests #149

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

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

tarasbob
Copy link

@tarasbob tarasbob commented Jun 7, 2025

Description

We fix all the warnings in both tests and the main code.
We also set the build system to treat all warnings as errors for the main code.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Performance improvement
  • Code refactoring
  • Other (please describe):

Closes #
This should fix issue #96, maybe #108 partially, and #103

Testing

  • Unit tests added/updated
  • Integration tests added/updated
  • Manual testing performed

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • My changes generate no new warnings

Additional Notes

Some commened out code has been removed. If the code will be necessary in the future it's best practice to remove
it to keep the codebase cleanc until the code is actually necessary. That's the whole point of using version a
version control system like Git.

In this commit we are also set it to treat all warnings as errors.
This is done both in tests and in the main code.
@suxatcode
Copy link

Awesome, thank you so much. Would love to see this merged. 💯

Copy link

@suxatcode suxatcode left a comment

Choose a reason for hiding this comment

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

LGTM

Looks like you really put some thought into each warning, thank you so much!

@@ -1725,8 +1597,6 @@ fn test_add_e_with_dup_flag() {
fn test_add_n_parallel() {

Choose a reason for hiding this comment

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

Was wondering if this test should rather be a #[bench] instead?

@xav-db
Copy link
Member

xav-db commented Jun 8, 2025

Will look at this, this evening, I think there will be some merge conflicts from downstream changes

@tarasbob
Copy link
Author

tarasbob commented Jun 9, 2025

I can fix all the conflicts, but can we merge this as soon as possible? Because the more other changes are merged, the more conflicts there will be because this pull request touches so many files. What do you guys think?

@xav-db xav-db changed the base branch from main to dev June 10, 2025 01:00
@xav-db
Copy link
Member

xav-db commented Jun 10, 2025

im hesitant to merge this because so much of the code is still unstable and much of it will likely change. I understand the point of wanting to get rid of warnings but I think this is best left to once the core structure is stabilised. as future merges are made we will make an effort to reduce warnings, not have unused variables or imports.

@tarasbob
Copy link
Author

I would strongly recommmend to merge this as soon as possible. I also enabled treating warnings as errors. This is a very good practice and I enabled this wherever I could. My next pull request would be to fix all the clippy errors. I would suggest that any clippy issues are treated as errors as well. With this approach, your code would stay extemely clean all the time. This kind of rigour is required when building databases (based on my experience).

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