Error 'no method named deserialize_newtype_struct' when compiling textnonce #28

Closed
opened 2016-03-22 20:03:59 +13:00 by sras · 2 comments
sras commented 2016-03-22 20:03:59 +13:00 (Migrated from github.com)

Error:

Compiling textnonce v0.2.4
/home/vagrant/rust_projects/hastily.rs/target/debug/build/textnonce-b46a6516de072497/out/lib.rs:97:26: 98:98 error: no method named deserialize_newtype_struct found for type &mut __D in the current scope

Cargo.toml contents

[package]
name = "hastily"
version = "0.1.0"
authors = ["vagrant"]

[dependencies]
hyper = "0.7.2"
rustc-serialize = "0.3"
xml-rs = "0.3"
zip = "0.1"
url = "*"
regex = "0.1"
formdata = { git = "https://github.com/mikedilger/formdata" }

Error: Compiling textnonce v0.2.4 /home/vagrant/rust_projects/hastily.rs/target/debug/build/textnonce-b46a6516de072497/out/lib.rs:97:26: 98:98 error: no method named `deserialize_newtype_struct` found for type `&mut __D` in the current scope Cargo.toml contents [package] name = "hastily" version = "0.1.0" authors = ["vagrant"] [dependencies] hyper = "0.7.2" rustc-serialize = "0.3" xml-rs = "0.3" zip = "0.1" url = "*" regex = "0.1" formdata = { git = "https://github.com/mikedilger/formdata" }
mikedilger commented 2016-03-23 11:48:38 +13:00 (Migrated from github.com)

textnonce works with a range of versions of serde. See https://github.com/mikedilger/textnonce/issues/7

Check your Cargo.lock file for multiple colliding versions of serde and or serde_codegen.

If you find any dependencies on serde 0.6, especially if textnonce is using version 0.6, that will fail. In that case, manually edit Cargo.lock, and copy the serde dependencies from formdata into textnonce dependency.

I may be forced to require textnonce consumers to use serde 0.7 (even though it works with 0.6) because of the cargo bug https://github.com/rust-lang/cargo/issues/2479 but for now please try the above.

`textnonce` works with a range of versions of serde. See https://github.com/mikedilger/textnonce/issues/7 Check your Cargo.lock file for multiple colliding versions of `serde` and or `serde_codegen`. If you find any dependencies on serde 0.6, especially if textnonce is using version 0.6, that will fail. In that case, manually edit Cargo.lock, and copy the serde dependencies from formdata into textnonce dependency. I may be forced to require textnonce consumers to use serde 0.7 (even though it works with 0.6) because of the cargo bug https://github.com/rust-lang/cargo/issues/2479 but for now please try the above.
sras commented 2016-03-25 01:14:01 +13:00 (Migrated from github.com)

There was no such issues in the Cargo.lock file. formdata and textnonce were depending on serde 0.7 version. The issue somehow resolved itself, after I ran a cargo update. Not sure how....

There was no such issues in the Cargo.lock file. formdata and textnonce were depending on serde 0.7 version. The issue somehow resolved itself, after I ran a cargo update. Not sure how....
This discussion has been locked. Commenting is limited to contributors.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
mikedilger/formdata#28
No description provided.