Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Updates dependencies and tries to consolidate multiple version #815

Merged
merged 1 commit into from
Sep 27, 2018
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
254 changes: 167 additions & 87 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ futures = "0.1"
ctrlc = { version = "3.0", features = ["termination"] }

[build-dependencies]
vergen = "0.1"
vergen = "2"

[workspace]
members = [
Expand Down
9 changes: 7 additions & 2 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,16 @@

extern crate vergen;

use vergen::{vergen, OutputFns};
use vergen::{ConstantsFlags, Vergen};

const ERROR_MSG: &'static str = "Failed to generate metadata files";

fn main() {
vergen(OutputFns::all()).expect(ERROR_MSG);
let vergen = Vergen::new(ConstantsFlags::all()).expect(ERROR_MSG);

for (k, v) in vergen.build_info() {
println!("cargo:rustc-env={}={}", k.name(), v);
}

println!("cargo:rerun-if-changed=.git/HEAD");
}
2 changes: 1 addition & 1 deletion core/bft/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ sr-version = { path = "../sr-version" }
tokio = "0.1.7"
parking_lot = "0.4"
error-chain = "0.12"
log = "0.3"
log = "0.4"
rhododendron = "0.3"

[dev-dependencies]
Expand Down
6 changes: 3 additions & 3 deletions core/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ build = "build.rs"
[dependencies]
clap = { version = "~2.32", features = ["yaml"] }
backtrace = "0.3"
env_logger = "0.4"
env_logger = "0.5"
error-chain = "0.12"
log = "0.3"
log = "0.4"
atty = "0.2"
regex = "1"
time = "0.1"
slog = "^2"
ansi_term = "0.10"
ansi_term = "0.11"
lazy_static = "1.0"
app_dirs = "1.2"
tokio = "0.1.7"
Expand Down
21 changes: 10 additions & 11 deletions core/cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -506,12 +506,12 @@ fn default_base_path() -> PathBuf {
fn init_logger(pattern: &str) {
use ansi_term::Colour;

let mut builder = env_logger::LogBuilder::new();
let mut builder = env_logger::Builder::new();
// Disable info logging by default for some modules:
builder.filter(Some("ws"), log::LogLevelFilter::Warn);
builder.filter(Some("hyper"), log::LogLevelFilter::Warn);
builder.filter(Some("ws"), log::LevelFilter::Warn);
builder.filter(Some("hyper"), log::LevelFilter::Warn);
// Enable info for others.
builder.filter(None, log::LogLevelFilter::Info);
builder.filter(None, log::LevelFilter::Info);

if let Ok(lvl) = std::env::var("RUST_LOG") {
builder.parse(&lvl);
Expand All @@ -521,10 +521,10 @@ fn init_logger(pattern: &str) {
let isatty = atty::is(atty::Stream::Stderr);
let enable_color = isatty;

let format = move |record: &log::LogRecord| {
builder.format(move |buf, record| {
let timestamp = time::strftime("%Y-%m-%d %H:%M:%S", &time::now()).expect("Error formatting log timestamp");

let mut output = if log::max_log_level() <= log::LogLevelFilter::Info {
let mut output = if log::max_level() <= log::LevelFilter::Info {
format!("{} {}", Colour::Black.bold().paint(timestamp), record.args())
} else {
let name = ::std::thread::current().name().map_or_else(Default::default, |x| format!("{}", Colour::Blue.bold().paint(x)));
Expand All @@ -535,15 +535,14 @@ fn init_logger(pattern: &str) {
output = kill_color(output.as_ref());
}

if !isatty && record.level() <= log::LogLevel::Info && atty::is(atty::Stream::Stdout) {
if !isatty && record.level() <= log::Level::Info && atty::is(atty::Stream::Stdout) {
// duplicate INFO/WARN output to console
println!("{}", output);
}
output
};
builder.format(format);
write!(buf, "{}", output)
});

builder.init().expect("Logger initialized only once.");
builder.init();
}

fn kill_color(s: &str) -> String {
Expand Down
2 changes: 1 addition & 1 deletion core/client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ authors = ["Parity Technologies <admin@parity.io>"]
[dependencies]
error-chain = "0.12"
fnv = "1.0"
log = "0.3"
log = "0.4"
parking_lot = "0.4"
trie-root = { git = "https://github.com/paritytech/trie" }
hex-literal = "0.1"
Expand Down
2 changes: 1 addition & 1 deletion core/client/db/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ authors = ["Parity Technologies <admin@parity.io>"]

[dependencies]
parking_lot = "0.4"
log = "0.3"
log = "0.4"
kvdb = "0.1"
kvdb-rocksdb = "0.1.3"
hash-db = { git = "https://github.com/paritytech/trie" }
Expand Down
2 changes: 1 addition & 1 deletion core/executor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ trie-root = { git = "https://github.com/paritytech/trie" }
twox-hash = "1.1.0"
lazy_static = "1.0"
parking_lot = "*"
log = "0.3"
log = "0.4"
hash-db = { git = "https://github.com/paritytech/trie" }

[dev-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion core/network-libp2p/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ futures = "0.1"
libp2p = { git = "https://github.com/tomaka/libp2p-rs", rev = "8111062f0177fd7423626f2db9560273644a4c4d", default-features = false, features = ["libp2p-secio", "libp2p-secio-secp256k1"] }
parking_lot = "0.5"
libc = "0.2"
log = "0.3"
log = "0.4"
rand = "0.5.0"
serde = "1.0.70"
serde_derive = "1.0.70"
Expand Down
2 changes: 1 addition & 1 deletion core/network/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ authors = ["Parity Technologies <admin@parity.io>"]
[lib]

[dependencies]
log = "0.3"
log = "0.4"
parking_lot = "0.4"
error-chain = "0.12"
bitflags = "1.0"
Expand Down
2 changes: 1 addition & 1 deletion core/rpc-servers/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jsonrpc-core = { git = "https://github.com/paritytech/jsonrpc.git" }
jsonrpc-http-server = { git = "https://github.com/paritytech/jsonrpc.git" }
jsonrpc-pubsub = { git = "https://github.com/paritytech/jsonrpc.git" }
jsonrpc-ws-server = { git = "https://github.com/paritytech/jsonrpc.git" }
log = "0.3"
log = "0.4"
serde = "1.0"
substrate-rpc = { path = "../rpc", version = "0.1" }
sr-primitives = { path = "../sr-primitives" }
2 changes: 1 addition & 1 deletion core/rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ error-chain = "0.12"
jsonrpc-core = { git="https://github.com/paritytech/jsonrpc.git" }
jsonrpc-macros = { git="https://github.com/paritytech/jsonrpc.git" }
jsonrpc-pubsub = { git="https://github.com/paritytech/jsonrpc.git" }
log = "0.3"
log = "0.4"
parking_lot = "0.4"
parity-codec = { version = "2.0" }
substrate-client = { path = "../client" }
Expand Down
2 changes: 1 addition & 1 deletion core/service/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ futures = "0.1.17"
parking_lot = "0.4"
error-chain = "0.12"
lazy_static = "1.0"
log = "0.3"
log = "0.4"
slog = "^2"
tokio = "0.1.7"
exit-future = "0.1"
Expand Down
2 changes: 1 addition & 1 deletion core/sr-primitives/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ parity-codec-derive = { version = "~1.0", default_features = false }
substrate-primitives = { path = "../primitives", default_features = false }
sr-std = { path = "../sr-std", default_features = false }
sr-io = { path = "../sr-io", default_features = false }
log = {version = "0.3", optional = true }
log = {version = "0.4", optional = true }

[dev-dependencies]
serde_json = "1.0"
Expand Down
2 changes: 1 addition & 1 deletion core/state-machine/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description = "Substrate State Machine"
[dependencies]
byteorder = "1.1"
hex-literal = "0.1.0"
log = "0.3"
log = "0.4"
parking_lot = "0.4"
heapsize = "0.4"
hash-db = { git = "https://github.com/paritytech/trie" }
Expand Down
2 changes: 1 addition & 1 deletion core/telemetry/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description = "Telemetry utils"
[dependencies]
parking_lot = "0.4"
lazy_static = "1.0"
log = "0.3"
log = "0.4"
slog = "^2"
slog-json = "^2"
slog-async = "^2"
Expand Down
2 changes: 1 addition & 1 deletion core/test-runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.1.0"
authors = ["Parity Technologies <admin@parity.io>"]

[dependencies]
log = { version = "0.3", optional = true }
log = { version = "0.4", optional = true }
hex-literal = { version = "0.1.0", optional = true }
serde = { version = "1.0", optional = true }
serde_derive = { version = "1.0", optional = true }
Expand Down
2 changes: 1 addition & 1 deletion core/test-runtime/wasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.1.0"
authors = ["Parity Technologies <admin@parity.io>"]

[dependencies]
log = { version = "0.3", optional = true }
log = { version = "0.4", optional = true }
hex-literal = { version = "0.1.0", optional = true }
parity-codec = { version = "~2.0.1", default-features = false }
parity-codec-derive = { version = "~2.0.1", default-features = false }
Expand Down
2 changes: 1 addition & 1 deletion core/transaction-graph/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ authors = ["Parity Technologies <admin@parity.io>"]

[dependencies]
error-chain = "0.12"
log = "0.3.0"
log = "0.4"
sr-primitives = { path = "../sr-primitives" }
4 changes: 2 additions & 2 deletions core/transaction-pool/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ serde = "1.0"
serde_derive = "1.0"
error-chain = "0.12"
futures = "0.1"
log = "0.3"
log = "0.4"
parking_lot = "0.4"
transaction-pool = "1.13.2"
transaction-pool = "1.13.3"
sr-primitives = { path = "../../core/sr-primitives" }

[dev-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion node/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ authors = ["Parity Technologies <admin@parity.io>"]
description = "Substrate node implementation in Rust."

[dependencies]
log = "0.3"
log = "0.4"
tokio = "0.1.7"
exit-future = "0.1"
substrate-cli = { path = "../../core/cli" }
Expand Down
2 changes: 1 addition & 1 deletion node/consensus/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ futures = "0.1.17"
parking_lot = "0.4"
tokio = "0.1.7"
error-chain = "0.12"
log = "0.3"
log = "0.4"
exit-future = "0.1"
rhododendron = "0.3"
node-primitives = { path = "../primitives" }
Expand Down
2 changes: 1 addition & 1 deletion node/service/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ authors = ["Parity Technologies <admin@parity.io>"]
parking_lot = "0.4"
error-chain = "0.12"
lazy_static = "1.0"
log = "0.3"
log = "0.4"
slog = "^2"
tokio = "0.1.7"
hex-literal = "0.1"
Expand Down
7 changes: 1 addition & 6 deletions node/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@ use futures::{future, Future};

use std::cell::RefCell;

mod vergen {
#![allow(unused)]
include!(concat!(env!("OUT_DIR"), "/version.rs"));
}

// handles ctrl-c
struct Exit;
impl cli::IntoExit for Exit {
Expand All @@ -59,7 +54,7 @@ quick_main!(run);

fn run() -> cli::error::Result<()> {
let version = VersionInfo {
commit: vergen::short_sha(),
commit: env!("VERGEN_SHA_SHORT"),
version: env!("CARGO_PKG_VERSION"),
executable_name: "substrate",
author: "Parity Team <admin@parity.io>",
Expand Down
2 changes: 1 addition & 1 deletion node/transaction-pool/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.1.0"
authors = ["Parity Technologies <admin@parity.io>"]

[dependencies]
log = "0.3.0"
log = "0.4"
error-chain = "0.12"
parking_lot = "0.4"
node-primitives = { path = "../primitives" }
Expand Down