-
Notifications
You must be signed in to change notification settings - Fork 164
doctest: Fix regression after upgrade of reqwest to 0.10. #351
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
doctest: Fix regression after upgrade of reqwest to 0.10. #351
Conversation
This was introduced in graphql-rust#350. Besides this, my thanks for upgrading reqwest. The old version cost me some time yesterday.
Might make sense to provide some CHANGELOG info, how to upgrade to the newest version. The diagnostics are pretty good (it says "use await") but it bears repeating. Upgrading to the newest version of
|
Two more regressions
❯ cargo run --example github graphql-rust/graphql-client
Updating crates.io index
Compiling pin-project-internal v1.0.2
Compiling graphql-introspection-query v0.1.0 (/Users/user/src/tmp/graphql-client/graphql-introspection-query)
Compiling graphql_client_codegen v0.9.0 (/Users/user/src/tmp/graphql-client/graphql_client_codegen)
Compiling graphql_query_derive v0.9.0 (/Users/user/src/tmp/graphql-client/graphql_query_derive)
Compiling pin-project v1.0.2
Compiling futures-util v0.3.8
Compiling graphql_client v0.9.0 (/Users/user/src/tmp/graphql-client/graphql_client)
Compiling h2 v0.2.7
Compiling hyper v0.13.9
Compiling hyper-tls v0.4.3
Compiling reqwest v0.10.8
Compiling graphql_query_github_example v0.1.0 (/Users/user/src/tmp/graphql-client/examples/github)
Finished dev [unoptimized + debuginfo] target(s) in 35.09s
Running `target/debug/examples/github graphql-rust/graphql-client`
Error: error decoding response body: expected value at line 2 column 1
Caused by:
expected value at line 2 column 1 EDIT: Here's the Response I get. Note that the only difference is the git ref I use.
Diff to generate the context (in github.rs):
|
Reproducer is here: https://github.com/siedentop/graphql-reproducer Error I get with that:
|
Thank you for investigating the regression!
You have a mismatch of I am still looking into the |
EDIT: The below is wrong. My mistake, keeping the I found it. It's newline characters in the serialization. Repro with curl:
|
Found it. (For real this time ;) ) Put this in to debug:
How to fix your code: Use // Old version: let client = reqwest::blocking::Client::new()
let client = reqwest::blocking::Client::builder()
.user_agent("graphql-rust/0.9.0")
.build()?; Release notes in reqwest:
|
Also some minor cleanup (Table and using `error_for_status()`)
No idea whence this came. ¯\_(ツ)_/¯ Wasn't present in graphql-rust#350 and this branch does not touch anything there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
@siedentop I would wait for #338 before adding more examples with custom clients. Also I am a bit reluctant to add code when there is so little resources for maintenance. But I would definitely accept a good PR :) |
Thank you for fixing the regression introduced by my MR. |
This was introduced in #350. Besides this, my thanks for upgrading
reqwest. The old version cost me some time yesterday.
I do not know why CI did not catch this. Maybe something for the maintainers to
take a look at. Or I made a mistake in my setup.
Below is the error I got: