diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index f981986ee32..631763994a8 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 c5435d0edba..c976e2c58f8 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 1ff34fd78cd..6501aa0ae43 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 e11633540ea..00409ebda3f 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,7 +54,6 @@ 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"] } [features] diff --git a/parquet_derive/test/dependency/README.md b/parquet_derive/test/dependency/README.md new file mode 100644 index 00000000000..b618b4636e7 --- /dev/null +++ b/parquet_derive/test/dependency/README.md @@ -0,0 +1,21 @@ + + +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 00000000000..5d811aaf256 --- /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 = "6.0.0" } + +# 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 00000000000..e7a11a969c0 --- /dev/null +++ b/parquet_derive/test/dependency/default-features/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Hello, world!"); +}