Skip to content

[R] Source build should check if offline #39697

@nealrichardson

Description

@nealrichardson

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_BINARY something other than false or unset
  • LIBARROW_MINIMAL=false
  • Probably also should rename TEST_OFFLINE_BUILD to just OFFLINE_BUILD, and if that is true or false, you don't need to try downloading, just use that value (inverted ,since it's the opposite of download_ok).

Component(s)

R

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions