Skip to content

Commit bb023eb

Browse files
timsaucerclaude
andcommitted
build: point release scripts at workspace rust-target/ dir
The Cargo workspace conversion redirects build output to rust-target/ (via .cargo/config.toml), but the dev/release scripts still built from native/ and read native/target/release/, which is no longer populated even when cargo runs inside native/ (config is discovered up-tree). - build-native-libs.sh / build-release.sh: build from the repo root with `-p datafusion-jni` and copy from rust-target/{release,<triple>/release}/. - verify-release-candidate.sh: run `cargo fmt --all` workspace-wide so the new native-common crate is covered (matches CI lint.yml). - updating-datafusion-version.md: list the workspace.dependencies entries that actually exist (datafusion, -proto, -spark, -substrait); drop the stray datafusion-ffi reference. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 3ff4fda commit bb023eb

4 files changed

Lines changed: 17 additions & 13 deletions

File tree

‎dev/release/build-release.sh‎

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -135,26 +135,28 @@ JVM_TARGET_DIR="$PROJECT_HOME/core/target/classes/org/apache/datafusion"
135135

136136
mkdir -p "$JVM_TARGET_DIR/linux/amd64"
137137
docker cp \
138-
"$CONTAINER_AMD64:/opt/datafusion-java-rm/datafusion-java/native/target/release/libdatafusion_jni.so" \
138+
"$CONTAINER_AMD64:/opt/datafusion-java-rm/datafusion-java/rust-target/release/libdatafusion_jni.so" \
139139
"$JVM_TARGET_DIR/linux/amd64/"
140140

141141
mkdir -p "$JVM_TARGET_DIR/linux/aarch64"
142142
docker cp \
143-
"$CONTAINER_ARM64:/opt/datafusion-java-rm/datafusion-java/native/target/release/libdatafusion_jni.so" \
143+
"$CONTAINER_ARM64:/opt/datafusion-java-rm/datafusion-java/rust-target/release/libdatafusion_jni.so" \
144144
"$JVM_TARGET_DIR/linux/aarch64/"
145145

146146
echo "Building macOS native libs on the host (host=$HOST_ARCH)"
147147
rustup target add "$OTHER_DARWIN_TARGET"
148148

149-
(cd "$PROJECT_HOME/native" && cargo build --release)
150-
(cd "$PROJECT_HOME/native" && cargo build --release --target "$OTHER_DARWIN_TARGET")
149+
# Cargo writes to the workspace `rust-target/` dir (set in .cargo/config.toml),
150+
# not the per-crate `native/target/`, so build from the repo root.
151+
(cd "$PROJECT_HOME" && cargo build --release -p datafusion-jni)
152+
(cd "$PROJECT_HOME" && cargo build --release -p datafusion-jni --target "$OTHER_DARWIN_TARGET")
151153

152154
mkdir -p "$JVM_TARGET_DIR/darwin/$HOST_DARWIN_DIR"
153-
cp "$PROJECT_HOME/native/target/release/libdatafusion_jni.dylib" \
155+
cp "$PROJECT_HOME/rust-target/release/libdatafusion_jni.dylib" \
154156
"$JVM_TARGET_DIR/darwin/$HOST_DARWIN_DIR/"
155157

156158
mkdir -p "$JVM_TARGET_DIR/darwin/$OTHER_DARWIN_DIR"
157-
cp "$PROJECT_HOME/native/target/$OTHER_DARWIN_TARGET/release/libdatafusion_jni.dylib" \
159+
cp "$PROJECT_HOME/rust-target/$OTHER_DARWIN_TARGET/release/libdatafusion_jni.dylib" \
158160
"$JVM_TARGET_DIR/darwin/$OTHER_DARWIN_DIR/"
159161

160162
echo "Installing JAR into local Maven repo"

‎dev/release/datafusion-java-rm/build-native-libs.sh‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,9 @@ git clone "$REPO" datafusion-java
3838
cd datafusion-java
3939
git checkout "$BRANCH"
4040

41-
cd native
42-
cargo build --release
41+
# Cargo writes to the workspace `rust-target/` dir (set in .cargo/config.toml),
42+
# not the per-crate `native/target/`, so build from the repo root.
43+
cargo build --release -p datafusion-jni
4344

44-
echo "Built $(pwd)/target/release/libdatafusion_jni.so"
45-
ls -l target/release/libdatafusion_jni.so
45+
echo "Built $(pwd)/rust-target/release/libdatafusion_jni.so"
46+
ls -l rust-target/release/libdatafusion_jni.so

‎dev/release/verify-release-candidate.sh‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,8 @@ test_source_distribution() {
150150

151151
# raises on any formatting errors
152152
rustup component add rustfmt
153-
(cd native && cargo fmt --all -- --check)
153+
# Workspace-wide: covers native, native-common, and any future members.
154+
cargo fmt --all -- --check
154155

155156
# build native + JVM and run the full test suite
156157
make test

‎docs/source/contributor-guide/updating-datafusion-version.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ under the License.
2121

2222
Three things must move together when bumping DataFusion:
2323

24-
1. `Cargo.toml` (workspace root) — the `datafusion`, `datafusion-ffi`,
25-
`datafusion-proto`, and `datafusion-substrait` entries in
24+
1. `Cargo.toml` (workspace root) — the `datafusion`, `datafusion-proto`,
25+
`datafusion-spark`, and `datafusion-substrait` entries in
2626
`[workspace.dependencies]`. Members inherit from there.
2727
2. `pom.xml` — the `<datafusion.version>` Maven property. **Must equal
2828
the Cargo version**; a mismatch means JVM-built protobuf plans won't

0 commit comments

Comments
 (0)