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

Type ID extension #68

Merged
merged 13 commits into from
Feb 4, 2025
Merged

Type ID extension #68

merged 13 commits into from
Feb 4, 2025

Conversation

Rexios80
Copy link
Member

@Rexios80 Rexios80 commented Jan 17, 2025

Resolves #67

Adds an internal type ID to inform Hive to read the next 2 bytes as the real type ID
Hive uses this type ID when the given type ID is greater than the current max value of 255

Here is a representation of how the new IDs are handled
image

Copy link

codecov bot commented Jan 17, 2025

Codecov Report

Attention: Patch coverage is 98.14815% with 1 line in your changes missing coverage. Please review.

Project coverage is 93.48%. Comparing base (b5b8346) to head (dd30829).
Report is 14 commits behind head on main.

Files with missing lines Patch % Lines
hive/lib/src/binary/binary_writer_impl.dart 96.77% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #68      +/-   ##
==========================================
- Coverage   93.57%   93.48%   -0.09%     
==========================================
  Files          44       44              
  Lines        1976     1966      -10     
==========================================
- Hits         1849     1838      -11     
- Misses        127      128       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

@vladimirdimov11 vladimirdimov11 left a comment

Choose a reason for hiding this comment

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

Overall looks good. There is a single codecov warning but I'm not sure you need to handle it at all.

hive/lib/src/binary/binary_reader_impl.dart Outdated Show resolved Hide resolved
@Rexios80
Copy link
Member Author

The codecov warning is for a line that is impossible to actually hit, but it makes the type checker happy

@Rexios80
Copy link
Member Author

@vladimirdimov11 I apologize for the delay. The original Hive maintainer has returned from his hiatus, and I need to investigate how this affects Hive CE, if at all.

@vladimirdimov11
Copy link

@Rexios80 thanks for the info. I was just started wondering if my approve isn't visible on the PR

@Rexios80 Rexios80 merged commit 6e8f715 into main Feb 4, 2025
23 checks passed
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.

Allow more than 223 typeIds
2 participants