Skip to content

Commit

Permalink
ARROW-16156: [R] Clarify warning message for features not turned on i…
Browse files Browse the repository at this point in the history
…n .onAttach()

After ARROW-15818 (apache#12564) we get an extra message on package load because "engine" was added to `arrow_info()$capabilities` and few if any users will have this turned on for at least the next release:

```r
library(arrow)
#> See arrow_info() for available features
```

This PR adds "engine" to the list of features we don't message users about and clarifies the message so that it's more clear why it's being shown:

```r
library(arrow)
#> Some features of Arrow C++ are turned off. Run `arrow_info()` for more information.
```

Closes apache#12842 from paleolimbot/r-onattach

Lead-authored-by: Dewey Dunnington <[email protected]>
Co-authored-by: Jonathan Keane <[email protected]>
Signed-off-by: Jonathan Keane <[email protected]>
  • Loading branch information
paleolimbot and jonkeane committed Apr 8, 2022
1 parent 58fe60f commit 961ec77
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions r/R/arrow-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,12 @@
#
# Let's print a message if some are off
if (some_features_are_off(features)) {
packageStartupMessage("See arrow_info() for available features")
packageStartupMessage(
paste(
"Some features are not enabled in this build of Arrow.",
"Run `arrow_info()` for more information."
)
)
}
})
}
Expand Down Expand Up @@ -264,7 +269,7 @@ arrow_info <- function() {
some_features_are_off <- function(features) {
# `features` is a named logical vector (as in arrow_info()$capabilities)
# Let's exclude some less relevant ones
blocklist <- c("lzo", "bz2", "brotli")
blocklist <- c("lzo", "bz2", "brotli", "engine")
# Return TRUE if any of the other features are FALSE
!all(features[setdiff(names(features), blocklist)])
}
Expand Down

0 comments on commit 961ec77

Please sign in to comment.