Skip to content

Commit

Permalink
Minimize features of indexmap and chrono (#1000)
Browse files Browse the repository at this point in the history
* 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.

indexmap-rs/indexmap#145
  • Loading branch information
carols10cents authored Dec 4, 2021
1 parent 6817c80 commit 72c9d1e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions arrow/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ 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"
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"
Expand Down
2 changes: 1 addition & 1 deletion parquet/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down

0 comments on commit 72c9d1e

Please sign in to comment.