This is an automated email from the ASF dual-hosted git repository. alamb pushed a commit to branch cherry_pick_d6f3ef7c in repository https://gitbox.apache.org/repos/asf/arrow-rs.git
commit 4226e098f3632e24931f8f026291d776535c6fe4 Author: Andrew Lamb <[email protected]> AuthorDate: Mon Oct 18 14:40:46 2021 -0400 fix parquet_derive with default features (and fix `cargo publish`) (#837) * Run all tests and do dry runs of cargo publish * Add test for building parquet derive with default features' * fix feature flags in parquet crate * fixup rat * fix default feature test --- .github/workflows/rust.yml | 14 +++++++--- dev/release/rat_exclude_files.txt | 1 + dev/release/verify-release-candidate.sh | 19 +++++++++++++- parquet/Cargo.toml | 4 +-- parquet_derive/test/dependency/README.md | 21 +++++++++++++++ .../test/dependency/default-features/Cargo.toml | 30 ++++++++++++++++++++++ .../test/dependency/default-features/src/main.rs | 3 +++ 7 files changed, 85 insertions(+), 7 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index f981986..6317639 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -341,9 +341,9 @@ jobs: cargo build --no-default-features --features=csv,ipc,simd --target wasm32-unknown-unknown cargo build --no-default-features --features=csv,ipc,simd --target wasm32-wasi - # test builds with various feature flags + # test builds with various feature flag combinations outside the main workspace default-build: - name: Arrow Feature Flag Builds ${{ matrix.rust }} + name: Feature Flag Builds ${{ matrix.rust }} runs-on: ubuntu-latest strategy: matrix: @@ -373,15 +373,21 @@ jobs: rustup toolchain install ${{ matrix.rust }} rustup override set ${{ matrix.rust }} rustup component add rustfmt - - name: Build with default features + - name: Arrow Build with default features run: | export CARGO_HOME="/github/home/.cargo" export CARGO_TARGET_DIR="/github/home/target" cd arrow/test/dependency/default-features cargo check - - name: Build with default-features=false + - name: Arrow Build with default-features=false run: | export CARGO_HOME="/github/home/.cargo" export CARGO_TARGET_DIR="/github/home/target" cd arrow/test/dependency/no-default-features cargo check + - name: Parquet Derive build with default-features + run: | + export CARGO_HOME="/github/home/.cargo" + export CARGO_TARGET_DIR="/github/home/target" + cd parquet_derive/test/dependency/default-features + cargo check diff --git a/dev/release/rat_exclude_files.txt b/dev/release/rat_exclude_files.txt index c5435d0..c976e2c 100644 --- a/dev/release/rat_exclude_files.txt +++ b/dev/release/rat_exclude_files.txt @@ -4,6 +4,7 @@ target/* dev/release/rat_exclude_files.txt arrow/test/data/* arrow/test/dependency/* +parquet_derive/test/dependency/* .gitattributes **.gitignore .gitmodules diff --git a/dev/release/verify-release-candidate.sh b/dev/release/verify-release-candidate.sh index 1ff34fd..6501aa0 100755 --- a/dev/release/verify-release-candidate.sh +++ b/dev/release/verify-release-candidate.sh @@ -132,7 +132,24 @@ test_source_distribution() { */Cargo.toml cargo build - cargo test + cargo test --all + + # verify that the crates can be published to crates.io + pushd arrow + cargo publish --dry-run + popd + + pushd arrow-flight + cargo publish --dry-run + popd + + pushd parquet + cargo publish --dry-run + popd + + pushd parquet_derive + cargo publish --dry-run + popd } TEST_SUCCESS=no diff --git a/parquet/Cargo.toml b/parquet/Cargo.toml index e116335..e2c8666 100644 --- a/parquet/Cargo.toml +++ b/parquet/Cargo.toml @@ -41,7 +41,7 @@ lz4 = { version = "1.23", optional = true } zstd = { version = "0.9", optional = true } chrono = "0.4" num-bigint = "0.4" -arrow = { path = "../arrow", version = "6.0.0", optional = true, default-features = false } +arrow = { path = "../arrow", version = "6.0.0", optional = true, default-features = false, features = ["ipc"] } base64 = { version = "0.13", optional = true } clap = { version = "2.33.3", optional = true } serde_json = { version = "1.0", features = ["preserve_order"], optional = true } @@ -54,8 +54,8 @@ snap = "1.0" brotli = "3.3" flate2 = "1.0" lz4 = "1.23" -arrow = { path = "../arrow", version = "6.0.0" } serde_json = { version = "1.0", features = ["preserve_order"] } +arrow = { path = "../arrow", version = "7.0.0-SNAPSHOT", default-features = false, features = ["test_utils"] } [features] default = ["arrow", "snap", "brotli", "flate2", "lz4", "zstd", "base64"] diff --git a/parquet_derive/test/dependency/README.md b/parquet_derive/test/dependency/README.md new file mode 100644 index 0000000..b618b46 --- /dev/null +++ b/parquet_derive/test/dependency/README.md @@ -0,0 +1,21 @@ +<!--- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +--> + +This directory contains projects that use arrow as a dependency with +various combinations of feature flags. diff --git a/parquet_derive/test/dependency/default-features/Cargo.toml b/parquet_derive/test/dependency/default-features/Cargo.toml new file mode 100644 index 0000000..2a98dd4 --- /dev/null +++ b/parquet_derive/test/dependency/default-features/Cargo.toml @@ -0,0 +1,30 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +[package] +name = "defeault-features" +description = "Models a user application of parquet_derive that uses no additional features of arrow" +version = "0.1.0" +edition = "2018" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +parquet_derive = { path = "../../../../parquet_derive", version = "7.0.0-SNAPSHOT" } + +# Keep this out of the default workspace +[workspace] diff --git a/parquet_derive/test/dependency/default-features/src/main.rs b/parquet_derive/test/dependency/default-features/src/main.rs new file mode 100644 index 0000000..e7a11a9 --- /dev/null +++ b/parquet_derive/test/dependency/default-features/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Hello, world!"); +}
