From d996754927c82ae81f54fa3dec6541cdb1ca084b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Drwi=C4=99ga?= Date: Fri, 19 Aug 2016 14:18:57 +0200 Subject: [PATCH] Getting rid of syntex --- Cargo.lock | 7 +------ Cargo.toml | 1 - dapps/Cargo.toml | 1 - dapps/build.rs | 6 +----- db/Cargo.toml | 1 - db/build.rs | 9 ++------- ethstore/Cargo.toml | 1 - ethstore/build.rs | 6 +----- ipc/codegen/src/lib.rs | 7 +++++++ ipc/tests/Cargo.toml | 1 - json/Cargo.toml | 1 - json/build.rs | 6 +----- rpc/Cargo.toml | 1 - rpc/build.rs | 6 +----- 14 files changed, 14 insertions(+), 40 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b5194c97b..d4a97ba0d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -36,7 +36,6 @@ dependencies = [ "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "semver 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "syntex 0.33.0 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -292,7 +291,6 @@ dependencies = [ "serde 0.7.9 (registry+https://github.com/rust-lang/crates.io-index)", "serde_codegen 0.7.9 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "syntex 0.33.0 (registry+https://github.com/rust-lang/crates.io-index)", "unicase 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "zip 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", @@ -370,7 +368,6 @@ dependencies = [ "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "nanomsg 0.5.1 (git+https://github.com/ethcore/nanomsg.rs.git)", "semver 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "syntex 0.33.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -429,7 +426,6 @@ dependencies = [ "serde 0.7.9 (registry+https://github.com/rust-lang/crates.io-index)", "serde_codegen 0.7.9 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "syntex 0.33.0 (registry+https://github.com/rust-lang/crates.io-index)", "transient-hashmap 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -504,7 +500,6 @@ dependencies = [ "serde 0.7.9 (registry+https://github.com/rust-lang/crates.io-index)", "serde_codegen 0.7.9 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "syntex 0.33.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -533,7 +528,6 @@ dependencies = [ "serde 0.7.9 (registry+https://github.com/rust-lang/crates.io-index)", "serde_codegen 0.7.9 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "syntex 0.33.0 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)", "tiny-keccak 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1702,6 +1696,7 @@ dependencies = [ "checksum isatty 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7408a548dc0e406b7912d9f84c261cc533c1866e047644a811c133c56041ac0c" "checksum itertools 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)" = "086e1fa5fe48840b1cfdef3a20c7e3115599f8d5c4c87ef32a794a7cdd184d76" "checksum json-ipc-server 0.2.4 (git+https://github.com/ethcore/json-ipc-server.git)" = "" +"checksum json-tcp-server 0.1.0 (git+https://github.com/ethcore/json-tcp-server)" = "" "checksum jsonrpc-core 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ec4477e4e8218da23caa5dd31f4eb39999aa0ea9035660617eccfb19a23bf5ad" "checksum jsonrpc-http-server 6.1.0 (git+https://github.com/ethcore/jsonrpc-http-server.git)" = "" "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" diff --git a/Cargo.toml b/Cargo.toml index 2ef6c24a9..106cb357a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,7 +8,6 @@ build = "build.rs" [build-dependencies] rustc_version = "0.1" -syntex = "*" ethcore-ipc-codegen = { path = "ipc/codegen" } ethcore-ipc-tests = { path = "ipc/tests" } diff --git a/dapps/Cargo.toml b/dapps/Cargo.toml index 3bd5d0875..30b161355 100644 --- a/dapps/Cargo.toml +++ b/dapps/Cargo.toml @@ -33,7 +33,6 @@ clippy = { version = "0.0.82", optional = true} [build-dependencies] serde_codegen = { version = "0.7.0", optional = true } -syntex = "*" [features] default = ["serde_codegen", "extra-dapps"] diff --git a/dapps/build.rs b/dapps/build.rs index 0776c03ec..b178027ae 100644 --- a/dapps/build.rs +++ b/dapps/build.rs @@ -16,7 +16,6 @@ #[cfg(not(feature = "serde_macros"))] mod inner { - extern crate syntex; extern crate serde_codegen; use std::env; @@ -28,10 +27,7 @@ mod inner { let src = Path::new("./src/api/types.rs.in"); let dst = Path::new(&out_dir).join("types.rs"); - let mut registry = syntex::Registry::new(); - - serde_codegen::register(&mut registry); - registry.expand("", &src, &dst).unwrap(); + serde_codegen::expand(&src, &dst).unwrap(); } } diff --git a/db/Cargo.toml b/db/Cargo.toml index edbbbaad1..5b2805c60 100644 --- a/db/Cargo.toml +++ b/db/Cargo.toml @@ -8,7 +8,6 @@ authors = ["Ethcore "] build = "build.rs" [build-dependencies] -syntex = "*" ethcore-ipc-codegen = { path = "../ipc/codegen" } [dependencies] diff --git a/db/build.rs b/db/build.rs index 0f70bd68c..239185d84 100644 --- a/db/build.rs +++ b/db/build.rs @@ -14,7 +14,6 @@ // You should have received a copy of the GNU General Public License // along with Parity. If not, see . -extern crate syntex; extern crate ethcore_ipc_codegen as codegen; use std::env; @@ -27,17 +26,13 @@ pub fn main() { { let src = Path::new("src/lib.rs.in"); let dst = Path::new(&out_dir).join("lib.intermediate.rs.in"); - let mut registry = syntex::Registry::new(); - codegen::register(&mut registry); - registry.expand("", &src, &dst).unwrap(); + codegen::expand(&src, &dst); } // binary serialization pass { let src = Path::new(&out_dir).join("lib.intermediate.rs.in"); let dst = Path::new(&out_dir).join("lib.rs"); - let mut registry = syntex::Registry::new(); - codegen::register(&mut registry); - registry.expand("", &src, &dst).unwrap(); + codegen::expand(&src, &dst); } } diff --git a/ethstore/Cargo.toml b/ethstore/Cargo.toml index dd6a391e6..691cfd969 100644 --- a/ethstore/Cargo.toml +++ b/ethstore/Cargo.toml @@ -21,7 +21,6 @@ itertools = "0.4" [build-dependencies] serde_codegen = { version = "0.7", optional = true } -syntex = "0.33.0" [features] default = ["serde_codegen"] diff --git a/ethstore/build.rs b/ethstore/build.rs index 1c4e05f84..65606cab9 100644 --- a/ethstore/build.rs +++ b/ethstore/build.rs @@ -16,7 +16,6 @@ #[cfg(not(feature = "serde_macros"))] mod inner { - extern crate syntex; extern crate serde_codegen; use std::env; @@ -28,10 +27,7 @@ mod inner { let src = Path::new("src/json/mod.rs.in"); let dst = Path::new(&out_dir).join("mod.rs"); - let mut registry = syntex::Registry::new(); - - serde_codegen::register(&mut registry); - registry.expand("", &src, &dst).unwrap(); + serde_codegen::expand(&src, &dst).unwrap(); } } diff --git a/ipc/codegen/src/lib.rs b/ipc/codegen/src/lib.rs index 8a3b4ba56..ce1ca8592 100644 --- a/ipc/codegen/src/lib.rs +++ b/ipc/codegen/src/lib.rs @@ -48,6 +48,13 @@ include!(concat!(env!("OUT_DIR"), "/lib.rs")); #[cfg(not(feature = "with-syntex"))] include!("lib.rs.in"); +#[cfg(feature = "with-syntex")] +pub fn expand(src: &std::path::Path, dst: &std::path::Path) { + let mut registry = syntex::Registry::new(); + register(&mut registry); + registry.expand("", src, dst).unwrap(); +} + #[cfg(feature = "with-syntex")] pub fn register(reg: &mut syntex::Registry) { use syntax::{ast, fold}; diff --git a/ipc/tests/Cargo.toml b/ipc/tests/Cargo.toml index 61903434f..23bde87e2 100644 --- a/ipc/tests/Cargo.toml +++ b/ipc/tests/Cargo.toml @@ -17,5 +17,4 @@ ethcore-util = { path = "../../util" } log = "0.3" [build-dependencies] -syntex = "0.33" ethcore-ipc-codegen = { path = "../codegen" } diff --git a/json/Cargo.toml b/json/Cargo.toml index cd26b3fa3..ccfa27a5a 100644 --- a/json/Cargo.toml +++ b/json/Cargo.toml @@ -14,7 +14,6 @@ clippy = { version = "0.0.82", optional = true} [build-dependencies] serde_codegen = { version = "0.7.0", optional = true } -syntex = "*" [features] default = ["serde_codegen"] diff --git a/json/build.rs b/json/build.rs index a23790d86..8be54476e 100644 --- a/json/build.rs +++ b/json/build.rs @@ -16,7 +16,6 @@ #[cfg(not(feature = "serde_macros"))] mod inner { - extern crate syntex; extern crate serde_codegen; use std::env; @@ -28,10 +27,7 @@ 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("", &src, &dst).unwrap(); + serde_codegen::expand(&src, &dst).unwrap(); } } diff --git a/rpc/Cargo.toml b/rpc/Cargo.toml index 8a3df0623..38f855631 100644 --- a/rpc/Cargo.toml +++ b/rpc/Cargo.toml @@ -31,7 +31,6 @@ ethcore-ipc = { path = "../ipc/rpc" } [build-dependencies] serde_codegen = { version = "0.7.0", optional = true } -syntex = "*" [features] default = ["serde_codegen"] diff --git a/rpc/build.rs b/rpc/build.rs index 659bc35eb..1d1a9c19d 100644 --- a/rpc/build.rs +++ b/rpc/build.rs @@ -16,7 +16,6 @@ #[cfg(not(feature = "serde_macros"))] mod inner { - extern crate syntex; extern crate serde_codegen; use std::env; @@ -28,10 +27,7 @@ mod inner { let src = Path::new("src/v1/types/mod.rs.in"); let dst = Path::new(&out_dir).join("mod.rs"); - let mut registry = syntex::Registry::new(); - - serde_codegen::register(&mut registry); - registry.expand("", &src, &dst).unwrap(); + serde_codegen::expand(&src, &dst).unwrap(); } }