diff --git a/CHANGELOG.md b/CHANGELOG.md index 34851869..d0d90e4e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project follows [Semantic Versioning](https://semver.org/). ## [Unreleased] +### Changed + +- **BREAKING:** The serialized `Preconditioner` wire format changed (v12 → v13) with the `approx-chol` 0.4 → 0.5 bump; 0.3.0 bytes no longer decode. + ### Fixed - A design carrying varying slopes on two distinct factors could fail preconditioner construction with `matrix is not symmetric`, when rounding left the two triangles of the exact Schur complement unequal (#229). diff --git a/Cargo.lock b/Cargo.lock index 21cdd58e..2d272ab3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -25,9 +25,9 @@ checksum = "940b3a0ca603d1eade50a4846a2afffd5ef57a9feac2c0e2ec2e14f9ead76000" [[package]] name = "approx-chol" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ceecf5e5bb6136d3c335eec5aac88f17b284b68e22d710ebeec66417fa410830" +checksum = "affa21d606ec089747ab3ef1baff8feac12b5c115e42d4451b01668c9acded56" dependencies = [ "num-traits", "rand 0.10.2", diff --git a/crates/within/Cargo.toml b/crates/within/Cargo.toml index aff769f6..97b48c75 100644 --- a/crates/within/Cargo.toml +++ b/crates/within/Cargo.toml @@ -12,7 +12,7 @@ categories.workspace = true [dependencies] schwarz-precond = { workspace = true, features = ["serde"] } -approx-chol = { version = "0.4.0", features = ["serde"] } +approx-chol = { version = "0.5.0", features = ["serde"] } serde = { workspace = true, features = ["rc"] } postcard.workspace = true ndarray = "0.17" diff --git a/crates/within/tests/fixtures/preconditioner_v11.postcard b/crates/within/tests/fixtures/preconditioner_v11.postcard deleted file mode 100644 index 845123af..00000000 Binary files a/crates/within/tests/fixtures/preconditioner_v11.postcard and /dev/null differ diff --git a/crates/within/tests/fixtures/preconditioner_v13.postcard b/crates/within/tests/fixtures/preconditioner_v13.postcard new file mode 100644 index 00000000..6f8e07a2 Binary files /dev/null and b/crates/within/tests/fixtures/preconditioner_v13.postcard differ diff --git a/crates/within/tests/wire_format_fixture.rs b/crates/within/tests/wire_format_fixture.rs index 1c708114..d7f9865d 100644 --- a/crates/within/tests/wire_format_fixture.rs +++ b/crates/within/tests/wire_format_fixture.rs @@ -5,9 +5,9 @@ use within::{Effect, LsmrOptions, Preconditioner, PreconditionerConfig, Solver}; -const WIRE_FORMAT_VERSION: u32 = 12; -const PRECOND_BYTES: &[u8] = include_bytes!("fixtures/preconditioner_v12.postcard"); -const PRE_BUMP_BYTES: &[u8] = include_bytes!("fixtures/preconditioner_v11.postcard"); +const WIRE_FORMAT_VERSION: u32 = 13; +const PRECOND_BYTES: &[u8] = include_bytes!("fixtures/preconditioner_v13.postcard"); +const PRE_BUMP_BYTES: &[u8] = include_bytes!("fixtures/preconditioner_v12.postcard"); fn fixture_problem() -> (Vec, Vec, Vec, Vec) { // The frustrated (f-slope, g) pair pins a signed operator with Scaled coords and a Cover. @@ -96,7 +96,7 @@ fn pre_bump_fixture_no_longer_decodes() { } /// Generate the wire-format fixture. Run with `--ignored` to overwrite -/// `crates/within/tests/fixtures/preconditioner_v12.postcard`. Intended for +/// `crates/within/tests/fixtures/preconditioner_v13.postcard`. Intended for /// intentional wire-format bumps only; CI runs the non-ignored tests above. #[test] #[ignore] @@ -117,7 +117,7 @@ fn regenerate_wire_format_fixture() { let bytes = postcard::to_stdvec(prec).expect("serialize"); let mut path = PathBuf::from(env!("CARGO_MANIFEST_DIR")); - path.push("tests/fixtures/preconditioner_v12.postcard"); + path.push("tests/fixtures/preconditioner_v13.postcard"); let mut out = std::fs::File::create(&path).expect("create fixture file"); out.write_all(&bytes).expect("write fixture bytes"); eprintln!("wrote {} bytes to {}", bytes.len(), path.display());