From 72c9d1ea2bcd3a10b37671ddc87141f07b9388a4 Mon Sep 17 00:00:00 2001 From: "Carol (Nichols || Goulding)" <193874+carols10cents@users.noreply.github.com> Date: Sat, 4 Dec 2021 10:28:30 -0500 Subject: [PATCH] Minimize features of indexmap and chrono (#1000) * Disable default features of chrono; only enable features needed Chrono's default features contain "oldtime", which is deprecated. According to [the docs](https://docs.rs/chrono/0.4.19/chrono/#duration), > new code should disable the oldtime feature and use the > chrono::Duration type instead. The oldtime feature is enabled by > default for backwards compatibility, but future versions of Chrono > are likely to remove the feature entirely. so follow that recommendation by setting default-features to false. And actually, only Arrow needs the "clock" feature, so all the other features can stay off too to minimize the feature set that projects depending on arrow or parquet are forced to enable. * Explicitly enable indexmap's "std" feature The indexmap crate uses the autocfg crate to do target detection to determine whether `std` is available. Arrow isn't targeting `no_std` environments, so the target detection isn't necessary. This might save some build time. https://github.com/bluss/indexmap/pull/145 --- arrow/Cargo.toml | 4 ++-- parquet/Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arrow/Cargo.toml b/arrow/Cargo.toml index 50aac92800f3..12c141c0a8f8 100644 --- a/arrow/Cargo.toml +++ b/arrow/Cargo.toml @@ -40,7 +40,7 @@ path = "src/lib.rs" serde = { version = "1.0" } serde_derive = "1.0" serde_json = { version = "1.0", features = ["preserve_order"] } -indexmap = "1.6" +indexmap = { version = "1.6", features = ["std"] } rand = { version = "0.8", optional = true } num = "0.4" half = "1.8" @@ -48,7 +48,7 @@ csv_crate = { version = "1.1", optional = true, package="csv" } regex = "1.3" lazy_static = "1.4" packed_simd = { version = "0.3", optional = true, package = "packed_simd_2" } -chrono = "0.4" +chrono = { version = "0.4", default-features = false, features = ["clock"] } chrono-tz = {version = "0.4", optional = true} flatbuffers = { version = "=2.0.0", optional = true } hex = "0.4" diff --git a/parquet/Cargo.toml b/parquet/Cargo.toml index 71557c666a0f..f777b10f7556 100644 --- a/parquet/Cargo.toml +++ b/parquet/Cargo.toml @@ -38,7 +38,7 @@ brotli = { version = "3.3", optional = true } flate2 = { version = "1.0", optional = true } lz4 = { version = "1.23", optional = true } zstd = { version = "0.9", optional = true } -chrono = "0.4" +chrono = { version = "0.4", default-features = false } num-bigint = "0.4" arrow = { path = "../arrow", version = "7.0.0-SNAPSHOT", optional = true, default-features = false, features = ["ipc"] } base64 = { version = "0.13", optional = true }