Skip to content

Refactor/use new bitnuc - #102

Merged
noamteyssier merged 7 commits into
mainfrom
refactor/use-new-bitnuc
Aug 13, 2026
Merged

Refactor/use new bitnuc#102
noamteyssier merged 7 commits into
mainfrom
refactor/use-new-bitnuc

Conversation

@noamteyssier

Copy link
Copy Markdown
Collaborator

No description provided.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request updates the bitnuc dependency to version 0.5.1 and introduces bitnuc-deprec (v0.4.1) to maintain compatibility for legacy formats (bq/vbq). In src/cbq/core/block.rs, the sequence encoding and decoding are updated to use the new bitnuc APIs with a byte-native Vec<u8> buffer, while maintaining on-disk compatibility with the legacy u64 layout through padding. Feedback suggests distinguishing the error messages for the legacy and new bitnuc errors in src/error.rs to avoid confusion during debugging.

Comment thread src/error.rs
BitnucError(#[from] bitnuc_deprec::Error),

/// Errors from the bitnuc dependency for nucleotide encoding/decoding (cbq)
#[error("Bitnuc error: {0}")]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

This error message is identical to the one for BitnucError (for the legacy bitnuc-deprec crate). This could cause confusion during debugging, as it's not immediately clear which version of the bitnuc dependency is the source of an error. To improve clarity, consider making the error messages unique. For example, you could change this message and the one for the legacy error to include version numbers or a 'legacy' tag.

Suggested change
#[error("Bitnuc error: {0}")]
#[error("Bitnuc (v0.5.1) error: {0}")]

@noamteyssier
noamteyssier merged commit 415d1de into main Aug 13, 2026
14 checks passed
@noamteyssier
noamteyssier deleted the refactor/use-new-bitnuc branch August 13, 2026 05:12
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.

1 participant