{"action":"created","issue":{"url":"https://api.github.com/repos/graphql-rust/graphql-client/issues/176","repository_url":"https://api.github.com/repos/graphql-rust/graphql-client","labels_url":"https://api.github.com/repos/graphql-rust/graphql-client/issues/176/labels{/name}","comments_url":"https://api.github.com/repos/graphql-rust/graphql-client/issues/176/comments","events_url":"https://api.github.com/repos/graphql-rust/graphql-client/issues/176/events","html_url":"https://github.com/graphql-rust/graphql-client/issues/176","id":371801731,"node_id":"MDU6SXNzdWUzNzE4MDE3MzE=","number":176,"title":"Problem with Rust 2018 Edition (attribute `serde` is currently unknown)","user":{"login":"aergonaut","id":284007,"node_id":"MDQ6VXNlcjI4NDAwNw==","avatar_url":"https://avatars0.githubusercontent.com/u/284007?v=4","gravatar_id":"","url":"https://api.github.com/users/aergonaut","html_url":"https://github.com/aergonaut","followers_url":"https://api.github.com/users/aergonaut/followers","following_url":"https://api.github.com/users/aergonaut/following{/other_user}","gists_url":"https://api.github.com/users/aergonaut/gists{/gist_id}","starred_url":"https://api.github.com/users/aergonaut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aergonaut/subscriptions","organizations_url":"https://api.github.com/users/aergonaut/orgs","repos_url":"https://api.github.com/users/aergonaut/repos","events_url":"https://api.github.com/users/aergonaut/events{/privacy}","received_events_url":"https://api.github.com/users/aergonaut/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-10-19T04:20:28Z","updated_at":"2018-10-19T06:35:33Z","closed_at":null,"author_association":"NONE","body":"I'm trying to use this crate in my Rust 2018 Edition project and I'm running into an issue that's preventing my code from compiling.\r\n\r\nThe error message I get from `cargo build` is:\r\n\r\n```\r\nerror[E0658]: The attribute `serde` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642)\r\n --> src/commands.rs:9:10\r\n  |\r\n9 | #[derive(GraphQLQuery)]\r\n  |          ^^^^^^^^^^^^\r\n  |\r\n  = help: add #![feature(custom_attribute)] to the crate attributes to enable\r\n```\r\n\r\nMy code looks roughly like this:\r\n\r\n```rust\r\nuse failure::err_msg;\r\nuse failure::Error;\r\nuse graphql_client::GraphQLQuery;\r\nuse log::info;\r\nuse serde_derive::{Deserialize, Serialize};\r\n\r\n#[derive(GraphQLQuery)]\r\n#[graphql(\r\n    schema_path = \"github_schema.json\",\r\n    query_path = \"src/graphql/pull_request_query.graphql\"\r\n)]\r\nstruct PullRequestQuery;\r\n```\r\n\r\nI tried adding `#[derive(Deserialize, Serialize)]` to the `PullRequestQuery` struct, but that didn't seem to change anything.\r\n\r\nI'm not sure how else to debug this or how else to search for info about this. I noticed the examples are all written in Rust 2015 Edition, so I'm wondering if the crate isn't compatible with Rust 2018 Edition?"},"comment":{"url":"https://api.github.com/repos/graphql-rust/graphql-client/issues/comments/431259839","html_url":"https://github.com/graphql-rust/graphql-client/issues/176#issuecomment-431259839","issue_url":"https://api.github.com/repos/graphql-rust/graphql-client/issues/176","id":431259839,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMTI1OTgzOQ==","user":{"login":"tomhoule","id":13155277,"node_id":"MDQ6VXNlcjEzMTU1Mjc3","avatar_url":"https://avatars2.githubusercontent.com/u/13155277?v=4","gravatar_id":"","url":"https://api.github.com/users/tomhoule","html_url":"https://github.com/tomhoule","followers_url":"https://api.github.com/users/tomhoule/followers","following_url":"https://api.github.com/users/tomhoule/following{/other_user}","gists_url":"https://api.github.com/users/tomhoule/gists{/gist_id}","starred_url":"https://api.github.com/users/tomhoule/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomhoule/subscriptions","organizations_url":"https://api.github.com/users/tomhoule/orgs","repos_url":"https://api.github.com/users/tomhoule/repos","events_url":"https://api.github.com/users/tomhoule/events{/privacy}","received_events_url":"https://api.github.com/users/tomhoule/received_events","type":"User","site_admin":false},"created_at":"2018-10-19T06:35:33Z","updated_at":"2018-10-19T06:35:33Z","author_association":"MEMBER","body":"I have had the same problem and fixed it the same way so far. One way that could work with both editions would be adding `use serde_derive::*` to all generated modules. On 2015 it should do nothing, and in 2018 it imports the derive. I will try to do this when I find the time but if anyone wants to tackle this first feel free to do so :)"}}
{"actor":{"display_login":"tomhoule"}}