GitHub user felixcheung opened a pull request: https://github.com/apache/spark/pull/16014
[SPARK-18590][SPARKR] build R source package when making distribution ## What changes were proposed in this pull request? We should include in Spark distribution the built source package for SparkR. This will enable help and vignettes when the package is used. Also this source package is what we would release to CRAN. ### more details These are the additional steps in make-distribution; please see [here](https://github.com/apache/spark/blob/master/R/CRAN_RELEASE.md) on what's going to a CRAN release, which is now run during make-distribution.sh. 1. package needs to be installed because the first code block in vignettes is `library(SparkR)` without lib path 2. `R CMD build` will build vignettes 3. `R CMD check` on the source package will install package and build vignettes again (this time from source packaged) (will skip tests here but tests will need to pass for CRAN release process to success - ideally, during release signoff we should install from the R package and run tests) 4. `R CMD Install` on the source package (this is the only way to generate doc/vignettes rds files correctly, not in step #1) (the output of this step is what we package into Spark dist and sparkr.zip) Alternatively, R CMD build should already be installing the package in a temp directory though it might just be finding this location and set it to lib.loc parameter; another approach is perhaps we could try calling `R CMD INSTALL --build pkg` instead. But in any case, despite installing the package multiple times this is relatively fast. Building vignettes takes a while though. ## How was this patch tested? Manually, CI. You can merge this pull request into a Git repository by running: $ git pull https://github.com/felixcheung/spark rdist Alternatively you can review and apply these changes as the patch at: https://github.com/apache/spark/pull/16014.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #16014 ---- commit 79771392f7a8c7fe4ed90b20aec05e5e65304975 Author: Felix Cheung <felixcheun...@hotmail.com> Date: 2016-11-25T23:00:25Z build source package in make-distribution, and take that as a part of the distribution ---- --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org