-
Notifications
You must be signed in to change notification settings - Fork 4.1k
[R] Source build should check if offline #39697
Description
Describe the enhancement requested
A source package installation will fail by default if you're offline. It will now correctly fall back to building libarrow from source if a binary isn't available, but the cmake build will try and fail to download thirdparty dependencies. So if we're truly offline, we need to detect that before calling cmake and turn off all optional features. IMO it's not ideal to fall back to successfully building a minimal package if offline--it would be better to opt-in to the offline behavior and not silently get a build with features disabled--but CRAN seems to insist on this.
We can set download_ok <- try_download("https://apache.jfrog.io/artifactory/arrow/r/"), that's a lightweight endpoint that should have good uptime (and is not github, which CRAN has problems with). It would also be good to skip this behavior under certain conditions where the user has expressed a preference for a non-minimal build:
LIBARROW_BINARYsomething other thanfalseor unsetLIBARROW_MINIMAL=false- Probably also should rename
TEST_OFFLINE_BUILDto justOFFLINE_BUILD, and if that istrueorfalse, you don't need to try downloading, just use that value (inverted ,since it's the opposite ofdownload_ok).
Component(s)
R