Pin hts-sys to bindings compatible with rust-htslib 0.46 - #666
Open
SuhasSrinivasan wants to merge 1 commit into
Open
Pin hts-sys to bindings compatible with rust-htslib 0.46#666SuhasSrinivasan wants to merge 1 commit into
SuhasSrinivasan wants to merge 1 commit into
Conversation
This was referenced Aug 6, 2026
Open
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #665.
Summary
hts-systo 2.2.0, whose bindings compile with the existing rust-htslib 0.46.0 dependency.Severity
Severity: High — build reproducibility and development reliability
Rationale: A clean checkout currently fails before modkit can be built or tested. The failure is explicit and cannot corrupt scientific output, but it blocks reproducible development, CI, packaging, and source installation.
Root cause
The workspace does not commit
Cargo.lock. rust-htslib 0.46.0 permits the semver-compatible hts-sys 2.x range beginning at 2.1.1, so a fresh solve now selects hts-sys 2.2.1. Its binding field names and integer types do not match rust-htslib 0.46.0's source, producing ten compile errors. Cargo had no repository-level constraint that retained the known-compatible 2.2.0 bindings.Implementation
Add
hts-sys = "=2.2.0"immediately after rust-htslib inmodkit-core/Cargo.toml, with a one-line reason. Because all rust-htslib users are in the same workspace graph, Cargo unifies them onto one hts-sys 2.2.0 instance.Preserved behavior
Cargo.lockremains ignored and absent from the diff.Non-goals
Cargo.lockor require--lockedin future CI/install workflows.Behavior before and after
cargo check -p mod_kitTesting
Test environment
18ebf054bed61de2ec7553d41fa81a8cc69382267e1b269f9804ff5e99db0420574462a8f8a6a065; clean5cecc3fb3a9336068d9e3c68d5c08d678153dd2c4af98bb22a10b9b65b86e00a4d5831b254fc6aec89fd51931c5aefd2861d0f9a; fixed generated lock SHA-256d370908c0be24430282110489c8002550edd83a1811cf1bdc1dc68f972c01fc8; neither ignored lockfile is in the diffcargo generate-lockfile --offline;cargo tree --offline --locked -i hts-sys;env CARGO_TARGET_DIR=/private/tmp/modkit-u01-parent-public-target cargo check --offline --locked -p mod_kitcargo generate-lockfile --offline;cargo tree --offline --locked -i hts-syscargo check --offline --locked --workspace --all-targets --quietcargo test --workspace --all-targets -- --test-threads=1on the frozen exact headcargo metadata --offline --locked --format-version 1 --no-deps;cargo tree --offline --locked -e features -i hts-sysgit diff --check upstream/master...HEAD; exact ancestry, diff, and clean-worktree checksTests not performed
cargo clippywas not run.cargo fmt --all -- --checkwas run but is not a passing gate: stable rustfmt reports pre-existing formatting differences in unchanged files (modkit/tests/test_bedmethyl_util.rs,modkit-core/src/adjust.rs, andmodkit-core/src/entropy/mod.rs) plus the repository's nightly-only setting warnings. This PR changes only TOML;git diff --checkpasses.Scientific validation
Output and compatibility
Reviewer guide
modkit-core/Cargo.tomldiff and explanatory comment.cargo generate-lockfileandcargo tree -i hts-sys.cargo check --locked --workspace --all-targetsusing the fixed generated lockfile.Cargo.lockand enforce--lockedworkflows.Checklist