Delete the `obipipeline` crate and update all dependent crates to use the
published `obipipeline` version 0.2 from the `obi` registry. Migrate
specific pipeline logic into consuming crates: move error handling to
`obikindexer` and batch iteration logic to `obiskio`. Update build
scripts to support MSRV checking and improved dependency management.
- Delete `src/obipipeline/` entirely, removing the pipeline runtime,
scheduler, macros, and throttle implementations.
- Move `fmt` (now `pipeline_error`) from `obipipeline` error handling to
`src/obikindexer/src/graph_pipeline.rs` for graph building errors.
- Move `apply` (now `iter_canonical_kmer_batches_owned`) from
`obipipeline` pipe logic to `src/obiskio/src/unitig_index/reader.rs`
to provide lazy batch iteration for canonical kmers.
- Update `src/obikindexer`, `src/obikmerge`, `src/obikphylo`, and
`src/obiskim` to depend on `obipipeline` version 0.2 from the `obi`
registry instead of the local path.
- Refactor `src/obikindexer/src/graph_pipeline.rs` to use the new
`pipeline_error` function and update `build_graph` to accept an
iterator-returning `open` function.
- Refactor `src/obikmerge` to use `iter_canonical_kmer_batches_owned`
for streaming batches in `merge_partition` and `run_pass2`, replacing
previous pipeline stage logic.
- Refactor `src/obikphylo` to handle errors via `OKIError::InvalidData`
in `build_layer_sibling_annex` and `scan_layer_families`.
- Refactor `src/obiskim` to use `.expect("pipeline error")` for batch
processing in `query` and `superkmer` commands.
- Add `src/obiskio/src/unitig_index/reader.rs` method
`iter_canonical_kmer_batches_owned` for lazy batch iteration.
- Add `.crate-kit/scripts/msrv-check.sh` to verify the declared
`rust-version` builds successfully with the specified toolchain.
- Update `.crate-kit/scripts/deps-check.sh` and `deps-lib.sh` to
support `cargo update` with specific arguments and improved lockfile
handling.
- Update `.crate-kit/scripts/bump-version.sh` to use `sed -E` for
robust version string replacement in `README.md`.
- Update `.crate-kit/scripts/publish-guard.sh` and `publish.sh` to
enforce registry settings and exclude internal files from packages.
- Update `.gitea/workflows/release.yml` to pass the private cargo
registry index environment variable during macOS binary builds.
- Remove `Cargo.lock` from the repository root and update
`src/Cargo.lock` to reflect the new `obipipeline` dependency version.
- Update `src/Cargo.toml` workspace members to remove `obikseq` and
add `obifastwrite`.
29 lines
1.4 KiB
Bash
Executable File
29 lines
1.4 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Checks the `rust-version` declared in Cargo.toml. It is a guarantee ("this crate builds with that toolchain"),
|
|
# so it must name a toolchain that is INSTALLED here and on which the crate really passes `cargo check`:
|
|
# a version nobody tested is a promise nobody can keep.
|
|
# - no rust-version: nothing to check (exit 0);
|
|
# - rust-version but no matching installed toolchain: refused, with the command to install it;
|
|
# - otherwise `cargo +<toolchain> check --all-targets` must pass.
|
|
# The toolchain is matched on the version as written: "1.100" matches 1.100.x, "1.100.0" matches only 1.100.0.
|
|
set -euo pipefail
|
|
. "$(dirname "$0")/common.sh"
|
|
|
|
[ -f "$CARGO_TOML" ] || exit 0
|
|
ver=$(sed -nE 's/^rust-version[[:space:]]*=[[:space:]]*"([^"]+)".*/\1/p' "$CARGO_TOML" | head -n 1)
|
|
[ -n "$ver" ] || exit 0
|
|
|
|
if ! command -v rustup >/dev/null; then
|
|
err "✗ rust-version = \"$ver\" but rustup is absent: the claim cannot be tested here"
|
|
exit 1
|
|
fi
|
|
pat="^$(printf '%s' "$ver" | sed 's/\./\\./g')(\\.[0-9]+)?-"
|
|
tc=$(rustup toolchain list | awk '{print $1}' | grep -E "$pat" | head -n 1 || true)
|
|
if [ -z "$tc" ]; then
|
|
err "✗ rust-version = \"$ver\": no such toolchain installed, so it cannot be tested."
|
|
err " Install it (rustup toolchain install $ver) and re-run, or declare a version that is installed."
|
|
exit 1
|
|
fi
|
|
info "→ Checking the code with toolchain $tc (rust-version = \"$ver\")..."
|
|
"$CARGO" "+$tc" check --all-targets
|