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

unresolved name form_urlencoded::serialize [E0425] #23

Closed
oleid opened this issue Apr 23, 2016 · 2 comments
Closed

unresolved name form_urlencoded::serialize [E0425] #23

oleid opened this issue Apr 23, 2016 · 2 comments
Assignees
Labels

Comments

@oleid
Copy link

oleid commented Apr 23, 2016

I'm trying to compile google-drive3, but the build stops building one of it's dependencies -- yup-oauth2 -- using rustc-1.8 on debian testing. Any idea what might be wrong?

[cut1]/out/lib.rs:189:17: 189:43 error: unresolved name `form_urlencoded::serialize` [E0425]
[cut1]/out/lib.rs:189                 form_urlencoded::serialize(&[("client_id", client_id),
                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~
[cut0]//src/lib.rs:71:1: 71:47 note: in this expansion of include!
[cut1]/out/lib.rs:189:17: 189:43 help: run `rustc --explain E0425` to see a detailed explanation
[cut1]/out/lib.rs:588:17: 588:43 error: unresolved name `form_urlencoded::serialize` [E0425]
[cut1]/out/lib.rs:588                 form_urlencoded::serialize(&[("client_id", &self.id[..]),
                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~
[cut0]//src/lib.rs:71:1: 71:47 note: in this expansion of include!
[cut1]/out/lib.rs:588:17: 588:43 help: run `rustc --explain E0425` to see a detailed explanation
[cut1]/out/lib.rs:865:17: 865:43 error: unresolved name `form_urlencoded::serialize` [E0425]
[cut1]/out/lib.rs:865                 form_urlencoded::serialize(&[("client_id", client_id),
                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~
[cut0]//src/lib.rs:71:1: 71:47 note: in this expansion of include!
[cut1]/out/lib.rs:865:17: 865:43 help: run `rustc --explain E0425` to see a detailed explanation
[cut1]/out/lib.rs:194:160: 194:164 error: the type of this value must be known in this context
[cut1]/out/lib.rs:194                 match self.client.borrow_mut().post(FlowType::Device.as_ref()).header(ContentType("application/x-www-form-urlencoded".parse().unwrap())).body(&*req).send()
                                                                                                                                                                                    ^~~~
[cut0]//src/lib.rs:71:1: 71:47 note: in this expansion of include!
[cut1]/out/lib.rs:524:25: 524:58 error: the type of this value must be known in this context
[cut1]/out/lib.rs:524                         res.read_to_string(&mut json_str).unwrap();
                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[cut0]//src/lib.rs:71:1: 71:47 note: in this expansion of include!
[cut1]/out/lib.rs:594:151: 594:155 error: the type of this value must be known in this context
[cut1]/out/lib.rs:594                 match self.client.borrow_mut().post(GOOGLE_TOKEN_URL).header(ContentType("application/x-www-form-urlencoded".parse().unwrap())).body(&*req).send()
                                                                                                                                                                           ^~~~
[cut0]//src/lib.rs:71:1: 71:47 note: in this expansion of include!
[cut1]/out/lib.rs:602:25: 602:58 error: the type of this value must be known in this context
[cut1]/out/lib.rs:602                         res.read_to_string(&mut json_str).unwrap();
                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[cut0]//src/lib.rs:71:1: 71:47 note: in this expansion of include!
[cut1]/out/lib.rs:593:17: 593:25 error: the trait `core::marker::Sized` is not implemented for the type `str` [E0277]
[cut1]/out/lib.rs:593             let json_str =
                                      ^~~~~~~~
[cut0]//src/lib.rs:71:1: 71:47 note: in this expansion of include!
[cut1]/out/lib.rs:593:17: 593:25 help: run `rustc --explain E0277` to see a detailed explanation
[cut1]/out/lib.rs:593:17: 593:25 note: `str` does not have a constant size known at compile-time
[cut1]/out/lib.rs:593:17: 593:25 note: all local variables must have a statically known size
[cut1]/out/lib.rs:871:151: 871:155 error: the type of this value must be known in this context
[cut1]/out/lib.rs:871                 match self.client.borrow_mut().post(GOOGLE_TOKEN_URL).header(ContentType("application/x-www-form-urlencoded".parse().unwrap())).body(&*req).send()
                                                                                                                                                                           ^~~~
[cut0]//src/lib.rs:71:1: 71:47 note: in this expansion of include!
[cut1]/out/lib.rs:879:25: 879:58 error: the type of this value must be known in this context
[cut1]/out/lib.rs:879                         res.read_to_string(&mut json_str).unwrap();
                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[cut0]//src/lib.rs:71:1: 71:47 note: in this expansion of include!
[cut1]/out/lib.rs:870:17: 870:25 error: the trait `core::marker::Sized` is not implemented for the type `str` [E0277]
[cut1]/out/lib.rs:870             let json_str =
                                      ^~~~~~~~
[cut0]//src/lib.rs:71:1: 71:47 note: in this expansion of include!
[cut1]/out/lib.rs:870:17: 870:25 help: run `rustc --explain E0277` to see a detailed explanation
[cut1]/out/lib.rs:870:17: 870:25 note: `str` does not have a constant size known at compile-time
[cut1]/out/lib.rs:870:17: 870:25 note: all local variables must have a statically known size
@Byron Byron self-assigned this Apr 24, 2016
@Byron Byron added this to the 1.0.0 milestone Apr 24, 2016
@Byron
Copy link
Collaborator

Byron commented Apr 24, 2016

So far, I have been seeing this issue only when trying to compile it directly - it used to work when doing it through google-apis-rs.

However, the issue is reproducible and must be fixed here. In short, it's related to requiring a specific version of serde to workaround a bug in serde-0.7 which causes most of the google-apis to abort compilation.
The serde-dependency turned out to be an absolute nightmare, and currently is way above my head.

@dermesser
Copy link
Owner

I think I know why this happens -- Cargo.toml says url >= 0.5, but there was an update to url recently, bumping to 1.0. This broke compatibility. I'm preparing a PR right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants