-
Notifications
You must be signed in to change notification settings - Fork 79
Make dump tables operations const. #1337
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
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1337 +/- ##
==========================================
- Coverage 93.85% 93.83% -0.02%
==========================================
Files 26 26
Lines 22349 22344 -5
Branches 1060 1060
==========================================
- Hits 20975 20967 -8
- Misses 1340 1343 +3
Partials 34 34
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
|
Looks great, thanks for this @molpopgen. I'd be inclined to do a "hard break" here by removing the What do you think? |
I know I originally suggested the flag, as a way to avoid any breakage, but now thinking about it I think it will be such a rare thing that it isn't worth the complexity. |
|
Sounds good. I'll undo the new flag, remove the old, etc.. |
jeromekelleher
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thanks @molpopgen. Some minor tweaks to the tests and we're good to merge.
We should also update the CHANGELOG, since this is an API and semantics breaking change.
c/tests/test_tables.c
Outdated
| unlink(_tmp_file_name); | ||
| errno = 0; | ||
|
|
||
| /* Trying to dump without first sorting fails */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should be able to dump and load the unsorted tables without problems. Can just change the test to asserting ret is 0.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is taken care of.
c/tests/test_tables.c
Outdated
| /* Trying to dump without first sorting fails */ | ||
| ret = tsk_table_collection_dump(&t1, _tmp_file_name, 0); | ||
| CU_ASSERT_EQUAL_FATAL(ret, TSK_ERR_EDGES_NOT_SORTED_PARENT_TIME); | ||
| /* ret = tsk_table_collection_dump(&t1, _tmp_file_name, 0); */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stray comments here
|
Looks great @molpopgen - just need to delete a few stray comments and squash |
* API/behaviour change: remove TSK_NO_BUILD_INDEXES
|
@jeromekelleher -- I think this is ready. Go ahead and merge! |
|
Sorry, meant to check this over earlier, but LGTM too! Thanks @molpopgen |
Fixes #1327
PR Checklist: