From 2376b0b33f0bfd4c14e3288cc647d8249089f095 Mon Sep 17 00:00:00 2001 From: Hossein Date: Tue, 12 Dec 2017 15:03:19 -0800 Subject: [PATCH 1/3] Installing lintr package in Spark library location instead of site-library --- dev/lint-r.R | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dev/lint-r.R b/dev/lint-r.R index a4261d266bbc..d02792f49e27 100644 --- a/dev/lint-r.R +++ b/dev/lint-r.R @@ -27,10 +27,11 @@ if (! library(SparkR, lib.loc = LOCAL_LIB_LOC, logical.return = TRUE)) { # 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@5431140") + devtools::with_libpaths(new = LOCAL_LIB_LOC, devtools::install_github("jimhester/lintr@5431140")) } -library(lintr) +library(lintr, lib.loc = LOCAL_LIB_LOC) +library(xmlparsedata, lib.loc = LOCAL_LIB_LOC) library(methods) library(testthat) path.to.package <- file.path(SPARK_ROOT_DIR, "R", "pkg") From 6892725c42fe5be156364656def77c202710c1a7 Mon Sep 17 00:00:00 2001 From: Hossein Date: Tue, 12 Dec 2017 15:46:10 -0800 Subject: [PATCH 2/3] Installing lintr from github no mwatter what --- dev/lint-r.R | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/dev/lint-r.R b/dev/lint-r.R index d02792f49e27..5bd74ab0a887 100644 --- a/dev/lint-r.R +++ b/dev/lint-r.R @@ -26,9 +26,8 @@ if (! library(SparkR, lib.loc = LOCAL_LIB_LOC, logical.return = TRUE)) { # 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::with_libpaths(new = LOCAL_LIB_LOC, devtools::install_github("jimhester/lintr@5431140")) -} +# NOTE: We won't use the lintr package that might have been installed on the test machine +devtools::with_libpaths(new = LOCAL_LIB_LOC, devtools::install_github("jimhester/lintr@5431140")) library(lintr, lib.loc = LOCAL_LIB_LOC) library(xmlparsedata, lib.loc = LOCAL_LIB_LOC) From 4355fae1c491ad70f7a4a108e22f8ad376e5a5c6 Mon Sep 17 00:00:00 2001 From: Hossein Date: Tue, 12 Dec 2017 16:41:46 -0800 Subject: [PATCH 3/3] Updating Rcpp to 0.12.13 and using a CRAN a snapshot --- dev/lint-r.R | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dev/lint-r.R b/dev/lint-r.R index 5bd74ab0a887..96e20d410f09 100644 --- a/dev/lint-r.R +++ b/dev/lint-r.R @@ -24,7 +24,11 @@ if (! library(SparkR, lib.loc = LOCAL_LIB_LOC, logical.return = TRUE)) { stop("You should install SparkR in a local directory with `R/install-dev.sh`.") } -# Installs lintr from Github in a local directory. +# Installs lintr and dependencies from Github in a local directory. + +# Pinning Rcpp version to CRAN snapshot from 2017-10-15 +install.packages("Rcpp", repos = "https://cran.microsoft.com/snapshot/2017-10-15", lib = LOCAL_LIB_LOC) + # NOTE: The CRAN's version is too old to adapt to our rules. # NOTE: We won't use the lintr package that might have been installed on the test machine devtools::with_libpaths(new = LOCAL_LIB_LOC, devtools::install_github("jimhester/lintr@5431140"))