You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/04/30 13:26:19 UTC
[GitHub] [spark] MichaelChirico commented on a change in pull request #28419: [R] small tidying of sh scripts for R
MichaelChirico commented on a change in pull request #28419:
URL: https://github.com/apache/spark/pull/28419#discussion_r418007359
##########
File path: dev/lint-r.R
##########
@@ -20,14 +20,13 @@ SPARK_ROOT_DIR <- as.character(argv[1])
LOCAL_LIB_LOC <- file.path(SPARK_ROOT_DIR, "R", "lib")
# Checks if SparkR is installed in a local directory.
-if (! library(SparkR, lib.loc = LOCAL_LIB_LOC, logical.return = TRUE)) {
+if (!requireNamespace("SparkR", lib.loc = LOCAL_LIB_LOC)) {
stop("You should install SparkR in a local directory with `R/install-dev.sh`.")
}
-# Installs lintr from Github in a local directory.
-# NOTE: The CRAN's version is too old to adapt to our rules.
-if ("lintr" %in% row.names(installed.packages()) == FALSE) {
- devtools::install_github("jimhester/lintr@v2.0.0")
+# Installs lintr if needed
+if (!requireNamespace("lintr")) {
+ install.packages('lintr')
Review comment:
the comment said the CRAN version wasn't recent enough so I assumed `>= 2.0.0` would be fine. & we're passing so that's a good sign.
Anyway, yes, would be good to confirm on this.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org