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

Remove test_utils from default features (#2298) #2299

Merged
merged 2 commits into from Aug 3, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 10 additions & 6 deletions arrow/Cargo.toml
Expand Up @@ -23,7 +23,7 @@ homepage = "https://github.com/apache/arrow-rs"
repository = "https://github.com/apache/arrow-rs"
authors = ["Apache Arrow <dev@arrow.apache.org>"]
license = "Apache-2.0"
keywords = [ "arrow" ]
keywords = ["arrow"]
include = [
"benches/*.rs",
"src/**/*.rs",
Expand All @@ -43,16 +43,16 @@ serde = { version = "1.0", default-features = false }
serde_derive = { version = "1.0", default-features = false }
serde_json = { version = "1.0", default-features = false, features = ["std"] }
indexmap = { version = "1.9", default-features = false, features = ["std"] }
rand = { version = "0.8", default-features = false, features = ["std", "std_rng"], optional = true }
rand = { version = "0.8", default-features = false, features = ["std", "std_rng"], optional = true }
num = { version = "0.4", default-features = false, features = ["std"] }
half = { version = "2.0", default-features = false }
hashbrown = { version = "0.12", default-features = false }
csv_crate = { version = "1.1", default-features = false, optional = true, package="csv" }
csv_crate = { version = "1.1", default-features = false, optional = true, package = "csv" }
regex = { version = "1.5.6", default-features = false, features = ["std", "unicode"] }
lazy_static = { version = "1.4", default-features = false }
packed_simd = { version = "0.3", default-features = false, optional = true, package = "packed_simd_2" }
chrono = { version = "0.4", default-features = false, features = ["clock"] }
chrono-tz = {version = "0.6", default-features = false, optional = true}
chrono-tz = { version = "0.6", default-features = false, optional = true }
flatbuffers = { version = "2.1.2", default-features = false, features = ["thiserror"], optional = true }
hex = { version = "0.4", default-features = false, features = ["std"] }
comfy-table = { version = "6.0", optional = true, default-features = false }
Expand All @@ -62,7 +62,7 @@ multiversion = { version = "0.6.1", default-features = false }
bitflags = { version = "1.2.1", default-features = false }

[features]
default = ["csv", "ipc", "test_utils"]
default = ["csv", "ipc"]
csv = ["csv_crate"]
ipc = ["flatbuffers"]
simd = ["packed_simd"]
Expand All @@ -79,13 +79,17 @@ pyarrow = ["pyo3"]
force_validate = []

[dev-dependencies]
rand = { version = "0.8", default-features = false, features = ["std", "std_rng"] }
rand = { version = "0.8", default-features = false, features = ["std", "std_rng"] }
criterion = { version = "0.3", default-features = false }
flate2 = { version = "1", default-features = false, features = ["rust_backend"] }
tempfile = { version = "3", default-features = false }

[build-dependencies]

[[example]]
name = "dynamic_types"
required-features = ["prettyprint"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice


[[bench]]
name = "aggregate_kernels"
harness = false
Expand Down
10 changes: 2 additions & 8 deletions arrow/examples/dynamic_types.rs
Expand Up @@ -65,10 +65,7 @@ fn main() -> Result<()> {
let batch =
RecordBatch::try_new(Arc::new(schema), vec![Arc::new(id), Arc::new(nested)])?;

#[cfg(feature = "prettyprint")]
{
print_batches(&[batch.clone()]).unwrap();
}
print_batches(&[batch.clone()]).unwrap();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Drive by fix as I kept getting warnings about projection being unused

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

me too!


process(&batch);
Ok(())
Expand Down Expand Up @@ -108,8 +105,5 @@ fn process(batch: &RecordBatch) {
)
.unwrap();

#[cfg(feature = "prettyprint")]
{
print_batches(&[projection]).unwrap();
}
print_batches(&[projection]).unwrap();
}
4 changes: 2 additions & 2 deletions arrow/src/util/mod.rs
Expand Up @@ -24,13 +24,13 @@ pub mod bit_util;
#[cfg(feature = "test_utils")]
pub mod data_gen;
pub mod display;
#[cfg(feature = "test_utils")]
#[cfg(any(test, feature = "test_utils"))]
pub mod integration_util;
#[cfg(feature = "prettyprint")]
pub mod pretty;
pub(crate) mod serialization;
pub mod string_writer;
#[cfg(feature = "test_utils")]
#[cfg(any(test, feature = "test_utils"))]
pub mod test_util;

mod trusted_len;
Expand Down