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

Cherry pick fix parquet_derive with default features (and fix cargo publish) #856

Merged
merged 3 commits into from
Oct 25, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
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
14 changes: 10 additions & 4 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
1 change: 1 addition & 0 deletions dev/release/rat_exclude_files.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ target/*
dev/release/rat_exclude_files.txt
arrow/test/data/*
arrow/test/dependency/*
parquet_derive/test/dependency/*
.gitattributes
**.gitignore
.gitmodules
Expand Down
19 changes: 18 additions & 1 deletion dev/release/verify-release-candidate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions parquet/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand All @@ -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]
Expand Down
21 changes: 21 additions & 0 deletions parquet_derive/test/dependency/README.md
Original file line number Diff line number Diff line change
@@ -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.
30 changes: 30 additions & 0 deletions parquet_derive/test/dependency/default-features/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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]
3 changes: 3 additions & 0 deletions parquet_derive/test/dependency/default-features/src/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fn main() {
println!("Hello, world!");
}