Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fails for --features preserve_order #135

Closed
laktak opened this issue Aug 9, 2016 · 2 comments
Closed

Build fails for --features preserve_order #135

laktak opened this issue Aug 9, 2016 · 2 comments
Labels

Comments

@laktak
Copy link
Contributor

laktak commented Aug 9, 2016

This fails at the moment:

$ cargo build --features preserve_order
   Compiling serde_json v0.8.0 (file:///Users/spark/prj/hjson/hjson-rust/_json/json)
src/value.rs:383:39: 383:48 error: no method named `serialize` found for type `&linked_hash_map::LinkedHashMap<std::string::String, value::Value>` in the current scope
src/value.rs:383             Value::Object(ref v) => v.serialize(serializer),
                                                       ^~~~~~~~~
src/value.rs:383:39: 383:48 note: the method `serialize` exists but the following trait bounds were not satisfied: `linked_hash_map::LinkedHashMap<std::string::String, value::Value> : serde::Serialize`
src/value.rs:467:53: 467:62 error: no method named `visit_map` found for type `linked_hash_map::serde::LinkedHashMapVisitor<_, _>` in the current scope
src/value.rs:467                 let values = try!(MapVisitor::new().visit_map(visitor));
                                                                     ^~~~~~~~~
src/value.rs:467:30: 467:72 note: in this expansion of try! (defined in <std macros>)
src/value.rs:467:53: 467:62 help: items from traits can only be used if the trait is in scope; the following trait is implemented but not in scope, perhaps add a `use` for it:
src/value.rs:467:53: 467:62 help: candidate #1: `use serde::de::Visitor`
error: aborting due to 2 previous errors
error: Could not compile `serde_json`.

Maybe also add it to travis?

@laktak
Copy link
Contributor Author

laktak commented Aug 10, 2016

troplin pointed me in the right direction - linked_hash_map is still using serde 0.7 but no version referencing 0.8 has been released.

@dtolnay
Copy link
Member

dtolnay commented Aug 11, 2016

I released serde_json 0.8.1 containing your fix.

@dtolnay dtolnay added the bug label Aug 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants