-
Notifications
You must be signed in to change notification settings - Fork 162
Fix issues from #83 #84
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
Conversation
be75558
to
c51e866
Compare
With this branch, I get a number of errors that I didn't get with master just now: warning: proc macro crates and `#[no_link]` crates have no effect without `#[macro_use]`
--> /Users/djc/src/graphql-client/src/lib.rs:11:1
|
11 | pub extern crate graphql_query_derive;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Compiling trackpay v0.1.0 (file:///Users/djc/src/trackpay)
error[E0277]: `create_entity::Currency` doesn't implement `std::fmt::Debug`
--> tests/simple.rs:19:10
|
19 | #[derive(GraphQLQuery)]
| ^^^^^^^^^^^^ `create_entity::Currency` cannot be formatted using `{:?}`
|
= help: the trait `std::fmt::Debug` is not implemented for `create_entity::Currency`
= note: add `#[derive(Debug)]` or manually implement `std::fmt::Debug`
= note: required because of the requirements on the impl of `std::fmt::Debug` for `&create_entity::Currency`
= note: required for the cast to the object type `std::fmt::Debug`
error[E0277]: `create_entity::Currency` doesn't implement `std::fmt::Debug`
--> tests/simple.rs:19:10
|
19 | #[derive(GraphQLQuery)]
| ^^^^^^^^^^^^ `create_entity::Currency` cannot be formatted using `{:?}`
|
= help: the trait `std::fmt::Debug` is not implemented for `create_entity::Currency`
= note: add `#[derive(Debug)]` or manually implement `std::fmt::Debug`
= note: required because of the requirements on the impl of `std::fmt::Debug` for `&create_entity::Currency`
= note: required for the cast to the object type `std::fmt::Debug`
error[E0277]: `create_entity::ResponseData` doesn't implement `std::fmt::Debug`
--> tests/simple.rs:31:29
|
31 | println!("RESULT {:?}", result);
| ^^^^^^ `create_entity::ResponseData` cannot be formatted using `{:?}`
|
= help: the trait `std::fmt::Debug` is not implemented for `create_entity::ResponseData`
= note: add `#[derive(Debug)]` or manually implement `std::fmt::Debug`
= note: required because of the requirements on the impl of `std::fmt::Debug` for `graphql_client::GraphQLResponse<create_entity::ResponseData>`
= note: required by `std::fmt::Debug::fmt`
error: aborting due to 3 previous errors ( |
Actually this now happens with both branches -- which is confusing to me, because I had this working just a few minutes earlier. |
It's a breaking change in the latest master: now you can place arbitrary derives on the generated response types. The only trait derived by default now is |
Regarding the derives, I'm not sure it's the most ergonomic choice. We could have a reasonable set of defaults and allow users to override it instead, but it feels a little bit more magic. |
Alright, at least I have something working now. Thanks for your quick turnaround! |
The CLI is not at a point where it can produce useful error messages.
Credit goes to @djc for the bug report and the solution (see #83).