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

GH-27839: [R] Fetch latest nightly binary for arrow R dev versions. #38236

Merged
merged 20 commits into from
Oct 25, 2023
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion r/configure
Original file line number Diff line number Diff line change
Expand Up @@ -203,9 +203,27 @@ find_arrow () {
do_bundled_build () {
${R_HOME}/bin/Rscript tools/nixlibs.R $VERSION

if [ $? -ne 0 ]; then
# If the nixlibs.R script failed, we can't continue
echo "------------------------- NOTE ---------------------------"
echo "There was an issue building the Arrow C++ libraries."
echo "See https://arrow.apache.org/docs/r/articles/install.html"
echo "---------------------------------------------------------"
exit 1
fi

if [ -d "libarrow/arrow-$VERSION" ]; then
_LIBARROW_FOUND="`pwd`/libarrow/arrow-${VERSION}"
else
# It's possible that the version of the libarrow binary is not identical to the
# R version, e.g. if the R build is a patch release, so find what the dir is
# actually called. If there is more than one version present, use the one
# with the highest version:
_LIBARROW_FOUND="`pwd`/libarrow/$(ls libarrow/ | grep ^arrow- | tail -n 1)"
fi

# Handle a few special cases, using what we know about the bundled build
# and our ability to make edits to it since we "own" it.
_LIBARROW_FOUND="`pwd`/libarrow/arrow-${VERSION}"
LIB_DIR="${_LIBARROW_FOUND}/lib"
if [ -d "$LIB_DIR" ]; then
if [ "${PKG_CONFIG_AVAILABLE}" = "true" ]; then
Expand Down
3 changes: 1 addition & 2 deletions r/configure.win
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ GCS_LIBS="-lcurl -lnormaliz -lssh2 -lgdi32 -lssl -lcrypto -lcrypt32 -lwldap32 \
function configure_release() {
VERSION=$(grep ^Version DESCRIPTION | sed s/Version:\ //)
# Try to find/download a C++ Arrow binary,
# including possibly a local .zip file if RWINLIB_LOCAL is set
"${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe" "tools/winlibs.R" $VERSION $RWINLIB_LOCAL
"${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe" "tools/nixlibs.R" $VERSION
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given that this is also being used on Windows now, should nixlibs.R be renamed?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, what name though^^ libarrow.R? libs.R?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm...maybe build-or-fetch-libarrow.R? Or maybe just build-libarrow.R if we don't want the fetch to be extra explicit?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤷

# If binary not found, script exits nonzero
if [ $? -ne 0 ]; then
echo "Arrow C++ library was not found"
Expand Down
Loading
Loading