Skip to content

Commit

Permalink
Split object_store into separate workspace (#4036)
Browse files Browse the repository at this point in the history
  • Loading branch information
tustvold committed Apr 7, 2023
1 parent 17ef9ad commit 6e9751f
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 23 deletions.
14 changes: 9 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
# under the License.

[workspace]

members = [
"arrow",
"arrow-arith",
Expand All @@ -35,7 +36,6 @@ members = [
"arrow-schema",
"arrow-select",
"arrow-string",
"object_store",
"parquet",
"parquet_derive",
"parquet_derive_test",
Expand All @@ -51,10 +51,14 @@ members = [
#
resolver = "2"

# this package is excluded because it requires different compilation flags, thereby significantly changing
# how it is compiled within the workspace, causing the whole workspace to be compiled from scratch
# this way, this is a stand-alone package that compiles independently of the others.
exclude = ["arrow-pyarrow-integration-testing"]
exclude = [
# arrow-pyarrow-integration-testing is excluded because it requires different compilation flags, thereby
# significantly changing how it is compiled within the workspace, causing the whole workspace to be compiled from
# scratch this way, this is a stand-alone package that compiles independently of the others.
"arrow-pyarrow-integration-testing",
# object_store is excluded because it follows a separate release cycle from the other arrow crates
"object_store"
]

[workspace.package]
version = "37.0.0"
Expand Down
5 changes: 1 addition & 4 deletions dev/release/create-tarball.sh
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,11 @@ echo "---------------------------------------------------------"

# create <tarball> containing the files in git at $release_hash
# the files in the tarball are prefixed with {tag} (e.g. 4.0.1)
# use --delete to filter out:
# 1. `object_store` files
# 2. Workspace `Cargo.toml` file (which refers to object_store)
# use --delete to filter out `object_store` files
mkdir -p ${distdir}
(cd "${SOURCE_TOP_DIR}" && \
git archive ${release_hash} --prefix ${release}/ \
| $tar --delete ${release}/'object_store' \
| $tar --delete ${release}/'Cargo.toml' \
| gzip > ${tarball})

echo "Running rat license checker on ${tarball}"
Expand Down
15 changes: 2 additions & 13 deletions dev/release/verify-release-candidate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -105,26 +105,15 @@ test_source_distribution() {

# raises on any formatting errors
rustup component add rustfmt --toolchain stable
(cd arrow && cargo fmt --check)
(cd arrow-flight && cargo fmt --check)
(cd parquet && cargo fmt --check)
(cd parquet_derive && cargo fmt --check)
cargo fmt --all -- --check

# Clone testing repositories if not cloned already
git clone https://github.com/apache/arrow-testing.git arrow-testing-data
git clone https://github.com/apache/parquet-testing.git parquet-testing-data
export ARROW_TEST_DATA=$PWD/arrow-testing-data/data
export PARQUET_TEST_DATA=$PWD/parquet-testing-data/data

(cd arrow && cargo build && cargo test)
(cd arrow-flight && cargo build && cargo test)
# To avoid https://github.com/apache/arrow-rs/issues/3410,
# remove path reference from parquet:
# object_store = { version = "0.5", path = "../object_store", default-features = false, optional = true }
# object_store = { version = "0.5", default-features = false, optional = true }
sed -i -e 's/\(^object_store.*\)\(path = ".*", \)/\1/g' parquet/Cargo.toml
(cd parquet && cargo build && cargo test)
(cd parquet_derive && cargo build && cargo test)
cargo test --all

# verify that the leaf crates can be published to crates.io
# we can't verify crates that depend on others
Expand Down
3 changes: 2 additions & 1 deletion parquet/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ arrow-data = { workspace = true, optional = true }
arrow-schema = { workspace = true, optional = true }
arrow-select = { workspace = true, optional = true }
arrow-ipc = { workspace = true, optional = true }
object_store = { version = "0.5", path = "../object_store", default-features = false, optional = true }
# Intentionally not a path dependency as object_store is released separately
object_store = { version = "0.5", default-features = false, optional = true }

bytes = { version = "1.1", default-features = false, features = ["std"] }
thrift = { version = "0.17", default-features = false }
Expand Down

0 comments on commit 6e9751f

Please sign in to comment.