nealrichardson commented on code in PR #41019:
URL: https://github.com/apache/arrow/pull/41019#discussion_r1552630057
##########
r/R/install-arrow.R:
##########
@@ -60,6 +62,7 @@ install_arrow <- function(nightly = FALSE,
minimal = Sys.getenv("LIBARROW_MINIMAL", FALSE),
verbose = Sys.getenv("ARROW_R_DEV", FALSE),
repos = getOption("repos"),
+ prefer_runiverse = TRUE,
Review Comment:
If you take my other suggestion, you don't need to touch this function
(though cleaning up the autobrew references is probably worthwhile anyway) or
`arrow_repos()`.
##########
r/R/arrow-package.R:
##########
@@ -182,37 +182,50 @@ configure_tzdb <- function() {
.onAttach <- function(libname, pkgname) {
# Just to be extra safe, let's wrap this in a try();
# we don't want a failed startup message to prevent the package from loading
- try({
- # On macOS only, Check if we are running in under emulation, and warn this
will not work
- if (on_rosetta()) {
- packageStartupMessage(
- paste(
- "Warning:",
- " It appears that you are running R and Arrow in emulation (i.e.
you're",
- " running an Intel version of R on a non-Intel mac). This
configuration is",
- " not supported by arrow, you should install a native (arm64) build
of R",
- " and use arrow with that. See
https://cran.r-project.org/bin/macosx/",
- "",
- sep = "\n"
+ try(
+ {
+ # On macOS only, Check if we are running in under emulation, and warn
this will not work
+ if (on_rosetta()) {
+ packageStartupMessage(
+ paste(
+ "Warning:",
+ " It appears that you are running R and Arrow in emulation (i.e.
you're",
+ " running an Intel version of R on a non-Intel mac). This
configuration is",
+ " not supported by arrow, you should install a native (arm64)
build of R",
+ " and use arrow with that. See
https://cran.r-project.org/bin/macosx/",
+ "",
+ sep = "\n"
+ )
)
- )
- }
+ }
- features <- arrow_info()$capabilities
- # That has all of the #ifdef features, plus the compression libs and the
- # string libraries (but not the memory allocators, they're added elsewhere)
- #
- # Let's print a message if some are off
- if (some_features_are_off(features)) {
- packageStartupMessage(
- paste(
- "Some features are not enabled in this build of Arrow.",
- "Run `arrow_info()` for more information."
+ features <- arrow_info()$capabilities
+ # That has all of the #ifdef features, plus the compression libs and the
+ # string libraries (but not the memory allocators, they're added
elsewhere)
+ #
+ # Let's print a message if some are off
+ if (some_features_are_off(features)) {
+ packageStartupMessage(
+ paste(
+ "Some features are not enabled in this build of Arrow.",
+ "Run `arrow_info()` for more information."
+ )
)
- )
- }
- }, silent = TRUE)
+ # On macOS binaries from CRAN can be hobbled. If on macOS, and features
+ # are disabled, advise that reinstalling might help
+ if (identical(tolower(Sys.info()[["sysname"]]), "darwin")) {
+ packageStartupMessage(
+ paste(
+ "The repository you retrieved Arrow from did not include all of
Arrow's features.",
+ "You can install a fully-featured version by running
`arrow::install_arrow()`."
Review Comment:
Did you see this R-package-devel thread?
https://stat.ethz.ch/pipermail/r-package-devel/2024q2/010624.html
TL;DR order of `repos` doesn't necessarily guarantee order of lookup. So it
might be better here to just recommend `install.packages("arrow", repos =
"https://apache.r-universe.dev")`. We know they already have the arrow package
dependencies installed since they're loading it, so we don't need to keep on a
CRAN in order to get dependencies to resolve.
##########
r/R/arrow-package.R:
##########
@@ -182,37 +182,50 @@ configure_tzdb <- function() {
.onAttach <- function(libname, pkgname) {
# Just to be extra safe, let's wrap this in a try();
# we don't want a failed startup message to prevent the package from loading
- try({
- # On macOS only, Check if we are running in under emulation, and warn this
will not work
- if (on_rosetta()) {
- packageStartupMessage(
- paste(
- "Warning:",
- " It appears that you are running R and Arrow in emulation (i.e.
you're",
- " running an Intel version of R on a non-Intel mac). This
configuration is",
- " not supported by arrow, you should install a native (arm64) build
of R",
- " and use arrow with that. See
https://cran.r-project.org/bin/macosx/",
- "",
- sep = "\n"
+ try(
+ {
+ # On macOS only, Check if we are running in under emulation, and warn
this will not work
+ if (on_rosetta()) {
+ packageStartupMessage(
+ paste(
+ "Warning:",
+ " It appears that you are running R and Arrow in emulation (i.e.
you're",
+ " running an Intel version of R on a non-Intel mac). This
configuration is",
+ " not supported by arrow, you should install a native (arm64)
build of R",
+ " and use arrow with that. See
https://cran.r-project.org/bin/macosx/",
+ "",
+ sep = "\n"
+ )
)
- )
- }
+ }
- features <- arrow_info()$capabilities
- # That has all of the #ifdef features, plus the compression libs and the
- # string libraries (but not the memory allocators, they're added elsewhere)
- #
- # Let's print a message if some are off
- if (some_features_are_off(features)) {
- packageStartupMessage(
- paste(
- "Some features are not enabled in this build of Arrow.",
- "Run `arrow_info()` for more information."
+ features <- arrow_info()$capabilities
+ # That has all of the #ifdef features, plus the compression libs and the
+ # string libraries (but not the memory allocators, they're added
elsewhere)
+ #
+ # Let's print a message if some are off
+ if (some_features_are_off(features)) {
+ packageStartupMessage(
+ paste(
+ "Some features are not enabled in this build of Arrow.",
+ "Run `arrow_info()` for more information."
+ )
)
- )
- }
- }, silent = TRUE)
+ # On macOS binaries from CRAN can be hobbled. If on macOS, and features
Review Comment:
I don't think it's a bad idea to explain here why they're hobbled, just so
we'll know in the future when we can remove this workaround.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]