Github user felixcheung commented on a diff in the pull request:

    https://github.com/apache/spark/pull/15790#discussion_r87509955
  
    --- Diff: R/create-docs.sh ---
    @@ -52,21 +52,28 @@ Rscript -e 'libDir <- "../../lib"; library(SparkR, 
lib.loc=libDir); library(knit
     
     popd
     
    -# Find Spark jars.
    -if [ -f "${SPARK_HOME}/RELEASE" ]; then
    -  SPARK_JARS_DIR="${SPARK_HOME}/jars"
    +if [ -n "$NO_VIGNETTES" ]
    +then
    +  echo "Skipping R vignettes"
     else
    -  
SPARK_JARS_DIR="${SPARK_HOME}/assembly/target/scala-$SPARK_SCALA_VERSION/jars"
    -fi
     
    -# Only create vignettes if Spark JARs exist
    -if [ -d "$SPARK_JARS_DIR" ]; then
    -  # render creates SparkR vignettes
    -  Rscript -e 'library(rmarkdown); paths <- .libPaths(); .libPaths(c("lib", 
paths)); Sys.setenv(SPARK_HOME=tools::file_path_as_absolute("..")); 
render("pkg/vignettes/sparkr-vignettes.Rmd"); .libPaths(paths)'
    +  # Find Spark jars.
    --- End diff --
    
    right, I thought about that. I think there's value in knitting html and 
vignettes in create-doc.sh, it is a bit duplicated to have vignettes in 2 
places but 
    
    in create-doc.sh
    ```
    ...
    render("pkg/vignettes/sparkr-vignettes.Rmd");
    ```
    
    in check-cran.sh
    ```
      SPARK_HOME="${SPARK_HOME}" "$R_SCRIPT_PATH/"R CMD build $FWDIR/pkg
    ```
    
    in the latter it is building the full package along with vignettes, so the 
actual command and behavior isn't exactly the same.
    
    Perhaps we should just take vignettes build out of create-doc.sh?



---
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 [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to