Skip to content

test: replace unmaintained bincode with postcard - #390

Merged
Mec-iS merged 1 commit into
smartcorelib:developmentfrom
seroze:fix/replace-bincode-with-postcard
Aug 9, 2026
Merged

test: replace unmaintained bincode with postcard#390
Mec-iS merged 1 commit into
smartcorelib:developmentfrom
seroze:fix/replace-bincode-with-postcard

Conversation

@seroze

@seroze seroze commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

bincode has been abandoned and its final 3.0.0 release is a poison pill whose entire source is compile_error!("https://xkcd.com/2347/"), which breaks any project Dependabot bumps to it.

bincode was a dev-dependency only, used for serde round-trip assertions in six model tests. Swap it for postcard: actively maintained, no_std + alloc, wasm-friendly, and a pure serde format so the migration is mechanical.

The SVM tests stay on serde_json. postcard is not self-describing and so cannot deserialize the typetag::serde trait objects those models use. Keeping both formats is deliberate: JSON alone would silently accept #[serde(flatten)]/untagged additions that break every binary format users actually persist models with.

Closes #377

Fixes #

Checklist

  • My branch is up-to-date with development branch.
  • Everything works and tested on latest stable Rust.
  • Coverage and Linting have been applied

Current behaviour

New expected behaviour

Change logs

bincode has been abandoned and its final 3.0.0 release is a poison pill
whose entire source is `compile_error!("https://xkcd.com/2347/")`, which
breaks any project Dependabot bumps to it.

bincode was a dev-dependency only, used for serde round-trip assertions in
six model tests. Swap it for postcard: actively maintained, no_std + alloc,
wasm-friendly, and a pure serde format so the migration is mechanical.

The SVM tests stay on serde_json. postcard is not self-describing and so
cannot deserialize the `typetag::serde` trait objects those models use.
Keeping both formats is deliberate: JSON alone would silently accept
`#[serde(flatten)]`/`untagged` additions that break every binary format
users actually persist models with.

Closes smartcorelib#377
@seroze
seroze requested a review from Mec-iS as a code owner August 9, 2026 12:02
@Mec-iS

Mec-iS commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator

I will consider the swap. thanks

@codecov

codecov Bot commented Aug 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 44.05%. Comparing base (70d8a0f) to head (b3e0120).
⚠️ Report is 111 commits behind head on development.

Additional details and impacted files
@@               Coverage Diff               @@
##           development     #390      +/-   ##
===============================================
- Coverage        45.59%   44.05%   -1.55%     
===============================================
  Files               93       95       +2     
  Lines             8034     8047      +13     
===============================================
- Hits              3663     3545     -118     
- Misses            4371     4502     +131     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Mec-iS
Mec-iS merged commit 44510dd into smartcorelib:development Aug 9, 2026
13 of 14 checks passed
Mec-iS added a commit that referenced this pull request Aug 9, 2026
* test(stage-1): fill untested modules + revive serde tests (#392)

Stage 1 of #391. +29 tests (444 -> 473 unit), all gates green.

New tests for previously-untested substantive files:
- linalg/traits/high_order.rs: implement the TODO mod tests covering all
  4 ab() transpose-flag branches, non-square inputs, and matmul/transpose
  equivalence.
- linear/lasso_optimizer.rs: direct tests for InteriorPointOptimizer
  (new() builds ata with correct shape; lambda->0 recovers least squares).
- error/mod.rs: tests for all 6 Failed constructors, all 8 FailedError
  variants, both Display impls, both PartialEq impls, Error trait impl.
- rand_custom.rs: seeded-RNG determinism and None-seed usability.

Revived 6 commented-out serde round-trip tests (migrated serde_json ->
postcard, the post-#390 backend) for LinearRegression, RidgeRegression,
Lasso, ElasticNet, PCA, SVD.

Renamed two copy-paste-misnamed tests:
- dataset::diabetes::boston_dataset -> diabetes_dataset
- algorithm::sort::quick_sort::with_capacity -> quick_argsort

Bump version 0.6.0 -> 0.6.1.

* review(405): address PR feedback — std_rand test, comments, CHANGELOG

- rand_custom.rs: add std_rand_none_seed_uses_os_entropy test gated
  #[cfg(feature = "std_rand")] to cover the StdRg/OS-entropy branch
  of get_rng_impl(None) — closes the std_rand scope gap from #392.
- rand_custom.rs: add inline comment on none_seed_returns_usable_rng
  explaining the #[cfg(not(wasm32))] exclusion (OS entropy unavailable
  on bare wasm).
- high_order.rs: fix ab_true_true comment to (B·A)^T referencing the
  (AB)^T = B^T A^T identity, clarifying ab(true,true) semantics.
- CHANGELOG: note the silent SVD serde-test fix (f32 -> f64 type).
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.

Replace bincode dependency: crate is unmaintained (poison-pill 3.0.0 release)

2 participants