dtolnay / erased-serde

Type-erased Serialize, Serializer and Deserializer traits
Apache License 2.0
709 stars 36 forks source link

Update to Serde 1.0 #4

Closed dtolnay closed 7 years ago

nbigaouette-eai commented 7 years ago

I'm stucked at serde 0.9 until ndarray gets updated too (see https://github.com/bluss/rust-ndarray/issues/314). Could a version for 0.9 be released too?

dtolnay commented 7 years ago

There are no difficult differences between 0.9 and 1.0 so I might as well do both. The difficult upgrade for erased-serde is 0.8 to 0.9.

nbigaouette-eai commented 7 years ago

That would be awesome thank you!

nbigaouette-eai commented 7 years ago

I must say I'm quite lost at trying this; 192 errors just trying to build the tests after changing the toml to serde 0.9 and serde_cbor 0.5...

dtolnay commented 7 years ago

Yes it requires a redesign. If you are attempting the upgrade, it will probably be easier to start from scratch than from the 0.8 approach.

nbigaouette-eai commented 7 years ago

wow ok... So that's way above my head... :P

nbigaouette-eai commented 7 years ago

So until this is implemented, is there another way to serialize/deserialize a trait object?

https://github.com/serde-rs/serde/issues/384 was closed with a reference to this crate...

dtolnay commented 7 years ago

I implemented serialization for serde 0.9 in b490bd10774010edf9e7def1a11182d9979efb9c. Working on deserialization for 0.9 next.

dtolnay commented 7 years ago

I got serde 0.9 working here and serde 1.0 here. Give it a try! I will aim to get releases out this week.

sfackler commented 7 years ago

Wow, I had no idea that was going to be possible!

dtolnay commented 7 years ago

I released the serde 0.9 version as erased-serde 0.2.0 and the serde 1.0 version as erased-serde 0.3.0.