-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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-37907: [R] Setting rosetta variable is missing #37961
Changes from 2 commits
7bb3433
5a691a3
945ca55
b325ccc
19684dd
dfec06a
793807e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -61,6 +61,7 @@ install_arrow <- function(nightly = FALSE, | |||||||||
verbose = Sys.getenv("ARROW_R_DEV", FALSE), | ||||||||||
repos = getOption("repos"), | ||||||||||
...) { | ||||||||||
sysname <- tolower(Sys.info()[["sysname"]]) | ||||||||||
conda <- isTRUE(grepl("conda", R.Version()$platform)) | ||||||||||
|
||||||||||
if (conda) { | ||||||||||
|
@@ -79,7 +80,8 @@ install_arrow <- function(nightly = FALSE, | |||||||||
# On the M1, we can't use the usual autobrew, which pulls Intel dependencies | ||||||||||
apple_m1 <- grepl("arm-apple|aarch64.*darwin", R.Version()$platform) | ||||||||||
# On Rosetta, we have to build without JEMALLOC, so we also can't autobrew | ||||||||||
if (on_rosetta()) { | ||||||||||
rosetta <- identical(sysname, "darwin") && identical(system("sysctl -n sysctl.proc_translated", intern = TRUE), "1") | ||||||||||
if (rosetta) { | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Another PR implemented a function There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hi @thisisnic I believe that for the package this is fine. I saw that the However, I'm thinking of the case where the user just uses the So my proposal would be to just change the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't see the standalone use being suggested, maybe we need to clarify the docs? As I understand it
@thisisnic please correct me if my assessment on that is wrong? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @assignUser It's here: https://arrow.apache.org/docs/r/articles/install.html?q=install_arrow#using-install_arrow
In the case of "You want to install a development build", folks may not already have arrow installed. On a different note, there have been other PRs in this area of the codebase merged recently, so this PR may need a rebase to see how the changes affect it, and what needs doing. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This is a good catch, I'm working on a review, but overall I'm pro moving this function to
We don't have to do this here, but we should at least make an issue that we should write a test that tests that the script remains self-contained. It would have caught this bug, for example! |
||||||||||
Sys.setenv(ARROW_JEMALLOC = "OFF") | ||||||||||
} | ||||||||||
if (apple_m1 || rosetta) { | ||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.