You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sedona.apache.org by fe...@apache.org on 2026/05/15 15:11:32 UTC
(sedona-db) branch main updated: ci: disable rust-cache cache-bin on macOS, add rustup-init guard (#837) (#841)
This is an automated email from the ASF dual-hosted git repository.
zhangfengcdt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/sedona-db.git
The following commit(s) were added to refs/heads/main by this push:
new 700b6d8e7 ci: disable rust-cache cache-bin on macOS, add rustup-init guard (#837) (#841)
700b6d8e7 is described below
commit 700b6d8e71193207073f51677fa2680611ea14e7
Author: James Willis <ja...@users.noreply.github.com>
AuthorDate: Fri May 15 08:11:27 2026 -0700
ci: disable rust-cache cache-bin on macOS, add rustup-init guard (#837) (#841)
---
.github/workflows/python-wheels.yml | 8 ++++++++
.github/workflows/r.yml | 12 +-----------
r/sedonadb/configure | 23 +++++++++++++++++++++++
r/sedonadb/configure.win | 22 ++++++++++++++++++++++
4 files changed, 54 insertions(+), 11 deletions(-)
diff --git a/.github/workflows/python-wheels.yml b/.github/workflows/python-wheels.yml
index afc103b7f..9dd837666 100644
--- a/.github/workflows/python-wheels.yml
+++ b/.github/workflows/python-wheels.yml
@@ -117,6 +117,10 @@ jobs:
with:
# Update this key to force a new cache
prefix-key: "python-wheel-macOS-latest-v2"
+ # Don't cache ~/.cargo/bin -- caching it across runner-image
+ # generations leaves cargo on PATH as a stale rustup-init that
+ # rejects normal subcommands. See sedona-db#837.
+ cache-bin: false
- name: Clone vcpkg
uses: actions/checkout@v6
@@ -170,6 +174,10 @@ jobs:
with:
# Update this key to force a new cache
prefix-key: "python-wheel-macOS-latest-v2"
+ # Don't cache ~/.cargo/bin -- caching it across runner-image
+ # generations leaves cargo on PATH as a stale rustup-init that
+ # rejects normal subcommands. See sedona-db#837.
+ cache-bin: false
- name: Clone vcpkg
uses: actions/checkout@v6
diff --git a/.github/workflows/r.yml b/.github/workflows/r.yml
index c7e940d6b..2e2730cb8 100644
--- a/.github/workflows/r.yml
+++ b/.github/workflows/r.yml
@@ -74,17 +74,6 @@ jobs:
rustup toolchain install stable --no-self-update
rustup default stable
- # The `cargo +nightly build … -Zbuild-std=panic_abort,std` path in
- # r/sedonadb/src/Makevars.in is only meant to fire for the
- # wasm32-unknown-emscripten target, but it has been observed firing
- # intermittently on macos-latest (see #837). Pre-install nightly +
- # rust-src so a stray invocation doesn't hand `cargo build` to
- # rustup-init.
- - name: Pre-install nightly Rust + rust-src (workaround for #837)
- if: matrix.config.os == 'macos-latest'
- run: |
- rustup toolchain install nightly --component rust-src --no-self-update
-
# Set the default toolchain here so that rust-cache saves/restores
# the correct target. (The R package will use this target regardless,
# this just in theory helps the cache)
@@ -119,6 +108,7 @@ jobs:
with:
prefix-key: "r-v4"
workspaces: ${{ env.CACHE_WORKSPACE }}
+ cache-bin: false
- uses: r-lib/actions/setup-r-dependencies@v2
with:
diff --git a/r/sedonadb/configure b/r/sedonadb/configure
index a4f74a619..36f9fd11f 100755
--- a/r/sedonadb/configure
+++ b/r/sedonadb/configure
@@ -56,6 +56,29 @@ if [ $? -ne 0 ]; then
exit 1
fi
+# Guard against `cargo` resolving to the rustup-init installer. When the
+# rustup proxy can't find its install state it identifies as "rustup-init"
+# and rejects normal cargo subcommands like `build` and `metadata`, which
+# surfaces as a misleading "unexpected argument 'build'" failure deep in
+# the Make recipe. Fail fast with the real diagnosis. See sedona-db#837.
+case "$CARGO_VERSION" in
+ rustup-init*)
+ echo "-------------- ERROR: CONFIGURATION FAILED --------------------"
+ echo ""
+ echo "'cargo' on PATH is the rustup-init installer, not the rustup"
+ echo "proxy. cargo --version reports:"
+ echo " $CARGO_VERSION"
+ echo ""
+ echo "Ensure \$HOME/.cargo/bin is ahead of any other Rust installer"
+ echo "on PATH (e.g. Homebrew rustup), or reinstall the stable toolchain"
+ echo "with: rustup toolchain install stable && rustup default stable"
+ echo ""
+ echo "---------------------------------------------------------------"
+
+ exit 1
+ ;;
+esac
+
# There's a little chance that rustc is not available on PATH while cargo is.
# So, just ignore the error case.
RUSTC_VERSION="$(rustc --version || true)"
diff --git a/r/sedonadb/configure.win b/r/sedonadb/configure.win
index 4572270a1..e9881fa9e 100755
--- a/r/sedonadb/configure.win
+++ b/r/sedonadb/configure.win
@@ -48,6 +48,28 @@ if [ $? -ne 0 ]; then
exit 1
fi
+# Guard against `cargo` resolving to the rustup-init installer. When the
+# rustup proxy can't find its install state it identifies as "rustup-init"
+# and rejects normal cargo subcommands like `build` and `metadata`, which
+# surfaces as a misleading "unexpected argument 'build'" failure deep in
+# the Make recipe. Fail fast with the real diagnosis. See sedona-db#837.
+case "$CARGO_VERSION" in
+ rustup-init*)
+ echo "-------------- ERROR: CONFIGURATION FAILED --------------------"
+ echo ""
+ echo "'cargo' on PATH is the rustup-init installer, not the rustup"
+ echo "proxy. cargo --version reports:"
+ echo " $CARGO_VERSION"
+ echo ""
+ echo "Reinstall the stable toolchain with:"
+ echo " rustup toolchain install stable && rustup default stable"
+ echo ""
+ echo "---------------------------------------------------------------"
+
+ exit 1
+ ;;
+esac
+
# There's a little chance that rustc is not available on PATH while cargo is.
# So, just ignore the error case.
RUSTC_VERSION="$(rustc --version || true)"