dimforge / nalgebra

Linear algebra library for Rust.
https://nalgebra.org
Apache License 2.0
3.98k stars 475 forks source link

Serde serialization breakage #320

Closed jswrenn closed 5 years ago

jswrenn commented 6 years ago

This library upgraded to serde 1.0 in #245. However, the @rust-num crates have yet to upgrade to serde 1.0 (this upgrade is tracked by rust-num/num#357). This breaks serde serialization for all nalgebra types that make direct use of @rust-num's container structures, namely Complex, which is used by nalgebra's UnitComplex, which is used by Isometry2.

(I imagine this may also affect some of nalgebra's dependent crates, like ncollide and nphysics, too.)

Unfortunately, I don't think there's much that can be done in nalgebra about this other than wait for rust-num/num#357. Since this is a breaking change for @rust-num crates, it will require a major version number bump for num, and for a full fix we will need to coordinate an upgrade of nalgebra's dependencies that depend on num, namely alga.

ThomasdenH commented 5 years ago

What is the status here? The PR in num has landed and the new version released.

sebcrozet commented 5 years ago

This is fixed as we already depend on num 0.2. I'll add some tests before closing this.

ThomasdenH commented 5 years ago

I see. I was hoping this would fix this PR: https://github.com/ThomasdenH/casimir-fdfd/pull/8.

sebcrozet commented 5 years ago

@ThomasdenH It seems your pipeline is failing because of rand, which is unrelated to serialization.

ThomasdenH commented 5 years ago

The PR just changes the nalgebra version. Should I open an issue in this repository or ask somewhere else?

Edit: Removing Cargo.lock before the build solved the problem.

sebcrozet commented 5 years ago

Edit: Removing Cargo.lock before the build solved the problem.

Now that you mention it, you probably had mismatching versions of rand on your Cargo.lock. So removing Cargo.lock or calling cargo update was the right thing to do!