You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/07/26 14:24:14 UTC

[GitHub] [arrow] dragosmg commented on a diff in pull request #13620: ARROW-17084: [R] Install the package before linting

dragosmg commented on code in PR #13620:
URL: https://github.com/apache/arrow/pull/13620#discussion_r930031860


##########
.github/workflows/r.yml:
##########
@@ -327,6 +327,13 @@ jobs:
         shell: Rscript {0}
         working-directory: r
         run: |
+          Sys.setenv(
+            RWINLIB_LOCAL = file.path(Sys.getenv("GITHUB_WORKSPACE"), "r", "windows", "libarrow.zip"),
+            MAKEFLAGS = paste0("-j", parallel::detectCores()),
+            ARROW_R_DEV = TRUE,
+            "_R_CHECK_FORCE_SUGGESTS_" = FALSE
+          )
+          pak::pak("local::.")

Review Comment:
   AFAIU `pak::pak()` and `pak::pkg_install()` are equivalent (https://pak.r-lib.org/reference/pak.html#details-1) and so are `pak::local_install()` and `pak::pkg_install("local::.")` (https://pak.r-lib.org/reference/local_install.html#details-1) => `pak::local_install()` and `pak::pak("local::.")` are equivalent.
   
   Are you thinking that `pak::local_install()` is a bit more readable? I would think people modifying this code are somewhat familiar with `pak`, and thus they encountered the `"local::."` incantation. For me, the `local_` pattern is less readable as there is a bit of overlap and different meaning than `withr::local_`. I read `local_` as we're doing something locally, whereas in this context it actually means we are installing the package located in the root directory. From this point of view, I think `"local::."` is less ambiguous.  



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org