test: replace unmaintained bincode with postcard - #390
Merged
Mec-iS merged 1 commit intoAug 9, 2026
Conversation
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
Collaborator
|
I will consider the swap. thanks |
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
Mec-iS
approved these changes
Aug 9, 2026
6 tasks
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).
5 tasks
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.
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::serdetrait objects those models use. Keeping both formats is deliberate: JSON alone would silently accept#[serde(flatten)]/untaggedadditions that break every binary format users actually persist models with.Closes #377
Fixes #
Checklist
Current behaviour
New expected behaviour
Change logs