Skip to content
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

use a thread in the build script of serde_codegen to allow env vars to control the stack size #488

Merged
merged 2 commits into from
Aug 11, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions .cargo/config

This file was deleted.

4 changes: 2 additions & 2 deletions serde_codegen/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "serde_codegen"
version = "0.8.0"
version = "0.8.1"
authors = ["Erick Tryzelaar <[email protected]>"]
license = "MIT/Apache-2.0"
description = "Macros to auto-generate implementations for the serde framework"
Expand Down Expand Up @@ -32,6 +32,6 @@ aster = { version = "^0.22.0", default-features = false }
clippy = { version = "^0.*", optional = true }
quasi = { version = "^0.16.0", default-features = false }
quasi_macros = { version = "^0.16.0", optional = true }
serde_codegen_internals = { version = "=0.5.0", default-features = false }
serde_codegen_internals = { version = "=0.5.0", default-features = false, path = "../serde_codegen_internals" }
syntex = { version = "^0.39.0", optional = true }
syntex_syntax = { version = "^0.39.0", optional = true }
13 changes: 8 additions & 5 deletions serde_codegen/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,17 @@ mod inner {

use std::env;
use std::path::Path;
use std::thread::spawn;

pub fn main() {
let out_dir = env::var_os("OUT_DIR").unwrap();
// put everything into a thread, so users can use `RUST_MIN_STACK` to increase the amount of stack
spawn(|| {
let out_dir = env::var_os("OUT_DIR").unwrap();

let src = Path::new("src/lib.rs.in");
let dst = Path::new(&out_dir).join("lib.rs");

quasi_codegen::expand(&src, &dst).unwrap();
let src = Path::new("src/lib.rs.in");
let dst = Path::new(&out_dir).join("lib.rs");
quasi_codegen::expand(&src, &dst).unwrap();
}).join().unwrap()
}
}

Expand Down
8 changes: 4 additions & 4 deletions serde_macros/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "serde_macros"
version = "0.8.0"
version = "0.8.1"
authors = ["Erick Tryzelaar <[email protected]>"]
license = "MIT/Apache-2.0"
description = "Macros to auto-generate implementations for the serde framework"
Expand Down Expand Up @@ -28,7 +28,7 @@ skeptic = { version = "^0.6.0", optional = true }

[dependencies]
clippy = { version = "^0.*", optional = true }
serde_codegen = { version = "=0.8.0", default-features = false, features = ["unstable"] }
serde_codegen = { version = "=0.8.1", default-features = false, features = ["unstable"], path = "../serde_codegen" }
skeptic = { version = "^0.6.0", optional = true }
serde_json = { version = "0.8.0", optional = true }

Expand All @@ -37,8 +37,8 @@ clippy = "^0.*"
compiletest_rs = "^0.2.0"
fnv = "1.0"
rustc-serialize = "^0.3.16"
serde = "0.8.0"
serde_test = "0.8.0"
serde = { version = "0.8.0", path = "../serde" }
serde_test = { version = "0.8.0", path = "../serde_test" }

[[test]]
name = "test"
Expand Down
2 changes: 1 addition & 1 deletion serde_test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ keywords = ["serde", "serialization"]
include = ["Cargo.toml", "src/**/*.rs"]

[dependencies]
serde = "0.8.0"
serde = { version = "0.8.0", path = "../serde" }