mirror of
https://github.com/OMGeeky/google-apis-rs.git
synced 2026-02-23 15:49:49 +01:00
fix(dependencies): use working version of serde-codegen
This update fixes the build on stable, and allows builds on nightly as usual. The trick is to use the latest version of serde-codegen, which keeps the syntex version internal, preventing clashes between libraries that might have different requirements.
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
<%namespace name="util" file="../lib/util.mako"/>\
|
||||
#[cfg(feature = "with-syntex")]
|
||||
#[cfg(feature = "with-serde-codegen")]
|
||||
mod inner {
|
||||
extern crate syntex;
|
||||
extern crate serde_codegen;
|
||||
|
||||
use std::env;
|
||||
@@ -13,13 +11,11 @@ mod inner {
|
||||
let src = Path::new("src/lib.rs.in");
|
||||
let dst = Path::new(&out_dir).join("lib.rs");
|
||||
|
||||
let mut registry = syntex::Registry::new();
|
||||
serde_codegen::register(&mut registry);
|
||||
registry.expand("${util.crate_name()}", &src, &dst).unwrap();
|
||||
serde_codegen::expand(&src, &dst).unwrap();
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "with-syntex"))]
|
||||
#[cfg(not(feature = "with-serde-codegen"))]
|
||||
mod inner {
|
||||
pub fn main() {}
|
||||
}
|
||||
|
||||
@@ -24,5 +24,5 @@ ${lib.docs(c)}
|
||||
#[cfg(feature = "nightly")]
|
||||
include!("lib.rs.in");
|
||||
|
||||
#[cfg(feature = "with-syntex")]
|
||||
#[cfg(feature = "with-serde-codegen")]
|
||||
include!(concat!(env!("OUT_DIR"), "/lib.rs"));
|
||||
Reference in New Issue
Block a user