Update juniper_codegen for syn 1.0.60 (#861)
* Update juniper_codegen for syn 1.0.60 syn 1.0.60 has updated it's `Type::__Nonexhaustive` to `Type::TestExhaustive`, breaking juniper. This updates juniper to use the recommended idiom for doing exhaustive matching on `Type`, which fixes this. Not entirely clear if we need exhaustive matching here or if we could just use a fallback, but this fixes the build at least. Also updated the minimum syn so users have to pull it in * Update example to use relative deps As otherwise CI fails on this branch
This commit is contained in:
parent
2c9c172252
commit
824cd4081b
4 changed files with 14 additions and 11 deletions
|
@ -13,5 +13,5 @@ serde = { version = "1.0", features = ["derive"] }
|
||||||
serde_json = "1.0"
|
serde_json = "1.0"
|
||||||
tokio = { version = "0.2", features = ["rt-core", "macros", "stream"] }
|
tokio = { version = "0.2", features = ["rt-core", "macros", "stream"] }
|
||||||
|
|
||||||
juniper = { git = "https://github.com/graphql-rust/juniper" }
|
juniper = { path = "../../juniper" }
|
||||||
juniper_subscriptions = { git = "https://github.com/graphql-rust/juniper" }
|
juniper_subscriptions = { path = "../../juniper_subscriptions" }
|
||||||
|
|
|
@ -6,8 +6,8 @@ publish = false
|
||||||
authors = ["Christoph Herzog <chris@theduke.at>"]
|
authors = ["Christoph Herzog <chris@theduke.at>"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
juniper = { git = "https://github.com/graphql-rust/juniper" }
|
juniper = { path = "../../juniper" }
|
||||||
juniper_warp = { git = "https://github.com/graphql-rust/juniper" }
|
juniper_warp = { path = "../../juniper_warp" }
|
||||||
|
|
||||||
env_logger = "0.8.1"
|
env_logger = "0.8.1"
|
||||||
futures = "0.3.1"
|
futures = "0.3.1"
|
||||||
|
|
|
@ -21,7 +21,7 @@ proc-macro = true
|
||||||
proc-macro-error = "1.0.2"
|
proc-macro-error = "1.0.2"
|
||||||
proc-macro2 = "1.0.1"
|
proc-macro2 = "1.0.1"
|
||||||
quote = "1.0.3"
|
quote = "1.0.3"
|
||||||
syn = { version = "1.0.3", features = ["extra-traits", "full", "parsing"], default-features = false }
|
syn = { version = "1.0.60", features = ["extra-traits", "full", "parsing"], default-features = false }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
derive_more = "0.99.7"
|
derive_more = "0.99.7"
|
||||||
|
|
|
@ -191,12 +191,15 @@ impl TypeExt for syn::Type {
|
||||||
}
|
}
|
||||||
|
|
||||||
// These types unlikely will be used as GraphQL types.
|
// These types unlikely will be used as GraphQL types.
|
||||||
T::BareFn(_)
|
T::BareFn(_) | T::Infer(_) | T::Macro(_) | T::Never(_) | T::Verbatim(_) => {}
|
||||||
| T::Infer(_)
|
|
||||||
| T::Macro(_)
|
// Following the syn idiom for exhaustive matching on Type
|
||||||
| T::Never(_)
|
// https://github.com/dtolnay/syn/blob/master/src/ty.rs#L66-L88
|
||||||
| T::Verbatim(_)
|
#[cfg(test)]
|
||||||
| T::__Nonexhaustive => {}
|
T::__TestExhaustive(_) => unimplemented!(),
|
||||||
|
|
||||||
|
#[cfg(not(test))]
|
||||||
|
_ => {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue